fix(ethrex): track ethrex 55433c2 — JUMPDEST bitmap, state_history CF - #1
Closed
edg-l wants to merge 1 commit into
Closed
fix(ethrex): track ethrex 55433c2 — JUMPDEST bitmap, state_history CF#1edg-l wants to merge 1 commit into
edg-l wants to merge 1 commit into
Conversation
account_codes values now carry a JUMPDEST bitmap (one bit per bytecode byte, ceil(len/8) bytes, zero-length when the code has none) instead of an RLP list of u32 offsets. ethrex reads both, branching on the RLP item header, so an existing datadir still boots. Also adds the state_history column family (22 CFs) and mirrors ethrex's table options for account_codes and account_code_metadata: 4 KiB blocks and a 10-bit bloom on both, with account_code_metadata moving off the default arm onto 128 MiB buffers / 256 MiB files. Boot image and Tables repin to ethrex commit 55433c2 (the ethpandaops glamsterdam-devnet-7 build) since no release carries either change yet. schema_version stays 3: ethrex#7095 bumps it to 4 behind a no-op migrate_3_to_4, and that bump is not in this build. testdata/genesis_dump.json is NOT regenerated yet, so the account_codes comparison asserts keys byte-exact and values against the fixture's own bytecode re-encoded, rather than against the stale fixture values.
edg-l
force-pushed
the
ethrex-jumpdest-bitmap
branch
from
August 4, 2026 16:05
c4ad7f2 to
f80bd69
Compare
Owner
Author
|
Reopening upstream against ethereum/state-actor. |
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.
Stacked on ethereum#127 — review that first; this is the one commit on top.
What
Tracks ethrex to commit
55433c2(ethpandaopsglamsterdam-devnet-7). No release has these yet; v23.0.0 predates both.account_codesvalues carry a JUMPDEST bitmap, not an RLP list of u32 offsets (ethrex#7095). One bit per bytecode byte, LSB-first, zero-length when the code has no JUMPDEST. ethrex reads both forms, so existing datadirs still boot.state_historyCF added (21 → 22), beforebad_blocksinTABLES. Unrelated to #7095. Without it ethrex creates it itself on first boot — same defect fix(ethrex): realign DB config with ethrex v23.0.0 ethereum/state-actor#127 fixed forbad_blocks.account_code_metadatamoves off our default arm onto theaccount_codesarm, minus blob files.schema_versionstays 3 — still ethrex's value at this commit. #7095 bumps it to 4 behind a no-opmigrate_3_to_4; writing 4 early is a hardMigrationFailedboot error.Image pin is digest-locked so it survives the tag moving. Repin to a release tag once one carries both changes.
Size effect
Crossover is ~4.2% JUMPDEST density; our max-size contract patterns sit at 99.9%, so
account_codesvalues drop from 97,903 to 27,654 bytes — the old encoding overstated that CF by 3.54x on contract-heavy fixtures.Verification
go build,go vet,gofmt, untagged suite clean. New unit tests cover bit position, PUSH-immediate suppression, byte-boundary crossing, the high-bit case, the zero-length case, and a cross-check against an independent scan.Why draft:
testdata/genesis_dump.jsonnot regenerated — needs the Rust harness at55433c2. Until thenTestGenesisDumpGoldenassertsaccount_codeskeys byte-exact and values against the fixture's own bytecode re-encoded (diffCFKeysOnly), which cannot catch encoder and fixture drifting together. This is the blocker; steps intestdata/gen/README.md.dbs_cgo.gonot typechecked locally (no librocksdb — Docker-only path). Needs aDockerfile.ethrexbuilder run.TestE2ESuitenot run against the new pin.