diff --git a/CHANGELOG.md b/CHANGELOG.md index c97753e1..b024be11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,15 @@ no longer written. ### Changed +- **ethrex tracking bumped v16.0.0 → v23.0.0.** Adds the `bad_blocks` + column family (21 CFs; upstream added it in v22.0.0, ethrex#6948 — + previously ethrex created it itself on first boot) and writes + `schema_version: 3` to `metadata.json` (ethrex's value since v16 — + writing 2 sent every first boot through the migration branch, which + also rewrites `metadata.json`, mutating the generated datadir). Boot + image and golden fixture repinned to 23.0.0; every state-bearing CF + is byte-identical to the v16 dump, so the state root and the Go + trie/code codecs are unaffected. - **Nethermind writer runs Nethermind's own RocksDB configuration.** All 8 databases (and every column family) now parse the verbatim DbConfig option strings through RocksDB's own parser instead of hand-tuned diff --git a/Dockerfile.ethrex b/Dockerfile.ethrex index 1dfd6c97..674a19c1 100644 --- a/Dockerfile.ethrex +++ b/Dockerfile.ethrex @@ -4,7 +4,7 @@ # # RocksDB strategy: build from source. Pinned to RocksDB 10.10.1 to match # `grocksdb v1.10.8`'s C-binding expectations (its build.sh pins this exact -# version). ethrex uses a single RocksDB instance with 20 column families; +# version). ethrex uses a single RocksDB instance with 21 column families; # the same grocksdb pairing used for besu and nethermind applies here. # # Why 10.10.1 specifically: grocksdb v1.10.8's C bindings reference @@ -22,8 +22,8 @@ # grocksdb v1.10.7 → RocksDB 10.9.1 # grocksdb v1.10.8 → RocksDB 10.10.1 ← we use this # -# * On-disk layout: single RocksDB at with 20 column families. -# Sidecar files: metadata.json (schema_version=2) and ethrex-genesis.json +# * On-disk layout: single RocksDB at with 21 column families. +# Sidecar files: metadata.json (schema_version=3) and ethrex-genesis.json # (full genesis JSON for `ethrex --network `). # # Run: diff --git a/README.md b/README.md index 40d22203..7730e808 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ ## Why -You want a pre-populated Ethereum database that a client can boot against directly — for cross-client determinism tests, devnet bootstrapping, EIP-7702 / ERC-20 fixtures, or state-bloat experiments. The alternative (run the client's `init` against a genesis with millions of `alloc` entries) is slow and client-specific. State Actor writes each client's on-disk format directly: Pebble for geth, MDBX + RocksDB + nippy-jar for reth, single RocksDB + 8 Bonsai column families for besu, seven RocksDB instances + a flat column DB for nethermind, single RocksDB + 20 column families for ethrex, Erigon v3 flat snapshot `.kv` files + a minimal MDBX for erigon. +You want a pre-populated Ethereum database that a client can boot against directly — for cross-client determinism tests, devnet bootstrapping, EIP-7702 / ERC-20 fixtures, or state-bloat experiments. The alternative (run the client's `init` against a genesis with millions of `alloc` entries) is slow and client-specific. State Actor writes each client's on-disk format directly: Pebble for geth, MDBX + RocksDB + nippy-jar for reth, single RocksDB + 8 Bonsai column families for besu, seven RocksDB instances + a flat column DB for nethermind, single RocksDB + 21 column families for ethrex, Erigon v3 flat snapshot `.kv` files + a minimal MDBX for erigon. Three flags carry most of the weight: `--client` (which client's format to write), `--spec` (concrete entities to include, declared in YAML), `--target-size` (the DB-size budget; auto-fills mainnet-shaped 20 % / 10 % / 70 % across account-trie / bytecode / storage up to the cap). One of `--spec` or `--target-size` is required; everything else has a sane default. diff --git a/client/ethrex/chainspec.go b/client/ethrex/chainspec.go index 6a6b2981..5b03ab9b 100644 --- a/client/ethrex/chainspec.go +++ b/client/ethrex/chainspec.go @@ -32,7 +32,7 @@ const GenesisFileName = "ethrex-genesis.json" // MetadataFileName is the on-disk filename of the schema metadata file. const MetadataFileName = "metadata.json" -// WriteStoreMetadata writes {"schema_version": 2} to /metadata.json. +// WriteStoreMetadata writes {"schema_version": 3} to /metadata.json. // This file is REQUIRED by ethrex's Store::new: when the datadir is non-empty // but has no metadata.json, ethrex returns NotFoundDBVersion and refuses to // boot. state-actor must write it because it pre-fills the dir with SST files. diff --git a/client/ethrex/chainspec_test.go b/client/ethrex/chainspec_test.go index f3fa687b..20b398a7 100644 --- a/client/ethrex/chainspec_test.go +++ b/client/ethrex/chainspec_test.go @@ -13,7 +13,7 @@ import ( ) // TestWriteStoreMetadata verifies that WriteStoreMetadata writes a valid JSON -// file with schema_version=2. +// file with schema_version=3. func TestWriteStoreMetadata(t *testing.T) { dir := t.TempDir() if err := ethrex.WriteStoreMetadata(dir); err != nil { @@ -31,8 +31,8 @@ func TestWriteStoreMetadata(t *testing.T) { if err := json.Unmarshal(data, &parsed); err != nil { t.Fatalf("unmarshal metadata.json: %v", err) } - if parsed.SchemaVersion != 2 { - t.Errorf("schema_version: got %d, want 2", parsed.SchemaVersion) + if parsed.SchemaVersion != 3 { + t.Errorf("schema_version: got %d, want 3", parsed.SchemaVersion) } } diff --git a/client/ethrex/dbs_cgo.go b/client/ethrex/dbs_cgo.go index 93e0df09..2282d2be 100644 --- a/client/ethrex/dbs_cgo.go +++ b/client/ethrex/dbs_cgo.go @@ -49,9 +49,11 @@ func ethrexStateCFLevelBaseBytes() uint64 { // ethrexBlockCacheBytes is the shared LRU block cache across all CFs. // -// ethrex's own crates/storage/backend/rocksdb.rs uses 4 GiB. This writer uses -// far less BY DESIGN: a block cache only accelerates reads, and generation is -// write-only until Close()'s CompactRange. Cache size is a process-runtime +// ethrex (crates/storage/backend/rocksdb.rs) defaults to 12 GiB +// (DEFAULT_ROCKSDB_BLOCK_CACHE_SIZE_BYTES, overridable with +// --rocksdb.block-cache-size). This writer uses far less BY DESIGN: a +// block cache only accelerates reads, and generation is write-only +// until Close()'s CompactRange. Cache size is a process-runtime // knob — it does not change a single byte of the produced DB — so mirroring // ethrex here would buy representativeness that does not exist while costing // RAM that demonstrably does. @@ -157,9 +159,10 @@ const ( cfIdxMiscValues = 17 cfIdxExecutionWitnesses = 18 cfIdxBlockAccessLists = 19 + cfIdxBadBlocks = 20 ) -// ethrexDB holds the open grocksdb handle and the 20 CF handles. +// ethrexDB holds the open grocksdb handle and the 21 CF handles. type ethrexDB struct { db *grocksdb.DB cfs []*grocksdb.ColumnFamilyHandle @@ -182,8 +185,9 @@ type ethrexDB struct { // process-runtime knobs that cannot change the compacted output: L0 // compaction triggers (ethrex 4/20/36, maxed here to avoid stalls during // bulk import), state-CF memtables (256 MiB × 4 vs ethrex's 512 MiB × 6 — -// see the state-CF case), and the block cache (512 MiB vs ethrex's 4 GiB — -// see ethrexBlockCacheBytes). Close() runs CompactRange afterward, rewriting +// see the state-CF case), and the block cache (512 MiB vs ethrex's +// 12 GiB default — see ethrexBlockCacheBytes). Close() runs +// CompactRange afterward, rewriting // every SST with the same compression/block/bloom options, so the final // on-disk shape matches ethrex regardless. func openEthrexDB(dbPath string) (*ethrexDB, error) { @@ -210,17 +214,17 @@ func openEthrexDB(dbPath string) (*ethrexDB, error) { return nil, fmt.Errorf("ethrex: mkdir: %w", err) } - // The 20 named ethrex CFs, plus RocksDB's implicit "default" CF appended - // LAST (index 20). RocksDB always creates "default" on a fresh DB, and an + // The 21 named ethrex CFs, plus RocksDB's implicit "default" CF appended + // LAST (index 21). RocksDB always creates "default" on a fresh DB, and an // open call must account for every existing CF or it errors with "you have // to open all column families". Appending it keeps the cfIdx* constants - // (0..19) aligned with Tables; cfs[20] (default) is created but never + // (0..20) aligned with Tables; cfs[21] (default) is created but never // written. Mirrors besu's explicit CFDefault inclusion. cfNames := make([]string, 0, len(ethrexinternal.Tables)+1) cfNames = append(cfNames, ethrexinternal.Tables...) cfNames = append(cfNames, "default") - // Shared 4 GiB LRU block cache across all CFs (ethrex rocksdb.rs). + // Shared LRU block cache across all CFs (see ethrexBlockCacheBytes). cache := grocksdb.NewLRUCache(ethrexBlockCacheBytes) cfOpts := make([]*grocksdb.Options, len(cfNames)) @@ -318,6 +322,10 @@ func openEthrexDB(dbPath string) (*ethrexDB, error) { opts.SetTargetFileSizeBase(256 << 20) bbto.SetBlockSize(32 << 10) default: + // Also covers transaction_locations, whose ethrex arm carries the + // same values plus a merge operator — omitted here: state-actor + // writes no rows there, and a CF created without one reopens + // cleanly with one registered. opts.SetWriteBufferSize(64 << 20) opts.SetMaxWriteBufferNumber(3) opts.SetTargetFileSizeBase(128 << 20) diff --git a/client/ethrex/doc.go b/client/ethrex/doc.go index e5d2880a..44452fae 100644 --- a/client/ethrex/doc.go +++ b/client/ethrex/doc.go @@ -2,7 +2,7 @@ // // # On-disk layout // -// A single RocksDB instance at with 20 column families (Tables in +// A single RocksDB instance at with 21 column families (Tables in // internal/ethrex/constants.go), all declared at open time. CFs written at genesis: // - account_trie_nodes / storage_trie_nodes: MPT structural + leaf-NODE-RLP rows // (storage rows are address-prefixed) @@ -13,7 +13,7 @@ // - headers / bodies / block_numbers / canonical_block_hashes: genesis block // (canonical_block_hashes[0] is the boot gate) // -// Sidecars next to the DB: metadata.json ({"schema_version": 2}, required by +// Sidecars next to the DB: metadata.json ({"schema_version": 3}, required by // ethrex Store::new) and ethrex-genesis.json (for `--network`). // // # Flat-KV (snap-synced-state) layer @@ -33,9 +33,9 @@ // # Pinned releases // // Golden test: byte-exact vs testdata/genesis_dump.json, regenerated at ethrex -// v16.0.0; the state-bearing CFs are byte-identical v13–v16. E2e boot test -// (e2e_test.go) pins the same v16.0.0 image (first release with -// --skip-genesis-validation, lambdaclass/ethrex#6783). +// v23.0.0; the state-bearing CFs are byte-identical v13–v23. E2e boot test +// (e2e_test.go) pins the same v23.0.0 image. --skip-genesis-validation, which +// the boot path requires, landed in v16.0.0 (lambdaclass/ethrex#6783). // // # Build // diff --git a/client/ethrex/e2e_test.go b/client/ethrex/e2e_test.go index 768b10e7..00d6daa0 100644 --- a/client/ethrex/e2e_test.go +++ b/client/ethrex/e2e_test.go @@ -30,10 +30,11 @@ import ( // against, digest-pinned for reproducibility. Override with // ETHREX_IMAGE=ghcr.io/lambdaclass/ethrex: to test a specific release. // -// Official release v16.0.0 (ghcr tag 16.0.0, published 2026-06-08), the first -// stable release >15.0.0 to include --skip-genesis-validation -// (lambdaclass/ethrex#6783, merged 2026-06-04), which the boot phase requires. -const pinnedEthrexImage = "ghcr.io/lambdaclass/ethrex:16.0.0@sha256:1873c36dcda955df9e5209b56e6fe47db67fb26abf00506de7695ba4683a1c5a" +// Official release v23.0.0 (ghcr tag 23.0.0, published 2026-07-27). Boot +// requires --skip-genesis-validation (lambdaclass/ethrex#6783, ≥v16.0.0). +// This pin is also the source of internal/ethrex's Tables and of +// testdata/genesis_dump.json; move all three together. +const pinnedEthrexImage = "ghcr.io/lambdaclass/ethrex:23.0.0@sha256:1cbf2c4b498efcc71dc776a130cf5eed3f15d100896a18f05b6fa426ff0e7fc5" func ethrexImageRef() string { if v := os.Getenv("ETHREX_IMAGE"); v != "" { diff --git a/client/ethrex/run.go b/client/ethrex/run.go index 77d7a7f5..8c5bc2ca 100644 --- a/client/ethrex/run.go +++ b/client/ethrex/run.go @@ -24,7 +24,7 @@ var errNotImplemented = errors.New( // It delegates to the build-tag-gated runImpl: // // - Built with `-tags cgo_ethrex` (Docker only): runImpl in run_cgo.go opens -// one grocksdb instance with 20 column families, drives entitygen → +// one grocksdb instance with 21 column families, drives entitygen → // ethrex.Builder → grocksdb writes, assembles the genesis block. // - Built without the tag (local default): runImpl in run_stub.go returns // errNotImplemented. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 7e58b9c0..28e11352 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -98,7 +98,7 @@ State Actor generates Ethereum state in three phases: │ │ reth: MDBX state tables + RocksDB history + nippy-jar static_files│ │ │ │ besu: single RocksDB w/ 8 Bonsai column families + chainspec.json │ │ │ │ nethermind: 7 RocksDB + flat column DB + parity chainspec sidecar │ │ -│ │ ethrex: single RocksDB w/ 20 CFs + metadata.json + genesis sidecar│ │ +│ │ ethrex: single RocksDB w/ 21 CFs + metadata.json + genesis sidecar│ │ │ │ erigon: Erigon v3 flat .kv snapshots + minimal MDBX │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ └──────────────────────────────────────────────────────────────────────────┘ @@ -227,7 +227,7 @@ configurable worker pool / batch size at the generator level. under `/flat` (the flat backend Nethermind >= 1.39.0 serves); periodic `dirSize` sample (every 100 contracts) drives the target-size stop. - **ethrex** (`client/ethrex/run_cgo.go`): cgo + grocksdb. Single - RocksDB with 20 column families. Account and storage trie nodes + RocksDB with 21 column families. Account and storage trie nodes are encoded via `internal/ethrex`'s path-keyed trie codec (two rows per leaf: one full-path row, one nibble-path row). Writes `metadata.json` + `ethrex-genesis.json` sidecars. Behind the @@ -359,10 +359,10 @@ Today's client adapters: `internal/neth/flat`) that Nethermind ≥ 1.39.0 serves as its flat backend, and a parity-format chainspec sidecar. Behind the `cgo_neth` build tag. - `client/ethrex/` — cgo + grocksdb writer producing a single RocksDB - with 20 column families (full list in `internal/ethrex/constants.go`) + with 21 column families (full list in `internal/ethrex/constants.go`) using ethrex's own path-keyed trie codec (`internal/ethrex/`). Two rows written per leaf (full-path + nibble-path). Sidecars: - `metadata.json` (schema_version=2) and `ethrex-genesis.json` (full + `metadata.json` (schema_version=3) and `ethrex-genesis.json` (full genesis JSON for `ethrex --network `). Behind the `cgo_ethrex` build tag. - `client/erigon/` — cgo + mdbx-go writer producing Erigon v3 flat @@ -399,7 +399,7 @@ state-actor/ │ ├── reth/ # cgo + libmdbx writer (cgo_reth build tag) │ ├── besu/ # cgo + librocksdb writer (cgo_besu build tag) │ ├── nethermind/ # cgo + grocksdb writer (cgo_neth build tag) -│ ├── ethrex/ # cgo + grocksdb writer, 20 CFs (cgo_ethrex build tag) +│ ├── ethrex/ # cgo + grocksdb writer, 21 CFs (cgo_ethrex build tag) │ └── erigon/ # cgo + mdbx-go writer, Erigon v3 flat .kv (cgo_erigon build tag) ├── generator/ # Core generation pipeline + Writer interface ├── genesis/ # Client-neutral chainspec types + builder diff --git a/docs/RUNBOOK.md b/docs/RUNBOOK.md index 68941bf9..27c8f929 100644 --- a/docs/RUNBOOK.md +++ b/docs/RUNBOOK.md @@ -304,12 +304,14 @@ docker run --rm \ **On-disk layout:** -- `/data/` — single RocksDB instance with 20 column families (see `internal/ethrex/constants.go` for the full list) -- `/data/metadata.json` — `{"schema_version": 2}`, required by ethrex `Store::new` +- `/data/` — single RocksDB instance with 21 column families (see `internal/ethrex/constants.go` for the full list) +- `/data/metadata.json` — `{"schema_version": 3}`, required by ethrex `Store::new` - `/data/ethrex-genesis.json` — full genesis JSON; pass via `--network` when booting **Boot path.** ethrex's `add_initial_state` short-circuits when `canonical_block_hashes[0]` already resolves to a matching genesis header hash — state-actor writes that row, so ethrex skips state-trie recomputation at boot. Required boot flags (validated by the e2e suite, Phase 4): `--network `, `--datadir `, `--skip-genesis-validation` (trust the written stateRoot rather than recompute from the empty-alloc sidecar; needs lambdaclass/ethrex#6783, in releases ≥ v16.0.0), and `--syncmode full`. The `--syncmode full` flag is mandatory for engine-driven block production: in the default snap mode ethrex's fork-choice handler returns `SYNCING` with a null `payloadId` for every `engine_forkchoiceUpdated`, so the mock CL can never obtain a payload to build. The pattern follows the besu/nethermind Engine API approach: boot the node, then drive blocks via `engine_forkchoiceUpdated` (ethrex also mandates an authrpc JWT, signed by the driver). +**Memory at boot.** ethrex's shared RocksDB block cache defaults to 12 GiB and holds index + bloom-filter blocks. The cache fills lazily, but on a large DB a memory-capped container can be OOM-killed as it fills — cap it with `--rocksdb.block-cache-size ` on memory-constrained hosts. Boot-side knob only; no bearing on the bytes state-actor writes. + **Verify.** ```bash diff --git a/docs/SKILL.md b/docs/SKILL.md index 0759b1b5..4412155b 100644 --- a/docs/SKILL.md +++ b/docs/SKILL.md @@ -101,7 +101,7 @@ See [`RUNBOOK.md#geth`](RUNBOOK.md#geth) for the boot command, and [`client/geth go run . --db=/tmp/sa-reth --client=reth --target-size=100MB # MDBX + RocksDB + static files go run . --db=/tmp/sa-besu --client=besu --target-size=100MB # single RocksDB, 8 Bonsai CFs go run . --db=/tmp/sa-neth --client=nethermind --target-size=100MB # 7 RocksDB + flat column DB -go run . --db=/tmp/sa-ethrex --client=ethrex --target-size=100MB # single RocksDB, 20 CFs +go run . --db=/tmp/sa-ethrex --client=ethrex --target-size=100MB # single RocksDB, 21 CFs go run . --db=/tmp/sa-erigon --client=erigon --target-size=100MB # Erigon v3 flat .kv snapshots + minimal MDBX ``` diff --git a/internal/ethrex/constants.go b/internal/ethrex/constants.go index 08a1c8ef..aa014ba5 100644 --- a/internal/ethrex/constants.go +++ b/internal/ethrex/constants.go @@ -1,7 +1,7 @@ package ethrex // Column-family names for ethrex's single RocksDB instance. -// Sourced from ethrex store.rs at pinned commit 318ec2888. +// Sourced from ethrex crates/storage/api/tables.rs at v23.0.0. const ( CFChainData = "chain_data" CFAccountCodes = "account_codes" @@ -23,10 +23,13 @@ const ( CFMiscValues = "misc_values" CFExecutionWitnesses = "execution_witnesses" CFBlockAccessLists = "block_access_lists" + CFBadBlocks = "bad_blocks" ) -// Tables is the ordered list of all 20 ethrex column families. -// Order matches ethrex's StorageTable enum for deterministic CF creation. +// Tables is the ordered list of all 21 ethrex column families, matching +// ethrex's TABLES array. It must not run ahead of the boot pin in +// client/ethrex/e2e_test.go: ethrex silently drops any CF absent from +// its own TABLES (drop_obsolete_cfs, warn-only). var Tables = []string{ CFChainData, CFAccountCodes, @@ -48,6 +51,7 @@ var Tables = []string{ CFMiscValues, CFExecutionWitnesses, CFBlockAccessLists, + CFBadBlocks, } // chain_data index keys (RLP of the index byte). @@ -69,8 +73,10 @@ const EmptyCodeHashHex = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfa // i.e. the root of an empty MPT — used as the default storageRoot. const EmptyTrieHashHex = "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" -// StoreSchemaVersion is the value written to metadata.json. -const StoreSchemaVersion = 2 +// StoreSchemaVersion must equal ethrex's STORE_SCHEMA_VERSION +// (crates/storage/lib.rs): lower triggers boot-time migration (which +// rewrites metadata.json); higher is a hard MigrationFailed boot error. +const StoreSchemaVersion = 3 // misc_values keys/values controlling ethrex's flat-key-value (FKV) generator. // On boot the generator reads misc_values["last_written"]: empty = "not diff --git a/internal/ethrex/doc.go b/internal/ethrex/doc.go index e3ace798..5de43a6f 100644 --- a/internal/ethrex/doc.go +++ b/internal/ethrex/doc.go @@ -1,6 +1,6 @@ // Package ethrex implements the trie codec primitives used by ethrex -// (pinned release v15.0.0, lambdaclass/ethrex). The golden fixture is -// byte-identical from v13.0.0 through v15.0.0. +// (pinned release v23.0.0, lambdaclass/ethrex). The golden fixture's +// state-bearing CFs are byte-identical from v13.0.0 through v23.0.0. // // # Two-rows-per-leaf model // diff --git a/internal/ethrex/testdata/gen/README.md b/internal/ethrex/testdata/gen/README.md index 3db2cf24..106ea234 100644 --- a/internal/ethrex/testdata/gen/README.md +++ b/internal/ethrex/testdata/gen/README.md @@ -8,21 +8,29 @@ storage schema changes. ## Pinned release ``` -lambdaclass/ethrex @ v16.0.0 +lambdaclass/ethrex @ v23.0.0 ``` +This is the same pin as the e2e boot image (`client/ethrex/e2e_test.go`) and as +the column-family list in `internal/ethrex/constants.go`. All three move +together. + The state-bearing CFs (`account_trie_nodes`, `storage_trie_nodes`, `account_codes`, `account_code_metadata`) are byte-identical from v13.0.0 -(commit 318ec2888) through v16.0.0 — verified by regenerating at v16 and diffing -against the v15-generated dump (only `chain_data[0x80]` changed, to add -`osakaTime`). v16 bumped `STORE_SCHEMA_VERSION` to 3, but the v2→v3 migration -only rewrites `RECEIPTS`/`TRANSACTION_LOCATIONS` (both empty at genesis), so the -golden CFs are unaffected. v16 also matches the e2e boot pin (e2e_test.go). - -Any ethrex commit that bumps `STORE_SCHEMA_VERSION` or changes the key layout -of `account_trie_nodes`, `storage_trie_nodes`, `account_codes`, or -`account_code_metadata` requires regenerating the dump and re-reviewing the -Go codec in `internal/ethrex/`. +(commit 318ec2888) through v23.0.0, each step verified by regenerating and +diffing against the previous dump. Across that range only two things moved: +`chain_data[0x80]` gained fork fields (`hegotaTime`, introduced upstream in +v21.0.0 via ethrex#6326), and the `bad_blocks` column family arrived in +v22.0.0 (ethrex#6948, empty at genesis). `STORE_SCHEMA_VERSION` reached 3 at +v16 and has not moved since. + +Any ethrex release that bumps `STORE_SCHEMA_VERSION`, adds or removes a column +family, or changes the key layout of `account_trie_nodes`, +`storage_trie_nodes`, `account_codes`, or `account_code_metadata` requires +regenerating the dump and re-reviewing the Go codec in `internal/ethrex/`. +A CF added upstream must also be added to `Tables`; ethrex's +`drop_obsolete_cfs` deletes any CF it finds that its own `TABLES` does not +list, so `Tables` must never run ahead of this pin. ## Steps @@ -31,7 +39,7 @@ Go codec in `internal/ethrex/`. ```sh git clone https://github.com/lambdaclass/ethrex cd ethrex - git checkout v16.0.0 + git checkout v23.0.0 ``` 2. Copy the dump harness into ethrex's examples directory: diff --git a/internal/ethrex/testdata/genesis_dump.json b/internal/ethrex/testdata/genesis_dump.json index 10597566..8a3cf6a8 100644 --- a/internal/ethrex/testdata/genesis_dump.json +++ b/internal/ethrex/testdata/genesis_dump.json @@ -67,6 +67,7 @@ "0xf84d07893635c9adc5dea00000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" ] ], + "bad_blocks": [], "block_access_lists": [], "block_numbers": [ [ @@ -97,7 +98,7 @@ ], [ "0x80", - "0x7b22636861696e4964223a313333372c22686f6d657374656164426c6f636b223a302c2264616f466f726b426c6f636b223a6e756c6c2c2264616f466f726b537570706f7274223a66616c73652c22656970313530426c6f636b223a302c22656970313535426c6f636b223a302c22656970313538426c6f636b223a302c2262797a616e7469756d426c6f636b223a302c22636f6e7374616e74696e6f706c65426c6f636b223a302c2270657465727362757267426c6f636b223a302c22697374616e62756c426c6f636b223a302c226d756972476c6163696572426c6f636b223a6e756c6c2c226265726c696e426c6f636b223a302c226c6f6e646f6e426c6f636b223a302c226172726f77476c6163696572426c6f636b223a6e756c6c2c2267726179476c6163696572426c6f636b223a6e756c6c2c226d657267654e657473706c6974426c6f636b223a302c227368616e6768616954696d65223a302c2263616e63756e54696d65223a302c2270726167756554696d65223a302c227665726b6c6554696d65223a6e756c6c2c226f73616b6154696d65223a302c2262706f3154696d65223a6e756c6c2c2262706f3254696d65223a6e756c6c2c2262706f3354696d65223a6e756c6c2c2262706f3454696d65223a6e756c6c2c2262706f3554696d65223a6e756c6c2c22616d7374657264616d54696d65223a6e756c6c2c227465726d696e616c546f74616c446966666963756c7479223a22307830222c227465726d696e616c546f74616c446966666963756c7479506173736564223a747275652c22626c6f625363686564756c65223a7b2263616e63756e223a7b22626173654665655570646174654672616374696f6e223a333333383437372c226d6178223a362c22746172676574223a337d2c22707261677565223a7b22626173654665655570646174654672616374696f6e223a353030373731362c226d6178223a392c22746172676574223a367d2c226f73616b61223a7b22626173654665655570646174654672616374696f6e223a353030373731362c226d6178223a392c22746172676574223a367d2c2262706f31223a7b22626173654665655570646174654672616374696f6e223a383334363139332c226d6178223a31352c22746172676574223a31307d2c2262706f32223a7b22626173654665655570646174654672616374696f6e223a31313638343637312c226d6178223a32312c22746172676574223a31347d7d2c226465706f736974436f6e747261637441646472657373223a22307830303030303030303231396162353430333536636262383339636265303533303364373730356661222c22656e61626c655665726b6c65417447656e65736973223a66616c73657d" + "0x7b22636861696e4964223a313333372c22686f6d657374656164426c6f636b223a302c2264616f466f726b426c6f636b223a6e756c6c2c2264616f466f726b537570706f7274223a66616c73652c22656970313530426c6f636b223a302c22656970313535426c6f636b223a302c22656970313538426c6f636b223a302c2262797a616e7469756d426c6f636b223a302c22636f6e7374616e74696e6f706c65426c6f636b223a302c2270657465727362757267426c6f636b223a302c22697374616e62756c426c6f636b223a302c226d756972476c6163696572426c6f636b223a6e756c6c2c226265726c696e426c6f636b223a302c226c6f6e646f6e426c6f636b223a302c226172726f77476c6163696572426c6f636b223a6e756c6c2c2267726179476c6163696572426c6f636b223a6e756c6c2c226d657267654e657473706c6974426c6f636b223a302c227368616e6768616954696d65223a302c2263616e63756e54696d65223a302c2270726167756554696d65223a302c227665726b6c6554696d65223a6e756c6c2c226f73616b6154696d65223a302c2262706f3154696d65223a6e756c6c2c2262706f3254696d65223a6e756c6c2c2262706f3354696d65223a6e756c6c2c2262706f3454696d65223a6e756c6c2c2262706f3554696d65223a6e756c6c2c22616d7374657264616d54696d65223a6e756c6c2c226865676f746154696d65223a6e756c6c2c227465726d696e616c546f74616c446966666963756c7479223a22307830222c227465726d696e616c546f74616c446966666963756c7479506173736564223a747275652c22626c6f625363686564756c65223a7b2263616e63756e223a7b22626173654665655570646174654672616374696f6e223a333333383437372c226d6178223a362c22746172676574223a337d2c22707261677565223a7b22626173654665655570646174654672616374696f6e223a353030373731362c226d6178223a392c22746172676574223a367d2c226f73616b61223a7b22626173654665655570646174654672616374696f6e223a353030373731362c226d6178223a392c22746172676574223a367d2c2262706f31223a7b22626173654665655570646174654672616374696f6e223a383334363139332c226d6178223a31352c22746172676574223a31307d2c2262706f32223a7b22626173654665655570646174654672616374696f6e223a31313638343637312c226d6178223a32312c22746172676574223a31347d7d2c226465706f736974436f6e747261637441646472657373223a22307830303030303030303231396162353430333536636262383339636265303533303364373730356661222c22656e61626c655665726b6c65417447656e65736973223a66616c73657d" ] ], "execution_witnesses": [], @@ -151,6 +152,7 @@ "account_codes": 3, "account_flatkeyvalue": 0, "account_trie_nodes": 9, + "bad_blocks": 0, "block_access_lists": 0, "block_numbers": 1, "bodies": 1,