Hello I got a report from @0xbeny that eth_getLogs can be slow at times. I want to list a few optimizations that have been applied upstream. They yielded around 30% improvement in speed. They need to be applied in order.
https://github.com/ethereum/go-ethereum/pull/23147 Logs are stored as part of receipts in the database. Crucially not all fields of a receipt are persisted to disk. Some are re-computed on read. The most expensive field to re-compute is the bloom filter which will not even be returned in eth_getLogs. Here we define a new decoding of receipts specifically for this use-case which avoids extra processing.
https://github.com/ethereum/go-ethereum/pull/25459 Previous PR caused an accidental regression in which receipts would not be cached anymore. Hence concurrently querying same blocks would slow down. This PR re-introduces a cache specifically for logs.
Hello I got a report from @0xbeny that
eth_getLogs
can be slow at times. I want to list a few optimizations that have been applied upstream. They yielded around 30% improvement in speed. They need to be applied in order.eth_getLogs
. Here we define a new decoding of receipts specifically for this use-case which avoids extra processing.