fix(ethrex): realign DB config with ethrex v23.0.0 - #127
Conversation
|
Follow-up for a later PR, noting it here so it isn't rediscovered: ethrex#7095 changes both the Jumpdest encoding. When it does land, in
Table options. The same PR gives The table options are safe to write early, since RocksDB doesn't validate write-time table options on open, but they buy nothing on their own: neither change does anything until a snapshot is regenerated, and both want the same repin. Worth doing together. For context on why it matters: because the current snapshots carry the list form, ethrex rebuilds the bitmap from the bytecode on every code-cache miss against them, 17.4 us per 24KB jumpdest-dense contract instead of 0.48 us. On the benchmarkoor bloatnet fixtures that is a large enough share of a cold contract-code access to move ethrex's |
6cb8ab1 to
9d91d11
Compare
The writer tracked ethrex v13-v16. Three things had drifted: - bad_blocks was missing from Tables (20 CFs, ethrex v23 has 21), so ethrex created it itself on first boot. - metadata.json said schema_version 2; ethrex has been at 3 since v16, so every first boot ran the migration branch over the whole DB. - Boot image and golden dump were pinned to v16.0.0. Repins all three to v23.0.0 and regenerates genesis_dump.json against it. Every state-bearing CF is byte-identical to the v16 dump; only chain_data[0x80] (gains hegotaTime) and the new empty bad_blocks CF differ, so the state root and the Go codecs are unaffected. Also corrects the block-cache comment (ethrex defaults to 12 GiB via --rocksdb.block-cache-size, not the 4 GiB the comment claimed; the smaller cache this writer runs stays as sized) and documents why the transaction_locations merge operator is not mirrored.
- bad_blocks landed in ethrex v22.0.0 (#6948), hegotaTime in v21.0.0 (#6326) — CHANGELOG and gen/README attributed both to v23 - internal/ethrex/doc.go still claimed the v15.0.0 pin (stale since v16); now v23.0.0 - RUNBOOK: the 12 GiB block cache is a lazily-filled ceiling — soften 'OOM-killed before it serves a request' accordingly - StoreSchemaVersion comment: note a value above ethrex's is a hard MigrationFailed boot error (the loud counterpart to the silent drop_obsolete_cfs CF cleanup) - comment trim per repo bar; CHANGELOG entry 22 -> 9 lines; reflow two broken comment paragraphs
9d91d11 to
40bdc3d
Compare
|
Thanks for the PR @edg-l
|
What
The ethrex writer tracked v13–v16. Realigns it to v23.0.0:
bad_blocksadded toTables— 20 CFs → 21. ethrex v23 has 21; it was creating the missing one itself on first boot.metadata.json→schema_version: 3— ethrex has been at 3 since v16. Writing 2 sent every first boot through the migration branch, which runs pending migrations over the whole DB first.chain_data[0x80](hegotaTime) and the new emptybad_blocksCF change; state root unaffected.--rocksdb.block-cache-size, not the 4 GiB the comment claimed to mirror. Value kept, now documented as deliberate.transaction_locationsmerge operator: documented why it isn't mirrored (no rows written; a CF created without one reopens fine with one registered).Relation to #117
Independent, but both touch
dbs_cgo.go. #117 bounds peak RSS; this only addscfIdxBadBlocksand rewrites two comments in the same options block.cache_index_and_filter_blocksis deliberately left to #117 — it already adds it, and it happens to match what ethrex v23 does. Whichever lands second needs a small rebase there.Verification
Untagged suite,
go build,go vet,gofmtall clean.cgo suite run locally in a
Dockerfile.ethrexbuilder image:TestE2ESuiteran the full CI path (REQUIRE_SPAMOOR=1, spamoor built from master) againstghcr.io/lambdaclass/ethrex:23.0.0: db-gen → boot → genesis-root capture → oracle re-query → ~100 blocks oferc20_bloater→ post-spamoor re-query. Result artifact:post_spamoor_entity_check: ok,post_spamoor_chain_advanced: true,post_spamoor_beacon_roots_ok: true, tip block 149.