An efficient and light client friendly replacement for bloom filters. This EIP proposes a new data structure that adds a moderate amount of consensus data that is optional to store long term, has limited processing and memory requirements and allows searching for log events with 2-3 orders of magnitude less bandwidth than what bloom filters allowed back when they were not rendered useless by over-utilization. It also inherently adapts to changing block utilization and maintains a constantly low average false positive ratio.
Because log_filter_tree uses SSZ merkleization which uses SHA2. Iâm not sure whether and when the existing EL structures will be converted to SSZ but for this purpose a binary tree is absolutely the logical choice, Merkle multiproofs are nice and easy with SSZ hash trees, so I think that sticking with the old hexary MPT format would be really impractical. And if we use an existing format with existing tooling then I donât see a reason to complicate that by not using the hash function it was specified with.
This PR is #1 of a 3-part series that implements the new log index intended to replace core/bloombits. Replaces #30370
This part implements the new data structure, the log index generator and the search logic. This PR has most of the complexity but it does not affect any existing code yet so maybe it is easier to review separately.
Note that the possibility of a tree hashing scheme and remote proof protocol are mentioned in the documents above but they are not exactly specified yet. These specs are WIP and will be finalized after the local log indexer/filter code is finalized and merged.