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.
Made an explainer on Event logs - Pureth and an EPF fellow actually managed to prototype a subset of it.
The EIP is quite challenging to implement in other clients (database format, deep reorgs etc), and the proof format has not yet been validated against purifiers (Helios / Nimbus) and L2s. A network protocol for syncing would also be needed. Further, the tree structure could benefit from a bump to the latest ProgressiveList (EIP-7916).
Given these challenges, I think this is one of the EIPs that needs more time. It would be interesting to collect feedback from other clients who implemented accelerated log indices, and also have a concrete answer to syncing and proving. Thereās also the EIP-7792 alternative (based on IVC for scalable trust-free Ethereum logs - HackMD) of storing the commitment in an external zk-proven system, rather than having every node maintain it.
As this EIP uses SSZ, a good first step would be ensuring that all EL teams have production grade SSZ libraries (as a priority for G*). This has been repeatedly used in the past as an excuse to delay SSZ based proposals. Once that happens, would re-consider this EIP for H* (which would also provide enough time to address the open questions).