I understand that bloom filters are used to quickly scan for log topics and corresponding contract addresses. I also understand that an 2048-bit bloom filter is stored in the block header.

Question: If I have a filter looking for a specific log topic value from block 0 to the latest block: how does the node search for this? Will it iterate over the bloom filters block by block starting by block 0? Or, is there a hierarchy of bloom filters (mipmaps?) so that multiple blocks can be filtered at once? Bonus for pointing to geth code location where this is implemented.


1 Answer 1


Finally got an answer to this.

The bloom filters are checked block by block. So if you call eth_getLogs with from:0 every header is checked.

Code location in the geth code.

See also this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.