I am working on service which monitors Ethereum based blockchains using web3 API calls. For each new mined block, it has to parse each of the transactions in the block. In addition, it needs to parse the amount of gas used by each transaction. The method I found of doing it is by calling eth_getTransactionReceipt
.
I am facing a performance issue, since this API needs to be called per transaction. As a first improvement, I perform a batch of many eth_getTransactionReceipt
calls in a single JSON RPC batch request.
I am looking for a way to further improve the performance by doing this with a single call per block, in a similar manner to trace_block
.