core, miner: EIP-8304 variable-length index entries - #35571
Draft
VanshSahay wants to merge 6 commits into
Draft
Conversation
Replace the interim fixed 64-byte records with the variable-length encodings defined by EIP-8304: a 2-byte type id, the searchable content (32 bytes, 20 for addresses) and fixed-size big-endian position fields, for totals of 42 (block), 50 (transaction), 38 (log address) and 50 (log topic) bytes. Field sizes are named constants so a spec change is a single-point edit. Block entries now use the spec's one-block delay: the level-0 table for block N holds the entry of block N-1, and none is added for the genesis block. Transaction entries carry the cumulative log count of the block before the transaction; log indices remain relative to the transaction. Sorting is a lexicographic comparison of the full encodings, which equals field-wise ordering since every field is fixed-size big-endian.
Unit coverage of the encoder layouts, round-trip decoding, length validation and ordering, plus a byte-for-byte reproduction of the spec's 22-entry worked example (blocks 40-43) and the level-0 wrapper's table shape.
VanshSahay
requested review from
MariusVanDerWijden,
fjl,
gballet,
lightclient and
rjl493456442
as code owners
August 23, 2026 19:30
VanshSahay
marked this pull request as draft
August 23, 2026 19:34
Open
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swaps the interim fixed 64-byte entries for the EIP-8304 variable-length encodings (42/50/38/50 bytes, 2-byte BE type id), with the spec's one-block delay, cumulative log counts, and lexicographic sort. Field sizes are named constants so a spec change is a one-place edit. Tests pin the spec's worked example (22 entries, blocks 40-43) byte for byte.
Depends on #35496; the diff includes its commits until it merges.