indexsupply / shovel

An Ethereum to Postgres indexer
https://indexsupply.com/shovel
MIT License
183 stars 23 forks source link

report number of rpc calls during a call to task.Converge #237

Closed ryandotsmith closed 9 months ago

ryandotsmith commented 9 months ago

A shovel integration which only requires data from eth_getLogs should make 1 RPC request per batch. However, if the integration requires data from the header, it will make len(batch) RPC requests. Since this configuration difference has an outsized impact on performance, we should log the number or RPC requests made ruing the processing of a batch. This way the operator can compare the number of requests made vs. the expected number of requests to be made.

See this issue for context and motivation: https://github.com/daimo-eth/daimo/pull/692

ryandotsmith commented 9 months ago

Fixed in a6cc8c012da2b9c5369a10eb38f03a3d595afdc5