EIP-7745: Two dimensional log filter data structure

Discussion topic for EIP-7745

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.

2 Likes

Why SHA2 instead of SHA3?

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.

1 Like

Will there be a test net support for this? Very interested in using this

Have split the ProgressiveByteList to its own EIP: Add EIP: SSZ ProgressiveByteList by etan-status · Pull Request #9523 · ethereum/EIPs · GitHub

Have any “explainer” articles or videos been published about this EIP?

1 Like

See the mp4 here: Releases · etan-status/purified-web3 · GitHub

1 Like

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.

FilterMaps data structure explanation: gist.github.com/zsfelfoldi/a60795f9da7ae6422f28c7a34e02a07e

Log index generator code overview: gist.github.com/zsfelfoldi/97105dff0b1a4f5ed557924a24b9b9e7

Search pattern matcher code overview: gist.github.com/zsfelfoldi/5981735641c956afb18065e84f8aff34

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.

1 Like