From 44b8c8c578cdb86fcbca9f257590056e65673820 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Thu, 12 Mar 2026 15:43:33 +0100 Subject: [PATCH 01/18] reth: Adapt for celo import --- .../crates/cli/src/commands/init_state.rs | 48 +++++++++++++------ rust/op-reth/crates/primitives/src/celo.rs | 48 +++++++++++++++++++ rust/op-reth/crates/primitives/src/lib.rs | 1 + 3 files changed, 83 insertions(+), 14 deletions(-) create mode 100644 rust/op-reth/crates/primitives/src/celo.rs diff --git a/rust/op-reth/crates/cli/src/commands/init_state.rs b/rust/op-reth/crates/cli/src/commands/init_state.rs index 09e2bd23ab7..d89a46c7c67 100644 --- a/rust/op-reth/crates/cli/src/commands/init_state.rs +++ b/rust/op-reth/crates/cli/src/commands/init_state.rs @@ -2,6 +2,7 @@ use alloy_consensus::Header; use clap::Parser; +use reth_chainspec::EthChainSpec; use reth_cli::chainspec::ChainSpecParser; use reth_cli_commands::common::{AccessRights, CliNodeTypes, Environment}; use reth_db_common::init::init_from_state_dump; @@ -9,6 +10,7 @@ use reth_optimism_chainspec::OpChainSpec; use reth_optimism_primitives::{ OpPrimitives, bedrock::{BEDROCK_HEADER, BEDROCK_HEADER_HASH}, + celo::{CEL2_HEADER, CEL2_HEADER_HASH}, }; use reth_primitives_traits::{SealedHeader, header::HeaderMut}; use reth_provider::{ @@ -18,6 +20,9 @@ use reth_provider::{ use std::{io::BufReader, sync::Arc}; use tracing::info; +/// Celo mainnet chain ID. +const CELO_MAINNET_CHAIN_ID: u64 = 42220; + /// Initializes the database with the genesis block. #[derive(Debug, Parser)] pub struct InitStateCommandOp { @@ -26,9 +31,10 @@ pub struct InitStateCommandOp { /// Specifies whether to initialize the state without relying on OVM or EVM historical data. /// - /// When enabled, and before inserting the state, it creates a dummy chain up to the last OVM - /// block (#105235062) (14GB / 90 seconds). It then, appends the Bedrock block. This is - /// hardcoded for OP mainnet, for other OP chains you will need to pass in a header. + /// When enabled, and before inserting the state, it creates a dummy chain up to the + /// migration block, then appends the migration header. Hardcoded migration headers are + /// available for OP mainnet (Bedrock, block #105235063) and Celo mainnet (Cel2, block + /// #31056500). For other OP chains, a header must be passed in. /// /// - **Note**: **Do not** import receipts and blocks beforehand, or this will fail or be /// ignored. @@ -41,14 +47,22 @@ impl> InitStateCommandOp { pub async fn execute>( mut self, ) -> eyre::Result<()> { - // If using --without-ovm for OP mainnet, handle the special case with hardcoded Bedrock - // header. Otherwise delegate to the base InitStateCommand implementation. if self.without_ovm { if self.init_state.env.chain.is_optimism_mainnet() { - return self.execute_with_bedrock_header::(); + return self.execute_with_migration_header::( + "OP mainnet", + SealedHeader::new(BEDROCK_HEADER, BEDROCK_HEADER_HASH), + ); + } + + if self.init_state.env.chain.chain_id() == CELO_MAINNET_CHAIN_ID { + return self.execute_with_migration_header::( + "Celo mainnet", + SealedHeader::new(CEL2_HEADER, CEL2_HEADER_HASH), + ); } - // For non-mainnet OP chains with --without-ovm, use the base implementation + // For other OP chains with --without-ovm, use the base implementation // by setting the without_evm flag self.init_state.without_evm = true; } @@ -56,13 +70,18 @@ impl> InitStateCommandOp { self.init_state.execute::().await } - /// Execute init-state with hardcoded Bedrock header for OP mainnet. - fn execute_with_bedrock_header< + /// Execute init-state with a hardcoded migration header. + /// + /// Creates a dummy chain up to the block before `migration_header`, appends the migration + /// header, then imports the state dump. + fn execute_with_migration_header< N: CliNodeTypes, >( self, + chain_name: &str, + migration_header: SealedHeader
, ) -> eyre::Result<()> { - info!(target: "reth::cli", "Reth init-state starting for OP mainnet"); + info!(target: "reth::cli", chain_name, "Reth init-state starting"); let env = self.init_state.env.init::(AccessRights::RW)?; let Environment { config, provider_factory, .. } = env; @@ -70,11 +89,12 @@ impl> InitStateCommandOp { let provider_rw = provider_factory.database_provider_rw()?; let last_block_number = provider_rw.last_block_number()?; + let migration_block_number = migration_header.header().number; if last_block_number == 0 { reth_cli_commands::init_state::without_evm::setup_without_evm( &provider_rw, - SealedHeader::new(BEDROCK_HEADER, BEDROCK_HEADER_HASH), + migration_header, |number| { let mut header = Header::default(); header.set_number(number); @@ -85,10 +105,10 @@ impl> InitStateCommandOp { // SAFETY: it's safe to commit static files, since in the event of a crash, they // will be unwound according to database checkpoints. // - // Necessary to commit, so the BEDROCK_HEADER is accessible to provider_rw and - // init_state_dump + // Necessary to commit, so the migration header is accessible to provider_rw and + // init_from_state_dump. static_file_provider.commit()?; - } else if last_block_number > 0 && last_block_number < BEDROCK_HEADER.number { + } else if last_block_number > 0 && last_block_number < migration_block_number { return Err(eyre::eyre!( "Data directory should be empty when calling init-state with --without-ovm." )); diff --git a/rust/op-reth/crates/primitives/src/celo.rs b/rust/op-reth/crates/primitives/src/celo.rs new file mode 100644 index 00000000000..e2fbf49a341 --- /dev/null +++ b/rust/op-reth/crates/primitives/src/celo.rs @@ -0,0 +1,48 @@ +//! Celo L2 migration related data. + +use alloy_consensus::{EMPTY_OMMER_ROOT_HASH, EMPTY_ROOT_HASH, Header}; +use alloy_primitives::{B64, B256, U256, address, b256, bloom, bytes}; + +/// Cel2 migration header hash on Celo Mainnet. +pub const CEL2_HEADER_HASH: B256 = + b256!("0x7586014e20c69b3fa7c9070baf1a7edd95833db57853126f32593b455da2e5c5"); + +/// Cel2 migration header on Celo Mainnet. (`31_056_500`) +pub const CEL2_HEADER: Header = Header { + difficulty: U256::ZERO, + extra_data: bytes!("43656c6f204c32206d6967726174696f6e"), + gas_limit: 50_000_000, + gas_used: 0, + logs_bloom: bloom!( + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ), + nonce: B64::ZERO, + number: 31_056_500, + parent_hash: b256!("0x4ecb0660a3b5e8bba3b3851e8926e9a44d0a61fe141e04c6e3e1c01644ce7c20"), + receipts_root: EMPTY_ROOT_HASH, + state_root: b256!("0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807"), + timestamp: 1_742_957_258, + transactions_root: EMPTY_ROOT_HASH, + ommers_hash: EMPTY_OMMER_ROOT_HASH, + beneficiary: address!("0x4200000000000000000000000000000000000011"), + withdrawals_root: Some(EMPTY_ROOT_HASH), + mix_hash: B256::ZERO, + base_fee_per_gas: Some(0x5d240390e), + blob_gas_used: Some(0), + excess_blob_gas: Some(0), + parent_beacon_block_root: Some(b256!("0x6cb2e365f9d78b9071b90e8a1f4675d378cd0867b858571dc1b172ef1d3e085c")), + requests_hash: None, +}; + +/// Cel2 migration total difficulty on Celo Mainnet. +pub const CEL2_HEADER_TTD: U256 = U256::ZERO; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_cel2_header() { + assert_eq!(CEL2_HEADER.hash_slow(), CEL2_HEADER_HASH); + } +} diff --git a/rust/op-reth/crates/primitives/src/lib.rs b/rust/op-reth/crates/primitives/src/lib.rs index 0664732f2a7..a0bc633fb4c 100644 --- a/rust/op-reth/crates/primitives/src/lib.rs +++ b/rust/op-reth/crates/primitives/src/lib.rs @@ -12,6 +12,7 @@ extern crate alloc; pub mod bedrock; +pub mod celo; // Re-export predeploys from op-alloy-consensus pub use op_alloy_consensus::L2_TO_L1_MESSAGE_PASSER_ADDRESS; From a0a55ddc5c2fd663cca0fc426812760e9cf998e0 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Thu, 19 Mar 2026 13:06:07 +0100 Subject: [PATCH 02/18] reth: Add Celo migration state dump preparation script and docs Add a script to append L2 allocs (OP Stack predeploys injected at migration time) to the Celo L1 state dump for use with reth's init-state --without-ovm command. Also add migration documentation describing the full import workflow. Co-Authored-By: Claude Opus 4.6 (1M context) --- rust/op-reth/CELO_MIGRATION.md | 82 +++++++++++++++++++++ scripts/append_l2_allocs.py | 129 +++++++++++++++++++++++++++++++++ 2 files changed, 211 insertions(+) create mode 100644 rust/op-reth/CELO_MIGRATION.md create mode 100755 scripts/append_l2_allocs.py diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md new file mode 100644 index 00000000000..96318b15143 --- /dev/null +++ b/rust/op-reth/CELO_MIGRATION.md @@ -0,0 +1,82 @@ +# Celo L2 Migration: reth State Import + +This document describes how to initialize an op-reth node with the Celo L1 state dump for the Cel2 migration. + +## Overview + +The Celo L2 migration imports the full Celo L1 state (pre-migration) into reth at migration block `31,056,500`. The state dump contains all existing Celo L1 accounts, and the L2 allocs (OP Stack predeploys and Celo-specific contracts injected at migration time) must be appended to it. + +## Prerequisites + +- The Celo L1 state dump file (`celo-l1-dump-final-state.json`, ~50GB JSONL) +- A built `op-reth` binary with the Celo migration header support (branch `palango/reth-import`) +- A Celo chain spec file + +## Step 1: Prepare the State Dump + +The state dump contains Celo L1 accounts but is missing the L2 allocs (OP Stack predeploys, bridge contracts, etc.) that are injected during the migration. These must be appended. + +The L2 allocs are published at: +https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json + +Run the script to download the allocs and append them to a copy of the state dump: + +```bash +python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json +``` + +This creates `/path/to/celo-l1-dump-final-state.json.with-allocs.jsonl` without modifying the original. You can also specify a custom output path: + +```bash +python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json /path/to/output.jsonl +``` + +Since reth verifies the state root on line 1 of the dump against the migration header's state root, and the L1 dump's root doesn't include the L2 allocs, you may need to update it: + +```bash +python3 scripts/append_l2_allocs.py --update-state-root /path/to/celo-l1-dump-final-state.json +``` + +### State dump format + +The dump is JSONL with: +- Line 1: `{"root": "0x..."}` — the expected state root +- Lines 2+: one account per line with `address`, `balance`, `nonce`, `code`, `storage` fields (extra fields like `root`, `codeHash`, `key` from the L1 dump are ignored) + +The state root in the dump file is the pre-allocs L1 state root. The `CEL2_HEADER.state_root` (`0xed980641...`) is the final state root that includes both the L1 state and the L2 allocs — this is what reth will verify against after importing. + +## Step 2: Initialize reth + +Run `op-reth init-state` with the `--without-ovm` flag and the prepared state dump: + +```bash +op-reth init-state \ + --chain /path/to/celo-chainspec.json \ + --without-ovm \ + /path/to/celo-l1-dump-final-state.json.with-allocs.jsonl +``` + +The `--without-ovm` flag with Celo mainnet chain ID (`42220`) will: + +1. Create a dummy chain up to block `31,056,499` +2. Append the hardcoded Cel2 migration header at block `31,056,500` +3. Import all accounts from the state dump +4. Compute the state root and verify it matches the migration header + +## Network Config & Assets + +All Celo mainnet migration artifacts are available at: + +| Asset | URL | +|-------|-----| +| Deploy config | https://storage.googleapis.com/cel2-rollup-files/celo/config.json | +| L1 contract addresses | https://storage.googleapis.com/cel2-rollup-files/celo/deployment-l1.json | +| L2 allocs | https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json | +| Rollup config | https://storage.googleapis.com/cel2-rollup-files/celo/rollup.json | +| Genesis (snap sync) | https://storage.googleapis.com/cel2-rollup-files/celo/genesis.json | +| Migrated chaindata | https://storage.googleapis.com/cel2-rollup-files/celo/celo-mainnet-migrated-chaindata.tar.zst | + +## Open Questions + +- The state dump has decimal balance strings (e.g. `"157500000000000"`) and storage values without `0x` prefix — needs verification that reth's deserializer handles these correctly. +- The state root on line 1 of the dump (`0x3817f877...`) differs from `CEL2_HEADER.state_root` (`0xed980641...`). The header state root should be the final root after all accounts (including L2 allocs) are imported. Need to confirm whether reth verifies against the dump's line-1 root or the header's root. diff --git a/scripts/append_l2_allocs.py b/scripts/append_l2_allocs.py new file mode 100755 index 00000000000..0566c143c31 --- /dev/null +++ b/scripts/append_l2_allocs.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +"""Appends Celo L2 migration allocs to a reth state dump for use with `init-state --without-ovm`. + +Downloads l2-allocs.json (the accounts injected during the Cel2 migration) and appends them +to a copy of the state dump JSONL file. The original file is never modified. + +The state dump format expected by reth's `init_from_state_dump` is: + - Line 1: {"root": "0x..."} (state root) + - Lines 2+: {"address": "0x...", "balance": "0x0", "nonce": 1, "code": "0x...", "storage": {...}} + +The Cel2 migration header's state_root already accounts for these alloc entries being present. + +Usage: + python3 append_l2_allocs.py [output.jsonl] [--update-state-root] + +If output path is omitted, creates .with-allocs.jsonl. +Use --update-state-root to replace the state root on line 1 with the Cel2 migration header root. +""" + +import argparse +import json +import os +import shutil +import sys +import urllib.request + +L2_ALLOCS_URL = "https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json" + +# Cel2 migration header state root (includes both L1 state and L2 allocs). +CEL2_STATE_ROOT = "0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807" + + +def replace_state_root(path, new_root): + """Replace the state root on line 1 of a JSONL state dump file in place.""" + with open(path, "rb") as f: + first_line = f.readline() + + header = json.loads(first_line) + old_root = header["root"] + print(f"Replacing state root: {old_root} -> {new_root}") + + header["root"] = new_root + new_first_line = json.dumps(header, separators=(",", ":")).encode() + b"\n" + + print(f"Old first line: {first_line}") + print(f"New first line: {new_first_line}") + if len(new_first_line) != len(first_line): + print( + f"Error: new header is {len(new_first_line)} bytes but original is " + f"{len(first_line)} bytes. In-place replacement requires matching byte " + f"lengths. Pad or adjust the header manually.", + file=sys.stderr, + ) + sys.exit(1) + + with open(path, "r+b") as f: + f.write(new_first_line) + + +def main(): + parser = argparse.ArgumentParser( + description="Append Celo L2 migration allocs to a reth state dump." + ) + parser.add_argument("state_dump", help="Path to the state dump JSONL file") + parser.add_argument( + "output", + nargs="?", + help="Output path (default: .with-allocs.jsonl)", + ) + parser.add_argument( + "--update-state-root", + action="store_true", + help="Replace the state root on line 1 with the Cel2 migration header state root", + ) + args = parser.parse_args() + + state_dump_path = args.state_dump + output_path = args.output or state_dump_path + ".with-allocs.jsonl" + + if not os.path.exists(state_dump_path): + print(f"Error: {state_dump_path} does not exist", file=sys.stderr) + sys.exit(1) + + total_bytes = os.path.getsize(state_dump_path) + copied_bytes = 0 + chunk_size = 64 * 1024 * 1024 # 64MB + print( + f"Copying {state_dump_path} to {output_path} ({total_bytes / (1024**3):.1f} GB)..." + ) + with open(state_dump_path, "rb") as src, open(output_path, "wb") as dst: + while True: + chunk = src.read(chunk_size) + if not chunk: + break + dst.write(chunk) + copied_bytes += len(chunk) + print( + f"\r {copied_bytes / (1024**3):.1f} / {total_bytes / (1024**3):.1f} GB", + end="", + flush=True, + ) + shutil.copystat(state_dump_path, output_path) + print() + + print(f"Downloading l2-allocs.json from {L2_ALLOCS_URL}...") + with urllib.request.urlopen(L2_ALLOCS_URL) as resp: + allocs = json.load(resp) + + print(f"Appending {len(allocs)} accounts to {output_path}...") + with open(output_path, "a") as out: + for address, account in allocs.items(): + entry = {"address": address} + entry["balance"] = account.get("balance", "0x0") + if "nonce" in account: + entry["nonce"] = account["nonce"] + if "code" in account: + entry["code"] = account["code"] + if "storage" in account: + entry["storage"] = account["storage"] + out.write(json.dumps(entry) + "\n") + + if args.update_state_root: + replace_state_root(output_path, CEL2_STATE_ROOT) + + print("Done.") + + +if __name__ == "__main__": + main() From 773d357d618afbabf2651d0f0007395562152fc0 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Wed, 25 Mar 2026 12:18:13 +0100 Subject: [PATCH 03/18] reth: Add script for checking dump --- scripts/check_dump_addresses.py | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 scripts/check_dump_addresses.py diff --git a/scripts/check_dump_addresses.py b/scripts/check_dump_addresses.py new file mode 100755 index 00000000000..19e9d14f5c5 --- /dev/null +++ b/scripts/check_dump_addresses.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +"""Check a JSONL state dump for lines missing the 'address' field.""" + +import json +import os +import sys + + +def main(): + if len(sys.argv) != 2: + print(f"Usage: {sys.argv[0]} ", file=sys.stderr) + sys.exit(1) + + path = sys.argv[1] + total_size = os.path.getsize(path) + bytes_read = 0 + last_pct = -1 + + with open(path) as f: + for i, line in enumerate(f, start=1): + bytes_read += len(line.encode()) + pct = int(bytes_read * 100 / total_size) + if pct != last_pct: + print(f"\r {pct}% ({i:,} lines)", end="", flush=True, file=sys.stderr) + last_pct = pct + line = line.strip() + if not line: + continue + try: + entry = json.loads(line) + except json.JSONDecodeError as e: + print(f"Line {i}: INVALID JSON: {e}") + print(f" Content: {line[:200]}") + continue + + if "address" not in entry: + if "key" in entry: + print(f"\nLine {i}: missing 'address' field (key: {entry['key']})") + else: + print(f"\nLine {i}: missing 'address' field, no key either") + print(f" Keys: {list(entry.keys())}") + print(f" Content: {line[:200]}") + + print(f"\nDone. Checked {i:,} lines.", file=sys.stderr) + + +if __name__ == "__main__": + main() From af5967fb753edc74a86556a5a0909e1890d3b702 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 11:47:51 +0200 Subject: [PATCH 04/18] reth: Add zero address fix script and update migration docs The L1 state dump omits the address field for the zero address, replacing it with the keccak256 hash as a key field. Add a script to fix this in place and document it as a required step. Also clarify that --update-state-root is required (not optional) and resolve open questions about decimal balances and nonce formats. --- rust/op-reth/CELO_MIGRATION.md | 39 +++++++++++++++++++------------- scripts/fix_dump_zero_address.sh | 26 +++++++++++++++++++++ 2 files changed, 49 insertions(+), 16 deletions(-) create mode 100755 scripts/fix_dump_zero_address.sh diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md index 96318b15143..6e15e8aead6 100644 --- a/rust/op-reth/CELO_MIGRATION.md +++ b/rust/op-reth/CELO_MIGRATION.md @@ -12,40 +12,48 @@ The Celo L2 migration imports the full Celo L1 state (pre-migration) into reth a - A built `op-reth` binary with the Celo migration header support (branch `palango/reth-import`) - A Celo chain spec file -## Step 1: Prepare the State Dump +## Step 1: Fix the Zero Address Entry + +The L1 state dump has a bug where the zero address (`0x0000000000000000000000000000000000000000`) is missing its `address` field and instead has a `key` field containing the keccak256 hash of the address. This must be fixed before import. + +```bash +./scripts/fix_dump_zero_address.sh /path/to/celo-l1-dump-final-state.json +``` + +This modifies the file in place. + +You can verify the fix with `scripts/check_dump_addresses.py`. + +## Step 2: Prepare the State Dump The state dump contains Celo L1 accounts but is missing the L2 allocs (OP Stack predeploys, bridge contracts, etc.) that are injected during the migration. These must be appended. The L2 allocs are published at: https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json -Run the script to download the allocs and append them to a copy of the state dump: +Run the script to download the allocs and append them to a copy of the state dump. The `--update-state-root` flag is **required**: reth verifies that the state root on line 1 of the dump matches `CEL2_HEADER.state_root`, and the original L1 dump root (`0x3817f877...`) does not include the L2 allocs. ```bash -python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json +python3 scripts/append_l2_allocs.py --update-state-root /path/to/celo-l1-dump-final-state.json ``` This creates `/path/to/celo-l1-dump-final-state.json.with-allocs.jsonl` without modifying the original. You can also specify a custom output path: ```bash -python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json /path/to/output.jsonl -``` - -Since reth verifies the state root on line 1 of the dump against the migration header's state root, and the L1 dump's root doesn't include the L2 allocs, you may need to update it: - -```bash -python3 scripts/append_l2_allocs.py --update-state-root /path/to/celo-l1-dump-final-state.json +python3 scripts/append_l2_allocs.py --update-state-root /path/to/celo-l1-dump-final-state.json /path/to/output.jsonl ``` ### State dump format The dump is JSONL with: -- Line 1: `{"root": "0x..."}` — the expected state root -- Lines 2+: one account per line with `address`, `balance`, `nonce`, `code`, `storage` fields (extra fields like `root`, `codeHash`, `key` from the L1 dump are ignored) +- Line 1: `{"root": "0x..."}` — must match `CEL2_HEADER.state_root` (reth checks this before importing) +- Lines 2+: one account per line with `address`, `balance`, `nonce`, `code`, `storage` fields + +Extra fields from the L1 dump (`root`, `codeHash`) are silently ignored due to serde `flatten` behavior. Balance can be a decimal string (e.g. `"157500000000000"`) or hex (`"0x..."`). Nonce can be a JSON integer or hex string. -The state root in the dump file is the pre-allocs L1 state root. The `CEL2_HEADER.state_root` (`0xed980641...`) is the final state root that includes both the L1 state and the L2 allocs — this is what reth will verify against after importing. +After importing all accounts, reth computes the state root from the trie and verifies it also matches `CEL2_HEADER.state_root` (`0xed980641...`). -## Step 2: Initialize reth +## Step 3: Initialize reth Run `op-reth init-state` with the `--without-ovm` flag and the prepared state dump: @@ -78,5 +86,4 @@ All Celo mainnet migration artifacts are available at: ## Open Questions -- The state dump has decimal balance strings (e.g. `"157500000000000"`) and storage values without `0x` prefix — needs verification that reth's deserializer handles these correctly. -- The state root on line 1 of the dump (`0x3817f877...`) differs from `CEL2_HEADER.state_root` (`0xed980641...`). The header state root should be the final root after all accounts (including L2 allocs) are imported. Need to confirm whether reth verifies against the dump's line-1 root or the header's root. +- The state dump may have storage values without `0x` prefix — needs verification that reth's `Bytes` deserializer handles non-prefixed hex strings correctly. diff --git a/scripts/fix_dump_zero_address.sh b/scripts/fix_dump_zero_address.sh new file mode 100755 index 00000000000..f66cf6c6fab --- /dev/null +++ b/scripts/fix_dump_zero_address.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Fix the zero address entry in the Celo L1 state dump. +# +# The dump tool omits the "address" field for the zero address +# (0x0000000000000000000000000000000000000000) and instead includes +# a "key" field with its keccak256 hash. This replaces the "key" +# with the correct "address" field. + +set -euo pipefail + +if [ $# -ne 1 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +input="$1" + +if [ ! -f "$input" ]; then + echo "Error: file not found: $input" >&2 + exit 1 +fi + +sed -i '' 's/"key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"/"address":"0x0000000000000000000000000000000000000000"/' \ + "$input" + +echo "Fixed zero address in: $input" From 0607850792d535965f61b08df2051548135b3397 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 12:30:44 +0200 Subject: [PATCH 05/18] reth: Always update state root, add ulimit hint, improve fix script Remove --update-state-root flag from append_l2_allocs.py since the state root update is required for reth import. Add before/after output to fix_dump_zero_address.sh. Document ulimit requirement for dummy chain creation. --- rust/op-reth/CELO_MIGRATION.md | 15 +++++++++++---- scripts/append_l2_allocs.py | 13 ++++--------- scripts/fix_dump_zero_address.sh | 16 +++++++++++++--- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md index 6e15e8aead6..f1967884cb4 100644 --- a/rust/op-reth/CELO_MIGRATION.md +++ b/rust/op-reth/CELO_MIGRATION.md @@ -31,16 +31,16 @@ The state dump contains Celo L1 accounts but is missing the L2 allocs (OP Stack The L2 allocs are published at: https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json -Run the script to download the allocs and append them to a copy of the state dump. The `--update-state-root` flag is **required**: reth verifies that the state root on line 1 of the dump matches `CEL2_HEADER.state_root`, and the original L1 dump root (`0x3817f877...`) does not include the L2 allocs. +Run the script to download the allocs and append them to a copy of the state dump. The script also updates the state root on line 1 to match `CEL2_HEADER.state_root`, which reth verifies before importing. ```bash -python3 scripts/append_l2_allocs.py --update-state-root /path/to/celo-l1-dump-final-state.json +python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json ``` This creates `/path/to/celo-l1-dump-final-state.json.with-allocs.jsonl` without modifying the original. You can also specify a custom output path: ```bash -python3 scripts/append_l2_allocs.py --update-state-root /path/to/celo-l1-dump-final-state.json /path/to/output.jsonl +python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json /path/to/output.jsonl ``` ### State dump format @@ -55,11 +55,18 @@ After importing all accounts, reth computes the state root from the trie and ver ## Step 3: Initialize reth -Run `op-reth init-state` with the `--without-ovm` flag and the prepared state dump: +The dummy chain creation opens many static file segments. Increase the file descriptor limit before running: + +```bash +ulimit -n 10240 +``` + +Then run `op-reth init-state` with the `--without-ovm` flag and the prepared state dump: ```bash op-reth init-state \ --chain /path/to/celo-chainspec.json \ + --datadir=/path/to/datadir \ --without-ovm \ /path/to/celo-l1-dump-final-state.json.with-allocs.jsonl ``` diff --git a/scripts/append_l2_allocs.py b/scripts/append_l2_allocs.py index 0566c143c31..db6a8a19d48 100755 --- a/scripts/append_l2_allocs.py +++ b/scripts/append_l2_allocs.py @@ -11,10 +11,11 @@ The Cel2 migration header's state_root already accounts for these alloc entries being present. Usage: - python3 append_l2_allocs.py [output.jsonl] [--update-state-root] + python3 append_l2_allocs.py [output.jsonl] If output path is omitted, creates .with-allocs.jsonl. -Use --update-state-root to replace the state root on line 1 with the Cel2 migration header root. +The state root on line 1 is replaced with the Cel2 migration header root, since reth +verifies it against CEL2_HEADER.state_root before importing. """ import argparse @@ -67,11 +68,6 @@ def main(): nargs="?", help="Output path (default: .with-allocs.jsonl)", ) - parser.add_argument( - "--update-state-root", - action="store_true", - help="Replace the state root on line 1 with the Cel2 migration header state root", - ) args = parser.parse_args() state_dump_path = args.state_dump @@ -119,8 +115,7 @@ def main(): entry["storage"] = account["storage"] out.write(json.dumps(entry) + "\n") - if args.update_state_root: - replace_state_root(output_path, CEL2_STATE_ROOT) + replace_state_root(output_path, CEL2_STATE_ROOT) print("Done.") diff --git a/scripts/fix_dump_zero_address.sh b/scripts/fix_dump_zero_address.sh index f66cf6c6fab..7a060e4a7df 100755 --- a/scripts/fix_dump_zero_address.sh +++ b/scripts/fix_dump_zero_address.sh @@ -20,7 +20,17 @@ if [ ! -f "$input" ]; then exit 1 fi -sed -i '' 's/"key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"/"address":"0x0000000000000000000000000000000000000000"/' \ - "$input" +old='"key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"' +new='"address":"0x0000000000000000000000000000000000000000"' -echo "Fixed zero address in: $input" +before=$(grep -m 1 "$old" "$input") +if [ -z "$before" ]; then + echo "Error: zero address entry not found in dump" >&2 + exit 1 +fi + +echo "Before: $before" + +sed -i '' "s/${old}/${new}/" "$input" + +echo "After: ${before/$old/$new}" From f3048bb3bcf978cbaa0b3a67b43194fe3ed97361 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 14:46:55 +0200 Subject: [PATCH 06/18] reth: Add L1 state dump download and decompress instructions --- rust/op-reth/CELO_MIGRATION.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md index f1967884cb4..52e789391a5 100644 --- a/rust/op-reth/CELO_MIGRATION.md +++ b/rust/op-reth/CELO_MIGRATION.md @@ -8,10 +8,21 @@ The Celo L2 migration imports the full Celo L1 state (pre-migration) into reth a ## Prerequisites -- The Celo L1 state dump file (`celo-l1-dump-final-state.json`, ~50GB JSONL) - A built `op-reth` binary with the Celo migration header support (branch `palango/reth-import`) - A Celo chain spec file +## Step 0: Download and Decompress the L1 State Dump + +The compressed state dump (~5GB zstd) is available at: +https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst + +Download and decompress (~50GB JSONL): + +```bash +curl -O https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst +zstd -d l1-final-state.json.zst +``` + ## Step 1: Fix the Zero Address Entry The L1 state dump has a bug where the zero address (`0x0000000000000000000000000000000000000000`) is missing its `address` field and instead has a `key` field containing the keccak256 hash of the address. This must be fixed before import. @@ -84,6 +95,7 @@ All Celo mainnet migration artifacts are available at: | Asset | URL | |-------|-----| +| L1 state dump | https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst | | Deploy config | https://storage.googleapis.com/cel2-rollup-files/celo/config.json | | L1 contract addresses | https://storage.googleapis.com/cel2-rollup-files/celo/deployment-l1.json | | L2 allocs | https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json | From 975b2deceeba8b47ec7ce53cd8c1326c4c11b426 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 15:17:31 +0200 Subject: [PATCH 07/18] reth: Add wrapper script for Celo import pipeline --- scripts/fix_dump_zero_address.sh | 6 ++-- scripts/prepare_celo_import.sh | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100755 scripts/prepare_celo_import.sh diff --git a/scripts/fix_dump_zero_address.sh b/scripts/fix_dump_zero_address.sh index 7a060e4a7df..406e195704e 100755 --- a/scripts/fix_dump_zero_address.sh +++ b/scripts/fix_dump_zero_address.sh @@ -23,10 +23,10 @@ fi old='"key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"' new='"address":"0x0000000000000000000000000000000000000000"' -before=$(grep -m 1 "$old" "$input") +before=$(grep -m 1 "$old" "$input" || true) if [ -z "$before" ]; then - echo "Error: zero address entry not found in dump" >&2 - exit 1 + echo "Already fixed or pattern not found, skipping." + exit 0 fi echo "Before: $before" diff --git a/scripts/prepare_celo_import.sh b/scripts/prepare_celo_import.sh new file mode 100755 index 00000000000..c438f1982d1 --- /dev/null +++ b/scripts/prepare_celo_import.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# Prepare and run the Celo L1 state import into op-reth. +# See rust/op-reth/CELO_MIGRATION.md for details. + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +DUMP_URL="https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst" + +if [ $# -ne 3 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +workdir="$1" +chain_spec="$2" +datadir="$3" + +if [ ! -f "$chain_spec" ]; then + echo "Error: chain spec not found: $chain_spec" >&2 + exit 1 +fi + +mkdir -p "$workdir" +dump_zst="$workdir/l1-final-state.json.zst" +dump="$workdir/l1-final-state.json" +dump_allocs="$dump.with-allocs.jsonl" + +# Step 0: Download and decompress +if [ ! -f "$dump" ]; then + if [ ! -f "$dump_zst" ]; then + echo "==> Downloading L1 state dump..." + curl -o "$dump_zst" "$DUMP_URL" + fi + echo "==> Decompressing..." + zstd -d "$dump_zst" +else + echo "==> L1 state dump already exists: $dump" +fi + +# Step 1: Fix zero address +echo "==> Fixing zero address entry..." +"$SCRIPT_DIR/fix_dump_zero_address.sh" "$dump" + +# Step 2: Append L2 allocs and update state root +if [ ! -f "$dump_allocs" ]; then + echo "==> Appending L2 allocs..." + python3 "$SCRIPT_DIR/append_l2_allocs.py" "$dump" +else + echo "==> Allocs file already exists: $dump_allocs" +fi + +# Step 3: Initialize reth +echo "==> Initializing reth (ulimit -n 10240)..." +ulimit -n 10240 +op-reth init-state \ + --chain "$chain_spec" \ + --datadir="$datadir" \ + --without-ovm \ + "$dump_allocs" + +echo "==> Done." From d7a3214728b55b03ed7280a3a7d2254d6e6da049 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 18:57:53 +0200 Subject: [PATCH 08/18] reth: Use perl for portable in-place edit in fix script sed -i has incompatible syntax between macOS and Linux, and GNU sed fails with "regex input buffer length larger than INT_MAX" on the 50GB dump file. Switch to perl -i which works on both platforms. --- scripts/fix_dump_zero_address.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fix_dump_zero_address.sh b/scripts/fix_dump_zero_address.sh index 406e195704e..1b26f259278 100755 --- a/scripts/fix_dump_zero_address.sh +++ b/scripts/fix_dump_zero_address.sh @@ -31,6 +31,6 @@ fi echo "Before: $before" -sed -i '' "s/${old}/${new}/" "$input" +perl -i -pe "s/\Q${old}\E/${new}/" "$input" echo "After: ${before/$old/$new}" From 99d72b83a0ffa11a16b3f8556c5f80abc671c11b Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 19:04:08 +0200 Subject: [PATCH 09/18] reth: Enable storage v2, use builtin celo chain spec --- rust/op-reth/CELO_MIGRATION.md | 22 +++++++++++++++++++++- scripts/prepare_celo_import.sh | 14 ++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md index 52e789391a5..b883a4ccceb 100644 --- a/rust/op-reth/CELO_MIGRATION.md +++ b/rust/op-reth/CELO_MIGRATION.md @@ -76,7 +76,7 @@ Then run `op-reth init-state` with the `--without-ovm` flag and the prepared sta ```bash op-reth init-state \ - --chain /path/to/celo-chainspec.json \ + --chain celo \ --datadir=/path/to/datadir \ --without-ovm \ /path/to/celo-l1-dump-final-state.json.with-allocs.jsonl @@ -106,3 +106,23 @@ All Celo mainnet migration artifacts are available at: ## Open Questions - The state dump may have storage values without `0x` prefix — needs verification that reth's `Bytes` deserializer handles non-prefixed hex strings correctly. + +## Logs + +From run Mon, 13 April + +``` +~/P/optimism (palango/reth-import) $ ./scripts/fix_dump_zero_address.sh ~/Downloads/l1-final-state.json +Before: {"balance":"324222713619168179923","nonce":0,"root":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"} +After: {"balance":"324222713619168179923","nonce":0,"root":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","address":"0x0000000000000000000000000000000000000000"} +mise WARN missing: golangci-lint@2.8.0 rust@1.92.0 op-acceptor@op-acceptor/v3.8.3 +~/P/optimism (palango/reth-import) $ python3 ./scripts/append_l2_allocs.py --update-state-root ~/Downloads/l1-final-state.json +Copying /Users/paul/Downloads/l1-final-state.json to /Users/paul/Downloads/l1-final-state.json.with-allocs.jsonl (45.8 GB)... + 45.8 / 45.8 GB +Downloading l2-allocs.json from https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json... +Appending 2080 accounts to /Users/paul/Downloads/l1-final-state.json.with-allocs.jsonl... +Replacing state root: 0x3817f87742aaeb96219d6c1fed8b32a562b59065116c49a53693abfd118838bc -> 0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 +Old first line: b'{"root":"0x3817f87742aaeb96219d6c1fed8b32a562b59065116c49a53693abfd118838bc"}\n' +New first line: b'{"root":"0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807"}\n' +Done. +``` diff --git a/scripts/prepare_celo_import.sh b/scripts/prepare_celo_import.sh index c438f1982d1..fdf8a1fbbdc 100755 --- a/scripts/prepare_celo_import.sh +++ b/scripts/prepare_celo_import.sh @@ -7,19 +7,13 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" DUMP_URL="https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst" -if [ $# -ne 3 ]; then - echo "Usage: $0 " >&2 +if [ $# -ne 2 ]; then + echo "Usage: $0 " >&2 exit 1 fi workdir="$1" -chain_spec="$2" -datadir="$3" - -if [ ! -f "$chain_spec" ]; then - echo "Error: chain spec not found: $chain_spec" >&2 - exit 1 -fi +datadir="$2" mkdir -p "$workdir" dump_zst="$workdir/l1-final-state.json.zst" @@ -54,7 +48,7 @@ fi echo "==> Initializing reth (ulimit -n 10240)..." ulimit -n 10240 op-reth init-state \ - --chain "$chain_spec" \ + --chain celo \ --datadir="$datadir" \ --without-ovm \ "$dump_allocs" From d410ff31e28d3e5c2bd5b9ef5fa898e8abaef61c Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Tue, 14 Apr 2026 11:48:04 +0200 Subject: [PATCH 10/18] reth: Apply alloc merge logic and treasury balance in state dump preparation The append_l2_allocs.py script was naively appending L2 allocs to the L1 dump, causing a state root mismatch. Rewrite it to apply the same merge rules as the Go migration (applyAllocsToState + setupUnreleasedTreasury): allowlist-based account merging, treasury balance computation, and the zero address fix (absorbing fix_dump_zero_address.sh). Co-Authored-By: Claude Opus 4.6 (1M context) --- rust/op-reth/CELO_MIGRATION.md | 220 ++++++++++++++++++--- scripts/append_l2_allocs.py | 316 ++++++++++++++++++++++++------- scripts/fix_dump_zero_address.sh | 36 ---- 3 files changed, 442 insertions(+), 130 deletions(-) delete mode 100755 scripts/fix_dump_zero_address.sh diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md index b883a4ccceb..b316e8c7b29 100644 --- a/rust/op-reth/CELO_MIGRATION.md +++ b/rust/op-reth/CELO_MIGRATION.md @@ -23,35 +23,23 @@ curl -O https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.jso zstd -d l1-final-state.json.zst ``` -## Step 1: Fix the Zero Address Entry +## Step 1: Prepare the State Dump -The L1 state dump has a bug where the zero address (`0x0000000000000000000000000000000000000000`) is missing its `address` field and instead has a `key` field containing the keccak256 hash of the address. This must be fixed before import. +The L1 state dump must be merged with the L2 migration allocs before import. The merge script applies the same logic as the Go migration (`applyAllocsToState` + `setupUnreleasedTreasury`): -```bash -./scripts/fix_dump_zero_address.sh /path/to/celo-l1-dump-final-state.json -``` - -This modifies the file in place. - -You can verify the fix with `scripts/check_dump_addresses.py`. - -## Step 2: Prepare the State Dump - -The state dump contains Celo L1 accounts but is missing the L2 allocs (OP Stack predeploys, bridge contracts, etc.) that are injected during the migration. These must be appended. - -The L2 allocs are published at: -https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json - -Run the script to download the allocs and append them to a copy of the state dump. The script also updates the state root on line 1 to match `CEL2_HEADER.state_root`, which reth verifies before importing. +- Fixes the zero address dump bug (missing `address` field) +- Merges L2 alloc accounts with existing L1 accounts using allowlist rules +- Sets the treasury balance to the post-migration value +- Updates the state root to `CEL2_HEADER.state_root` ```bash -python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json +python3 scripts/append_l2_allocs.py /path/to/l1-final-state.json ``` -This creates `/path/to/celo-l1-dump-final-state.json.with-allocs.jsonl` without modifying the original. You can also specify a custom output path: +This creates `/path/to/l1-final-state.json.with-allocs.jsonl` without modifying the original. You can also specify a custom output path: ```bash -python3 scripts/append_l2_allocs.py /path/to/celo-l1-dump-final-state.json /path/to/output.jsonl +python3 scripts/append_l2_allocs.py /path/to/l1-final-state.json /path/to/output.jsonl ``` ### State dump format @@ -64,7 +52,7 @@ Extra fields from the L1 dump (`root`, `codeHash`) are silently ignored due to s After importing all accounts, reth computes the state root from the trie and verifies it also matches `CEL2_HEADER.state_root` (`0xed980641...`). -## Step 3: Initialize reth +## Step 2: Initialize reth The dummy chain creation opens many static file segments. Increase the file descriptor limit before running: @@ -109,7 +97,7 @@ All Celo mainnet migration artifacts are available at: ## Logs -From run Mon, 13 April +Previous run (Mon 13 April) — state root mismatch, before alloc merge fix: ``` ~/P/optimism (palango/reth-import) $ ./scripts/fix_dump_zero_address.sh ~/Downloads/l1-final-state.json @@ -126,3 +114,189 @@ Old first line: b'{"root":"0x3817f87742aaeb96219d6c1fed8b32a562b59065116c49a5369 New first line: b'{"root":"0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807"}\n' Done. ``` + +``` +paul_lange_clabs_co@paul-reth-import-test:/mnt/ssd/optimism/rust$ ./target/release/op-reth init-state --chain celo --datadir=/mnt/ssd/chain +-data --without-ovm ../../celo/l1-final-state.json.with-allocs.jsonl +2026-04-13T16:42:18.812534Z INFO Initialized tracing, debug log directory: /home/paul_lange_clabs_co/.cache/reth/logs/celo +2026-04-13T16:42:18.815639Z INFO Reth init-state starting chain_name="Celo mainnet" +2026-04-13T16:42:18.820852Z INFO Opening storage db_path="/mnt/ssd/chain-data/db" sf_path="/mnt/ssd/chain-data/static_files" +2026-04-13T16:42:18.831917Z INFO check_consistency{read_only=false}: Verifying storage consistency. +2026-04-13T16:42:18.848072Z INFO Setting up dummy EVM chain before importing state. new_tip=NumHash { number: 31056500, hash: 0x7586014e20c69b3fa7c9070baf1a7edd95833db57853126f32593b455da2e5c5 } +2026-04-13T16:42:56.827581Z INFO Appending first valid block. +2026-04-13T16:42:56.848294Z INFO Set up finished. +2026-04-13T16:42:56.850124Z INFO Initiating state dump +2026-04-13T16:42:59.503582Z INFO parsed_new_accounts=285228 +2026-04-13T16:43:00.123970Z INFO parsed_new_accounts=570456 +2026-04-13T16:43:12.435430Z INFO parsed_new_accounts=855684 +2026-04-13T16:43:13.720443Z INFO parsed_new_accounts=1140912 +2026-04-13T16:43:14.683206Z INFO parsed_new_accounts=1426140 +2026-04-13T16:43:17.947835Z INFO parsed_new_accounts=1711368 +2026-04-13T16:43:28.915803Z INFO parsed_new_accounts=1996596 +2026-04-13T16:43:30.585443Z INFO parsed_new_accounts=2281824 +2026-04-13T16:43:31.989111Z INFO parsed_new_accounts=2567052 +2026-04-13T16:43:32.752545Z INFO parsed_new_accounts=2852280 +2026-04-13T16:43:38.433548Z INFO parsed_new_accounts=3137508 +2026-04-13T16:43:48.029585Z INFO parsed_new_accounts=3422736 +2026-04-13T16:43:49.896711Z INFO parsed_new_accounts=3707964 +2026-04-13T16:43:52.651012Z INFO parsed_new_accounts=3993192 +2026-04-13T16:43:54.843911Z INFO parsed_new_accounts=4278420 +2026-04-13T16:44:00.074544Z INFO parsed_new_accounts=4563648 +2026-04-13T16:44:04.177806Z INFO parsed_new_accounts=4848876 +2026-04-13T16:44:05.611900Z INFO parsed_new_accounts=5134104 +2026-04-13T16:44:11.530471Z INFO parsed_new_accounts=5419332 +2026-04-13T16:44:15.545082Z INFO parsed_new_accounts=5704560 +2026-04-13T16:44:16.486635Z INFO parsed_new_accounts=5989788 +2026-04-13T16:44:22.514600Z INFO parsed_new_accounts=6275016 +2026-04-13T16:44:27.429958Z INFO parsed_new_accounts=6560244 +2026-04-13T16:44:32.588978Z INFO parsed_new_accounts=6845472 +2026-04-13T16:44:35.638466Z INFO parsed_new_accounts=7130700 +2026-04-13T16:44:37.554623Z INFO parsed_new_accounts=7415928 +2026-04-13T16:44:39.176799Z INFO parsed_new_accounts=7701156 +2026-04-13T16:44:41.472247Z INFO parsed_new_accounts=7986384 +2026-04-13T16:44:43.858357Z INFO parsed_new_accounts=8271612 +2026-04-13T16:44:48.757872Z INFO parsed_new_accounts=8556840 +2026-04-13T16:44:52.484596Z INFO parsed_new_accounts=8842068 +2026-04-13T16:44:54.204385Z INFO parsed_new_accounts=9127296 +2026-04-13T16:44:56.270181Z INFO parsed_new_accounts=9412524 +2026-04-13T16:44:57.221695Z INFO parsed_new_accounts=9697752 +2026-04-13T16:45:02.768897Z INFO parsed_new_accounts=9982980 +2026-04-13T16:45:04.131802Z INFO parsed_new_accounts=10268208 +2026-04-13T16:45:05.862055Z INFO parsed_new_accounts=10553436 +2026-04-13T16:45:07.952379Z INFO parsed_new_accounts=10838664 +2026-04-13T16:45:08.844751Z INFO parsed_new_accounts=11123892 +2026-04-13T16:45:27.148172Z INFO parsed_new_accounts=11409120 +2026-04-13T16:45:34.429270Z INFO parsed_new_accounts=11694348 +2026-04-13T16:45:37.374610Z INFO parsed_new_accounts=11979576 +2026-04-13T16:45:41.062672Z INFO parsed_new_accounts=12264804 +2026-04-13T16:45:42.439363Z INFO parsed_new_accounts=12550032 +2026-04-13T16:45:44.713347Z INFO parsed_new_accounts=12835260 +2026-04-13T16:45:47.052955Z INFO parsed_new_accounts=13120488 +2026-04-13T16:45:48.486462Z INFO parsed_new_accounts=13405716 +2026-04-13T16:46:40.782331Z INFO parsed_new_accounts=13690944 +2026-04-13T16:46:41.731557Z INFO parsed_new_accounts=13976172 +2026-04-13T16:46:43.233270Z INFO parsed_new_accounts=14261400 +2026-04-13T16:46:47.344231Z INFO parsed_new_accounts=14546628 +2026-04-13T16:46:52.164761Z INFO parsed_new_accounts=14831856 +2026-04-13T16:46:53.917277Z INFO parsed_new_accounts=15117084 +2026-04-13T16:46:56.287892Z INFO parsed_new_accounts=15402312 +2026-04-13T16:47:03.937836Z INFO parsed_new_accounts=15687540 +2026-04-13T16:47:13.109870Z INFO parsed_new_accounts=15972768 +2026-04-13T16:47:18.574494Z INFO parsed_new_accounts=16257996 +2026-04-13T16:47:20.473239Z INFO parsed_new_accounts=16543224 +2026-04-13T16:47:24.387829Z INFO parsed_new_accounts=16828452 +2026-04-13T16:47:25.282035Z INFO parsed_new_accounts=17113680 +2026-04-13T16:47:28.572755Z INFO parsed_new_accounts=17398908 +2026-04-13T16:47:30.714713Z INFO parsed_new_accounts=17684136 +2026-04-13T16:47:40.000098Z INFO parsed_new_accounts=17969364 +2026-04-13T16:47:43.471973Z INFO parsed_new_accounts=18254592 +2026-04-13T16:47:44.565534Z INFO parsed_new_accounts=18539820 +2026-04-13T16:47:48.171336Z INFO parsed_new_accounts=18825048 +2026-04-13T16:47:53.268887Z INFO parsed_new_accounts=19110276 +2026-04-13T16:47:55.599853Z INFO parsed_new_accounts=19395504 +2026-04-13T16:47:57.916394Z INFO parsed_new_accounts=19680732 +2026-04-13T16:47:58.750556Z INFO parsed_new_accounts=19965960 +2026-04-13T16:48:00.229423Z INFO parsed_new_accounts=20251188 +2026-04-13T16:48:03.678579Z INFO parsed_new_accounts=20536416 +2026-04-13T16:48:06.687550Z INFO parsed_new_accounts=20821644 +2026-04-13T16:48:10.952793Z INFO parsed_new_accounts=21106872 +2026-04-13T16:48:13.010899Z INFO parsed_new_accounts=21392100 +2026-04-13T16:48:16.197875Z INFO parsed_new_accounts=21677328 +2026-04-13T16:48:46.673103Z INFO parsed_new_accounts=21962556 +2026-04-13T16:48:48.736134Z INFO parsed_new_accounts=22247784 +2026-04-13T16:48:52.021656Z INFO parsed_new_accounts=22533012 +2026-04-13T16:48:57.506038Z INFO parsed_new_accounts=22818240 +2026-04-13T16:48:59.110278Z INFO parsed_new_accounts=23103468 +2026-04-13T16:49:01.542361Z INFO parsed_new_accounts=23388696 +2026-04-13T16:49:02.849429Z INFO parsed_new_accounts=23673924 +2026-04-13T16:49:07.178136Z INFO Writing accounts to db total_inserted_accounts=285229 +2026-04-13T16:49:17.500647Z INFO Writing accounts to db total_inserted_accounts=570457 +2026-04-13T16:49:28.108600Z INFO Writing accounts to db total_inserted_accounts=855685 +2026-04-13T16:50:03.923589Z INFO Writing accounts to db total_inserted_accounts=1140913 +2026-04-13T16:52:35.831660Z INFO Writing accounts to db total_inserted_accounts=1426141 +2026-04-13T16:52:45.883713Z INFO Writing accounts to db total_inserted_accounts=1711369 +2026-04-13T16:52:59.472283Z INFO Writing accounts to db total_inserted_accounts=1996597 +2026-04-13T16:53:08.372623Z INFO Writing accounts to db total_inserted_accounts=2281825 +2026-04-13T16:53:14.781745Z INFO Writing accounts to db total_inserted_accounts=2567053 +2026-04-13T16:53:26.389300Z INFO Writing accounts to db total_inserted_accounts=2852281 +2026-04-13T16:53:45.282166Z INFO Writing accounts to db total_inserted_accounts=3137509 +2026-04-13T16:53:55.603621Z INFO Writing accounts to db total_inserted_accounts=3422737 +2026-04-13T16:54:01.525335Z INFO Writing accounts to db total_inserted_accounts=3707965 +2026-04-13T16:54:08.428505Z INFO Writing accounts to db total_inserted_accounts=3993193 +2026-04-13T16:54:17.078504Z INFO Writing accounts to db total_inserted_accounts=4278421 +2026-04-13T16:54:27.033591Z INFO Writing accounts to db total_inserted_accounts=4563649 +2026-04-13T16:54:36.092951Z INFO Writing accounts to db total_inserted_accounts=4848877 +2026-04-13T16:54:45.267075Z INFO Writing accounts to db total_inserted_accounts=5134105 +2026-04-13T16:55:09.267964Z INFO Writing accounts to db total_inserted_accounts=5419333 +2026-04-13T16:55:59.100860Z INFO Writing accounts to db total_inserted_accounts=5704561 +2026-04-13T16:56:10.258350Z INFO Writing accounts to db total_inserted_accounts=5989789 +2026-04-13T16:56:19.970851Z INFO Writing accounts to db total_inserted_accounts=6275017 +2026-04-13T16:56:45.127827Z INFO Writing accounts to db total_inserted_accounts=6560245 +2026-04-13T16:58:27.649731Z INFO Writing accounts to db total_inserted_accounts=6845473 +2026-04-13T16:58:48.402822Z INFO Writing accounts to db total_inserted_accounts=7130701 +2026-04-13T16:59:02.370346Z INFO Writing accounts to db total_inserted_accounts=7415929 +2026-04-13T16:59:18.178311Z INFO Writing accounts to db total_inserted_accounts=7701157 +2026-04-13T16:59:41.031120Z INFO Writing accounts to db total_inserted_accounts=7986385 +2026-04-13T16:59:45.080597Z INFO Writing accounts to db total_inserted_accounts=8271613 +2026-04-13T16:59:51.030033Z INFO Writing accounts to db total_inserted_accounts=8556841 +2026-04-13T17:00:00.362954Z INFO Writing accounts to db total_inserted_accounts=8842069 +2026-04-13T17:00:48.945788Z INFO Writing accounts to db total_inserted_accounts=9127297 +2026-04-13T17:01:35.158928Z INFO Writing accounts to db total_inserted_accounts=9412525 +2026-04-13T17:01:50.173355Z INFO Writing accounts to db total_inserted_accounts=9697753 +2026-04-13T17:02:02.994997Z INFO Writing accounts to db total_inserted_accounts=9982981 +2026-04-13T17:02:08.880774Z INFO Writing accounts to db total_inserted_accounts=10268209 +2026-04-13T17:02:14.654114Z INFO Writing accounts to db total_inserted_accounts=10553437 +2026-04-13T17:02:19.467126Z INFO Writing accounts to db total_inserted_accounts=10838665 +2026-04-13T17:02:29.333504Z INFO Writing accounts to db total_inserted_accounts=11123893 +2026-04-13T17:02:59.614413Z INFO Writing accounts to db total_inserted_accounts=11409121 +2026-04-13T17:03:07.361987Z INFO Writing accounts to db total_inserted_accounts=11694349 +2026-04-13T17:03:23.012917Z INFO Writing accounts to db total_inserted_accounts=11979577 +2026-04-13T17:03:33.465679Z INFO Writing accounts to db total_inserted_accounts=12264805 +2026-04-13T17:03:41.258517Z INFO Writing accounts to db total_inserted_accounts=12550033 +2026-04-13T17:03:50.245527Z INFO Writing accounts to db total_inserted_accounts=12835261 +2026-04-13T17:04:02.235349Z INFO Writing accounts to db total_inserted_accounts=13120489 +2026-04-13T17:04:07.842991Z INFO Writing accounts to db total_inserted_accounts=13405717 +2026-04-13T17:04:17.457631Z INFO Writing accounts to db total_inserted_accounts=13690945 +2026-04-13T17:04:31.578721Z INFO Writing accounts to db total_inserted_accounts=13976173 +2026-04-13T17:04:38.845099Z INFO Writing accounts to db total_inserted_accounts=14261401 +2026-04-13T17:04:46.594605Z INFO Writing accounts to db total_inserted_accounts=14546629 +2026-04-13T17:04:53.272062Z INFO Writing accounts to db total_inserted_accounts=14831857 +2026-04-13T17:05:06.760919Z INFO Writing accounts to db total_inserted_accounts=15117085 +2026-04-13T17:05:27.484118Z INFO Writing accounts to db total_inserted_accounts=15402313 +2026-04-13T17:05:51.557930Z INFO Writing accounts to db total_inserted_accounts=15687541 +2026-04-13T17:06:04.043248Z INFO Writing accounts to db total_inserted_accounts=15972769 +2026-04-13T17:06:15.434413Z INFO Writing accounts to db total_inserted_accounts=16257997 +2026-04-13T17:06:21.631663Z INFO Writing accounts to db total_inserted_accounts=16543225 +2026-04-13T17:06:34.033365Z INFO Writing accounts to db total_inserted_accounts=16828453 +2026-04-13T17:06:41.789633Z INFO Writing accounts to db total_inserted_accounts=17113681 +2026-04-13T17:06:50.300120Z INFO Writing accounts to db total_inserted_accounts=17398909 +2026-04-13T17:07:01.432326Z INFO Writing accounts to db total_inserted_accounts=17684137 +2026-04-13T17:07:16.606154Z INFO Writing accounts to db total_inserted_accounts=17969365 +2026-04-13T17:07:28.581218Z INFO Writing accounts to db total_inserted_accounts=18254593 +2026-04-13T17:07:54.371080Z INFO Writing accounts to db total_inserted_accounts=18539821 +2026-04-13T17:08:10.016478Z INFO Writing accounts to db total_inserted_accounts=18825049 +2026-04-13T17:08:18.033917Z INFO Writing accounts to db total_inserted_accounts=19110277 +2026-04-13T17:08:25.679326Z INFO Writing accounts to db total_inserted_accounts=19395505 +2026-04-13T17:08:35.017122Z INFO Writing accounts to db total_inserted_accounts=19680733 +2026-04-13T17:08:49.689781Z INFO Writing accounts to db total_inserted_accounts=19965961 +2026-04-13T17:09:00.907484Z INFO Writing accounts to db total_inserted_accounts=20251189 +2026-04-13T17:09:15.153160Z INFO Writing accounts to db total_inserted_accounts=20536417 +2026-04-13T17:09:43.232637Z INFO Writing accounts to db total_inserted_accounts=20821645 +2026-04-13T17:10:03.417596Z INFO Writing accounts to db total_inserted_accounts=21106873 +2026-04-13T17:10:17.799564Z INFO Writing accounts to db total_inserted_accounts=21392101 +2026-04-13T17:10:31.665755Z INFO Writing accounts to db total_inserted_accounts=21677329 +2026-04-13T17:10:40.229743Z INFO Writing accounts to db total_inserted_accounts=21962557 +2026-04-13T17:10:52.117399Z INFO Writing accounts to db total_inserted_accounts=22247785 +2026-04-13T17:11:18.432483Z INFO Writing accounts to db total_inserted_accounts=22533013 +2026-04-13T17:11:37.933215Z INFO Writing accounts to db total_inserted_accounts=22818241 +2026-04-13T17:11:50.539144Z INFO Writing accounts to db total_inserted_accounts=23103469 +2026-04-13T17:12:18.830799Z INFO Writing accounts to db total_inserted_accounts=23388697 +2026-04-13T17:12:35.140155Z INFO Writing accounts to db total_inserted_accounts=23673925 +2026-04-13T17:12:47.473810Z INFO Writing accounts to db total_inserted_accounts=23855330 +2026-04-13T17:12:50.644928Z INFO All accounts written to database, starting state root computation (may take some time) +2026-04-13T17:24:05.391624Z ERROR Computed state root does not match state root in state dump computed_state_root=0xd84e693fd4e8ce5ad0b4c7e45b088d4119b7d0e9b8d76ee74ee83a5c7adea6a1 expected_state_root=0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 +Error: state root mismatch: got 0xd84e693fd4e8ce5ad0b4c7e45b088d4119b7d0e9b8d76ee74ee83a5c7adea6a1, expected 0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 + +Location: + /mnt/ssd/rust/cargo/git/checkouts/reth-e231042ee7db3fb7/564ffa5/crates/storage/db-common/src/init.rs:684:10 +``` diff --git a/scripts/append_l2_allocs.py b/scripts/append_l2_allocs.py index db6a8a19d48..3537433e79f 100755 --- a/scripts/append_l2_allocs.py +++ b/scripts/append_l2_allocs.py @@ -1,27 +1,30 @@ #!/usr/bin/env python3 -"""Appends Celo L2 migration allocs to a reth state dump for use with `init-state --without-ovm`. +"""Merge Celo L1 state dump with L2 migration allocs for reth import. -Downloads l2-allocs.json (the accounts injected during the Cel2 migration) and appends them -to a copy of the state dump JSONL file. The original file is never modified. +Downloads l2-allocs.json and merges it with the L1 state dump, applying the +same account merge logic as the Go migration. Also fixes the zero address dump +bug and sets the treasury balance. -The state dump format expected by reth's `init_from_state_dump` is: - - Line 1: {"root": "0x..."} (state root) - - Lines 2+: {"address": "0x...", "balance": "0x0", "nonce": 1, "code": "0x...", "storage": {...}} +Merge rules (from celo-org/optimism@celo-rebase-12 state.go applyAllocsToState): + 1. Alloc account not in L1 -> create with alloc data, balance=0 + 2. In L1, allowlisted (false) -> skip alloc, keep L1 account as-is + 3. In L1, allowlisted (true) -> overwrite code only from alloc + 4. In L1, not allowlisted, has code/nonce -> error + 5. In L1, not allowlisted, balance-only -> take alloc code/nonce/storage, keep L1 balance -The Cel2 migration header's state_root already accounts for these alloc entries being present. +Treasury balance is set to the value from migration block 31,056,500 +(= 1e27 - celoTokenTotalSupply + treasuryL1Balance). Usage: python3 append_l2_allocs.py [output.jsonl] -If output path is omitted, creates .with-allocs.jsonl. -The state root on line 1 is replaced with the Cel2 migration header root, since reth -verifies it against CEL2_HEADER.state_root before importing. +If output path is omitted, creates .with-allocs.jsonl. """ import argparse import json import os -import shutil +import re import sys import urllib.request @@ -30,39 +33,116 @@ # Cel2 migration header state root (includes both L1 state and L2 allocs). CEL2_STATE_ROOT = "0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807" +# CeloToken contract address (mainnet). +CELO_TOKEN = "0x471ece3750da237f93b8e339c536989b8978a438" -def replace_state_root(path, new_root): - """Replace the state root on line 1 of a JSONL state dump file in place.""" - with open(path, "rb") as f: - first_line = f.readline() +# Treasury address (mainnet). +TREASURY = "0x7a8c7a833565fc428cdfba20fe03fafb178a434f" - header = json.loads(first_line) - old_root = header["root"] - print(f"Replacing state root: {old_root} -> {new_root}") +# Treasury balance at migration block 31,056,500, queried from L2 archive node. +# Equals: TREASURY_CEILING - celoTokenTotalSupply + treasuryL1Balance +TREASURY_BALANCE = 292574923875528830166719349 - header["root"] = new_root - new_first_line = json.dumps(header, separators=(",", ":")).encode() + b"\n" +# Ceiling used in setupUnreleasedTreasury (1 billion CELO in wei). +TREASURY_CEILING = 1_000_000_000 * 10**18 - print(f"Old first line: {first_line}") - print(f"New first line: {new_first_line}") - if len(new_first_line) != len(first_line): - print( - f"Error: new header is {len(new_first_line)} bytes but original is " - f"{len(first_line)} bytes. In-place replacement requires matching byte " - f"lengths. Pad or adjust the header manually.", - file=sys.stderr, +# CeloToken totalSupply storage slot (used for verification only). +TOTAL_SUPPLY_SLOT = "0x0000000000000000000000000000000000000000000000000000000000000002" + +# L1 dump bug: zero address has "key" (keccak hash) instead of "address". +ZERO_ADDR_KEY = '"key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"' +ZERO_ADDR_FIX = '"address":"0x0000000000000000000000000000000000000000"' + +# Accounts where L2 allocs should not blindly overwrite the L1 state. +# False = skip alloc entirely, True = overwrite code only. +ALLOWLIST = { + "0x000000000022d473030f116ddee9f6b43ac78ba3": False, # Permit2 + "0x0000000071727de22e5e9d8baf0edac6f37da032": False, # EntryPoint_v070 + "0x13b0d85ccb8bf860b6b79af3029fca081ae9bef2": True, # Create2Deployer + "0x4e59b44847b379578588920ca78fbf26c0b4956c": False, # DeterministicDeploymentProxy + "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789": False, # EntryPoint_v060 + "0x69f4d1788e39c87893c980c06edf4b7f686e2938": False, # Safe_v130 + "0x7fc98430eaedbb6070b35b39d798725049088348": False, # SenderCreator_v060 + "0x914d7fec6aac8cd542e72bca78b30650d45643d7": False, # SafeSingletonFactory + "0x998739bfdaadde7c933b942a68053933098f9eda": False, # MultiSend_v130 + "0xa1dabef33b3b82c7814b6d82a79e50f4ac44102b": False, # MultiSendCallOnly_v130 + "0xba5ed099633d3b313e4d5f7bdc1305d3c28ba5ed": False, # CreateX + "0xca11bde05977b3631167028862be2a173976ca11": False, # Multicall3 + "0xefc2c1444ebcc4db75e7613d20c6a62ff67a167c": False, # SenderCreator_v070 + "0xfb1bffc9d739b8d520daf37df666da4c687191ea": False, # SafeL2_v130 +} + +_ADDRESS_RE = re.compile(r'"address"\s*:\s*"(0x[0-9a-fA-F]{40})"') + + +def extract_address(line): + """Extract address from a dump line via regex. Returns lowercase or None.""" + m = _ADDRESS_RE.search(line) + return m.group(1).lower() if m else None + + +def parse_balance(s): + """Parse a balance from decimal or hex string.""" + if s.startswith(("0x", "0X")): + return int(s, 16) + return int(s) + + +def account_line(entry): + """Serialize an account dict to a compact JSONL line.""" + return json.dumps(entry, separators=(",", ":")) + "\n" + + +def build_entry(address, alloc): + """Build an account entry from alloc data with zero balance.""" + entry = {"address": address, "balance": "0x0"} + if "nonce" in alloc: + entry["nonce"] = alloc["nonce"] + if "code" in alloc: + entry["code"] = alloc["code"] + if "storage" in alloc: + entry["storage"] = alloc["storage"] + return entry + + +def merge_alloc(l1_account, alloc, address): + """Merge an L2 alloc into an existing L1 account per Go migration rules. + + Returns the merged account dict. Raises ValueError for case 4 + (existing account with code or nonzero nonce not in allowlist). + """ + if address in ALLOWLIST: + if not ALLOWLIST[address]: + # Case 2: keep L1 account unchanged + return dict(l1_account) + # Case 3: overwrite code only + merged = dict(l1_account) + if "code" in alloc: + merged["code"] = alloc["code"] + return merged + + # Case 4 check: L1 account has code or nonce > 0 + l1_code = l1_account.get("code", "0x") + l1_nonce = l1_account.get("nonce", 0) + if isinstance(l1_nonce, str): + l1_nonce = int(l1_nonce, 0) if l1_nonce.startswith(("0x", "0X")) else int(l1_nonce) + if l1_code not in ("0x", "") or l1_nonce > 0: + raise ValueError( + f"L1 account {address} has code={l1_code!r} nonce={l1_nonce} " + f"but is not in the allowlist" ) - sys.exit(1) - with open(path, "r+b") as f: - f.write(new_first_line) + # Case 5: balance-only L1 account — take alloc data, keep L1 balance + entry = build_entry(address, alloc) + entry["balance"] = l1_account.get("balance", "0x0") + return entry def main(): parser = argparse.ArgumentParser( - description="Append Celo L2 migration allocs to a reth state dump." + description="Merge Celo L1 state dump with L2 migration allocs for reth import." ) - parser.add_argument("state_dump", help="Path to the state dump JSONL file") + parser.add_argument("state_dump", help="Path to the L1 state dump JSONL file") parser.add_argument( "output", nargs="?", @@ -77,47 +157,141 @@ def main(): print(f"Error: {state_dump_path} does not exist", file=sys.stderr) sys.exit(1) - total_bytes = os.path.getsize(state_dump_path) - copied_bytes = 0 - chunk_size = 64 * 1024 * 1024 # 64MB - print( - f"Copying {state_dump_path} to {output_path} ({total_bytes / (1024**3):.1f} GB)..." - ) - with open(state_dump_path, "rb") as src, open(output_path, "wb") as dst: - while True: - chunk = src.read(chunk_size) - if not chunk: - break - dst.write(chunk) - copied_bytes += len(chunk) + # Phase 1: Load L2 allocs + print(f"Downloading l2-allocs.json from {L2_ALLOCS_URL}...") + with urllib.request.urlopen(L2_ALLOCS_URL) as resp: + raw_allocs = json.load(resp) + allocs = {addr.lower(): data for addr, data in raw_allocs.items()} + handled = set() + print(f"Loaded {len(allocs)} L2 alloc accounts.") + + # State tracked during L1 dump pass + total_supply = None + treasury_l1_account = None + treasury_l1_balance = 0 + line_count = 0 + merged_count = 0 + + # Phase 2: Stream L1 dump with inline modifications + print(f"Processing {state_dump_path} -> {output_path}...") + with open(state_dump_path, "r") as inp, open(output_path, "w") as out: + for line_num, line in enumerate(inp): + # Line 1: replace state root + if line_num == 0: + header = json.loads(line) + old_root = header["root"] + header["root"] = CEL2_STATE_ROOT + out.write(json.dumps(header, separators=(",", ":")) + "\n") + print(f"State root: {old_root} -> {CEL2_STATE_ROOT}") + continue + + # Zero address fix: replace key hash with address field + if ZERO_ADDR_KEY in line: + line = line.replace(ZERO_ADDR_KEY, ZERO_ADDR_FIX) + print("Fixed zero address entry (key -> address)") + + address = extract_address(line) + if address is None: + out.write(line) + continue + + line_count += 1 + if line_count % 5_000_000 == 0: + print(f" {line_count} accounts processed...") + + # CeloToken: extract totalSupply for verification + if address == CELO_TOKEN: + account = json.loads(line) + storage = account.get("storage", {}) + for slot in (TOTAL_SUPPLY_SLOT, "0x2"): + if slot in storage: + total_supply = int(storage[slot], 16) + print(f"CeloToken totalSupply: {total_supply}") + break + if address in allocs: + merged = merge_alloc(account, allocs[address], address) + out.write(account_line(merged)) + handled.add(address) + merged_count += 1 + else: + out.write(line) + continue + + # Treasury: save for phase 4, don't write yet + if address == TREASURY: + treasury_l1_account = json.loads(line) + balance_str = treasury_l1_account.get("balance", "0x0") + treasury_l1_balance = parse_balance(balance_str) + print(f"Treasury L1 balance: {treasury_l1_balance}") + continue + + # L2 alloc merge + if address in allocs: + l1_account = json.loads(line) + merged = merge_alloc(l1_account, allocs[address], address) + out.write(account_line(merged)) + handled.add(address) + merged_count += 1 + continue + + # Default: pass through unchanged + out.write(line) + + # Phase 3: Append remaining allocs (new accounts not in L1) + new_count = 0 + for address, alloc in allocs.items(): + if address in handled or address == TREASURY: + continue + out.write(account_line(build_entry(address, alloc))) + new_count += 1 + + # Phase 4: Write treasury with hardcoded balance + treasury_alloc = allocs.get(TREASURY) + if treasury_alloc and treasury_l1_account: + # Both L1 and alloc exist: apply merge rules, then override balance + treasury_entry = merge_alloc( + treasury_l1_account, treasury_alloc, TREASURY + ) + treasury_entry["balance"] = hex(TREASURY_BALANCE) + elif treasury_alloc: + # Only alloc: use alloc data with hardcoded balance + treasury_entry = build_entry(TREASURY, treasury_alloc) + treasury_entry["balance"] = hex(TREASURY_BALANCE) + elif treasury_l1_account: + # Only L1: keep L1 data with hardcoded balance + treasury_entry = dict(treasury_l1_account) + treasury_entry["balance"] = hex(TREASURY_BALANCE) + else: + treasury_entry = {"address": TREASURY, "balance": hex(TREASURY_BALANCE)} + out.write(account_line(treasury_entry)) + + print(f"\nProcessed {line_count} L1 accounts") + print(f"Merged {merged_count} existing accounts with L2 allocs") + print(f"Appended {new_count} new accounts from L2 allocs") + print(f"Treasury balance: {TREASURY_BALANCE} ({hex(TREASURY_BALANCE)})") + + # Phase 5: Verify treasury balance + if total_supply is not None: + expected = TREASURY_CEILING - total_supply + treasury_l1_balance + if expected != TREASURY_BALANCE: print( - f"\r {copied_bytes / (1024**3):.1f} / {total_bytes / (1024**3):.1f} GB", - end="", - flush=True, + f"\nERROR: Treasury balance mismatch!\n" + f" ceiling - totalSupply + l1Balance = " + f"{TREASURY_CEILING} - {total_supply} + {treasury_l1_balance} = {expected}\n" + f" Hardcoded: {TREASURY_BALANCE}", + file=sys.stderr, ) - shutil.copystat(state_dump_path, output_path) - print() + sys.exit(1) + print( + f"Treasury balance verified: " + f"{TREASURY_CEILING} - {total_supply} + {treasury_l1_balance} = {TREASURY_BALANCE}" + ) + else: + print( + "Warning: CeloToken totalSupply not found, skipping treasury verification" + ) - print(f"Downloading l2-allocs.json from {L2_ALLOCS_URL}...") - with urllib.request.urlopen(L2_ALLOCS_URL) as resp: - allocs = json.load(resp) - - print(f"Appending {len(allocs)} accounts to {output_path}...") - with open(output_path, "a") as out: - for address, account in allocs.items(): - entry = {"address": address} - entry["balance"] = account.get("balance", "0x0") - if "nonce" in account: - entry["nonce"] = account["nonce"] - if "code" in account: - entry["code"] = account["code"] - if "storage" in account: - entry["storage"] = account["storage"] - out.write(json.dumps(entry) + "\n") - - replace_state_root(output_path, CEL2_STATE_ROOT) - - print("Done.") + print("\nDone.") if __name__ == "__main__": diff --git a/scripts/fix_dump_zero_address.sh b/scripts/fix_dump_zero_address.sh deleted file mode 100755 index 1b26f259278..00000000000 --- a/scripts/fix_dump_zero_address.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# Fix the zero address entry in the Celo L1 state dump. -# -# The dump tool omits the "address" field for the zero address -# (0x0000000000000000000000000000000000000000) and instead includes -# a "key" field with its keccak256 hash. This replaces the "key" -# with the correct "address" field. - -set -euo pipefail - -if [ $# -ne 1 ]; then - echo "Usage: $0 " >&2 - exit 1 -fi - -input="$1" - -if [ ! -f "$input" ]; then - echo "Error: file not found: $input" >&2 - exit 1 -fi - -old='"key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"' -new='"address":"0x0000000000000000000000000000000000000000"' - -before=$(grep -m 1 "$old" "$input" || true) -if [ -z "$before" ]; then - echo "Already fixed or pattern not found, skipping." - exit 0 -fi - -echo "Before: $before" - -perl -i -pe "s/\Q${old}\E/${new}/" "$input" - -echo "After: ${before/$old/$new}" From a66db5d593b85493b8b4a1494e420bf2fd7abd4c Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Tue, 14 Apr 2026 20:38:44 +0200 Subject: [PATCH 11/18] reth: Add merge logging to state dump preparation script Log each alloc merge decision (case 2/3/5) and treasury handling so the output can be reviewed for correctness. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/append_l2_allocs.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/append_l2_allocs.py b/scripts/append_l2_allocs.py index 3537433e79f..b7b0f44809f 100755 --- a/scripts/append_l2_allocs.py +++ b/scripts/append_l2_allocs.py @@ -114,8 +114,10 @@ def merge_alloc(l1_account, alloc, address): if address in ALLOWLIST: if not ALLOWLIST[address]: # Case 2: keep L1 account unchanged + print(f" Merge {address}: case 2 (allowlist skip, keep L1)") return dict(l1_account) # Case 3: overwrite code only + print(f" Merge {address}: case 3 (allowlist, overwrite code only)") merged = dict(l1_account) if "code" in alloc: merged["code"] = alloc["code"] @@ -133,8 +135,10 @@ def merge_alloc(l1_account, alloc, address): ) # Case 5: balance-only L1 account — take alloc data, keep L1 balance + l1_balance = l1_account.get("balance", "0x0") + print(f" Merge {address}: case 5 (balance-only L1, balance={l1_balance})") entry = build_entry(address, alloc) - entry["balance"] = l1_account.get("balance", "0x0") + entry["balance"] = l1_balance return entry @@ -248,20 +252,21 @@ def main(): # Phase 4: Write treasury with hardcoded balance treasury_alloc = allocs.get(TREASURY) if treasury_alloc and treasury_l1_account: - # Both L1 and alloc exist: apply merge rules, then override balance + print(f"Treasury {TREASURY}: L1 + alloc, merge then set balance") treasury_entry = merge_alloc( treasury_l1_account, treasury_alloc, TREASURY ) treasury_entry["balance"] = hex(TREASURY_BALANCE) elif treasury_alloc: - # Only alloc: use alloc data with hardcoded balance + print(f"Treasury {TREASURY}: alloc only, set balance") treasury_entry = build_entry(TREASURY, treasury_alloc) treasury_entry["balance"] = hex(TREASURY_BALANCE) elif treasury_l1_account: - # Only L1: keep L1 data with hardcoded balance + print(f"Treasury {TREASURY}: L1 only, set balance") treasury_entry = dict(treasury_l1_account) treasury_entry["balance"] = hex(TREASURY_BALANCE) else: + print(f"Treasury {TREASURY}: not in L1 or allocs, creating") treasury_entry = {"address": TREASURY, "balance": hex(TREASURY_BALANCE)} out.write(account_line(treasury_entry)) From cea5116c487a319f803e2c2f4858f75069d437a1 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Wed, 15 Apr 2026 12:56:23 +0200 Subject: [PATCH 12/18] update readme --- rust/op-reth/CELO_MIGRATION.md | 285 +++++++-------------------------- 1 file changed, 62 insertions(+), 223 deletions(-) diff --git a/rust/op-reth/CELO_MIGRATION.md b/rust/op-reth/CELO_MIGRATION.md index b316e8c7b29..39f83dc4629 100644 --- a/rust/op-reth/CELO_MIGRATION.md +++ b/rust/op-reth/CELO_MIGRATION.md @@ -9,21 +9,20 @@ The Celo L2 migration imports the full Celo L1 state (pre-migration) into reth a ## Prerequisites - A built `op-reth` binary with the Celo migration header support (branch `palango/reth-import`) -- A Celo chain spec file -## Step 0: Download and Decompress the L1 State Dump +## Step 1: Download and Decompress the L1 State Dump -The compressed state dump (~5GB zstd) is available at: +The compressed state dump (~15GB zstd) is available at: https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst -Download and decompress (~50GB JSONL): +Download and decompress (~56GB JSONL): ```bash curl -O https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst zstd -d l1-final-state.json.zst ``` -## Step 1: Prepare the State Dump +## Step 2: Prepare the State Dump The L1 state dump must be merged with the L2 migration allocs before import. The merge script applies the same logic as the Go migration (`applyAllocsToState` + `setupUnreleasedTreasury`): @@ -52,9 +51,9 @@ Extra fields from the L1 dump (`root`, `codeHash`) are silently ignored due to s After importing all accounts, reth computes the state root from the trie and verifies it also matches `CEL2_HEADER.state_root` (`0xed980641...`). -## Step 2: Initialize reth +## Step 3: Initialize reth -The dummy chain creation opens many static file segments. Increase the file descriptor limit before running: +The dummy chain creation opens many static file segments. On macOS, increase the file descriptor limit before running: ```bash ulimit -n 10240 @@ -77,226 +76,66 @@ The `--without-ovm` flag with Celo mainnet chain ID (`42220`) will: 3. Import all accounts from the state dump 4. Compute the state root and verify it matches the migration header -## Network Config & Assets - -All Celo mainnet migration artifacts are available at: - -| Asset | URL | -|-------|-----| -| L1 state dump | https://storage.googleapis.com/cel2-rollup-files/celo/l1-final-state.json.zst | -| Deploy config | https://storage.googleapis.com/cel2-rollup-files/celo/config.json | -| L1 contract addresses | https://storage.googleapis.com/cel2-rollup-files/celo/deployment-l1.json | -| L2 allocs | https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json | -| Rollup config | https://storage.googleapis.com/cel2-rollup-files/celo/rollup.json | -| Genesis (snap sync) | https://storage.googleapis.com/cel2-rollup-files/celo/genesis.json | -| Migrated chaindata | https://storage.googleapis.com/cel2-rollup-files/celo/celo-mainnet-migrated-chaindata.tar.zst | - -## Open Questions - -- The state dump may have storage values without `0x` prefix — needs verification that reth's `Bytes` deserializer handles non-prefixed hex strings correctly. - ## Logs -Previous run (Mon 13 April) — state root mismatch, before alloc merge fix: +Successful import (14 April 2026): ``` -~/P/optimism (palango/reth-import) $ ./scripts/fix_dump_zero_address.sh ~/Downloads/l1-final-state.json -Before: {"balance":"324222713619168179923","nonce":0,"root":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","key":"0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"} -After: {"balance":"324222713619168179923","nonce":0,"root":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","address":"0x0000000000000000000000000000000000000000"} -mise WARN missing: golangci-lint@2.8.0 rust@1.92.0 op-acceptor@op-acceptor/v3.8.3 -~/P/optimism (palango/reth-import) $ python3 ./scripts/append_l2_allocs.py --update-state-root ~/Downloads/l1-final-state.json -Copying /Users/paul/Downloads/l1-final-state.json to /Users/paul/Downloads/l1-final-state.json.with-allocs.jsonl (45.8 GB)... - 45.8 / 45.8 GB +$ python3 scripts/append_l2_allocs.py /mnt/ssd/celo/l1-final-state.json Downloading l2-allocs.json from https://storage.googleapis.com/cel2-rollup-files/celo/l2-allocs.json... -Appending 2080 accounts to /Users/paul/Downloads/l1-final-state.json.with-allocs.jsonl... -Replacing state root: 0x3817f87742aaeb96219d6c1fed8b32a562b59065116c49a53693abfd118838bc -> 0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 -Old first line: b'{"root":"0x3817f87742aaeb96219d6c1fed8b32a562b59065116c49a53693abfd118838bc"}\n' -New first line: b'{"root":"0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807"}\n' -Done. -``` +Loaded 2080 L2 alloc accounts. +Processing /mnt/ssd/celo/l1-final-state.json -> /mnt/ssd/celo/l1-final-state.json.with-allocs.jsonl... +State root: 0x3817f87742aaeb96219d6c1fed8b32a562b59065116c49a53693abfd118838bc -> 0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 + Merge 0xfb1bffc9d739b8d520daf37df666da4c687191ea: case 2 (allowlist skip, keep L1) + Merge 0x000000000022d473030f116ddee9f6b43ac78ba3: case 2 (allowlist skip, keep L1) + Merge 0x914d7fec6aac8cd542e72bca78b30650d45643d7: case 2 (allowlist skip, keep L1) + 5000000 accounts processed... + Merge 0xefc2c1444ebcc4db75e7613d20c6a62ff67a167c: case 2 (allowlist skip, keep L1) + Merge 0x4200000000000000000000000000000000000006: case 5 (balance-only L1, balance=23086547216520198) + Merge 0x4e59b44847b379578588920ca78fbf26c0b4956c: case 2 (allowlist skip, keep L1) + Merge 0x0000000071727de22e5e9d8baf0edac6f37da032: case 2 (allowlist skip, keep L1) +Fixed zero address entry (key -> address) + 10000000 accounts processed... + Merge 0xba5ed099633d3b313e4d5f7bdc1305d3c28ba5ed: case 2 (allowlist skip, keep L1) + Merge 0x69f4d1788e39c87893c980c06edf4b7f686e2938: case 2 (allowlist skip, keep L1) + Merge 0xa1dabef33b3b82c7814b6d82a79e50f4ac44102b: case 2 (allowlist skip, keep L1) + Merge 0x998739bfdaadde7c933b942a68053933098f9eda: case 2 (allowlist skip, keep L1) + Merge 0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789: case 2 (allowlist skip, keep L1) + 15000000 accounts processed... + Merge 0xca11bde05977b3631167028862be2a173976ca11: case 2 (allowlist skip, keep L1) + Merge 0x13b0d85ccb8bf860b6b79af3029fca081ae9bef2: case 3 (allowlist, overwrite code only) + 20000000 accounts processed... +CeloToken totalSupply: 707425076124471169833280651 +Treasury L1 balance: 0 + Merge 0x7fc98430eaedbb6070b35b39d798725049088348: case 2 (allowlist skip, keep L1) +Treasury 0x7a8c7a833565fc428cdfba20fe03fafb178a434f: L1 only, set balance + +Processed 23853250 L1 accounts +Merged 15 existing accounts with L2 allocs +Appended 2065 new accounts from L2 allocs +Treasury balance: 292574923875528830166719349 (0xf20326676e9b4664ff5b75) +Treasury balance verified: 1000000000000000000000000000 - 707425076124471169833280651 + 0 = 292574923875528830166719349 -``` -paul_lange_clabs_co@paul-reth-import-test:/mnt/ssd/optimism/rust$ ./target/release/op-reth init-state --chain celo --datadir=/mnt/ssd/chain --data --without-ovm ../../celo/l1-final-state.json.with-allocs.jsonl -2026-04-13T16:42:18.812534Z INFO Initialized tracing, debug log directory: /home/paul_lange_clabs_co/.cache/reth/logs/celo -2026-04-13T16:42:18.815639Z INFO Reth init-state starting chain_name="Celo mainnet" -2026-04-13T16:42:18.820852Z INFO Opening storage db_path="/mnt/ssd/chain-data/db" sf_path="/mnt/ssd/chain-data/static_files" -2026-04-13T16:42:18.831917Z INFO check_consistency{read_only=false}: Verifying storage consistency. -2026-04-13T16:42:18.848072Z INFO Setting up dummy EVM chain before importing state. new_tip=NumHash { number: 31056500, hash: 0x7586014e20c69b3fa7c9070baf1a7edd95833db57853126f32593b455da2e5c5 } -2026-04-13T16:42:56.827581Z INFO Appending first valid block. -2026-04-13T16:42:56.848294Z INFO Set up finished. -2026-04-13T16:42:56.850124Z INFO Initiating state dump -2026-04-13T16:42:59.503582Z INFO parsed_new_accounts=285228 -2026-04-13T16:43:00.123970Z INFO parsed_new_accounts=570456 -2026-04-13T16:43:12.435430Z INFO parsed_new_accounts=855684 -2026-04-13T16:43:13.720443Z INFO parsed_new_accounts=1140912 -2026-04-13T16:43:14.683206Z INFO parsed_new_accounts=1426140 -2026-04-13T16:43:17.947835Z INFO parsed_new_accounts=1711368 -2026-04-13T16:43:28.915803Z INFO parsed_new_accounts=1996596 -2026-04-13T16:43:30.585443Z INFO parsed_new_accounts=2281824 -2026-04-13T16:43:31.989111Z INFO parsed_new_accounts=2567052 -2026-04-13T16:43:32.752545Z INFO parsed_new_accounts=2852280 -2026-04-13T16:43:38.433548Z INFO parsed_new_accounts=3137508 -2026-04-13T16:43:48.029585Z INFO parsed_new_accounts=3422736 -2026-04-13T16:43:49.896711Z INFO parsed_new_accounts=3707964 -2026-04-13T16:43:52.651012Z INFO parsed_new_accounts=3993192 -2026-04-13T16:43:54.843911Z INFO parsed_new_accounts=4278420 -2026-04-13T16:44:00.074544Z INFO parsed_new_accounts=4563648 -2026-04-13T16:44:04.177806Z INFO parsed_new_accounts=4848876 -2026-04-13T16:44:05.611900Z INFO parsed_new_accounts=5134104 -2026-04-13T16:44:11.530471Z INFO parsed_new_accounts=5419332 -2026-04-13T16:44:15.545082Z INFO parsed_new_accounts=5704560 -2026-04-13T16:44:16.486635Z INFO parsed_new_accounts=5989788 -2026-04-13T16:44:22.514600Z INFO parsed_new_accounts=6275016 -2026-04-13T16:44:27.429958Z INFO parsed_new_accounts=6560244 -2026-04-13T16:44:32.588978Z INFO parsed_new_accounts=6845472 -2026-04-13T16:44:35.638466Z INFO parsed_new_accounts=7130700 -2026-04-13T16:44:37.554623Z INFO parsed_new_accounts=7415928 -2026-04-13T16:44:39.176799Z INFO parsed_new_accounts=7701156 -2026-04-13T16:44:41.472247Z INFO parsed_new_accounts=7986384 -2026-04-13T16:44:43.858357Z INFO parsed_new_accounts=8271612 -2026-04-13T16:44:48.757872Z INFO parsed_new_accounts=8556840 -2026-04-13T16:44:52.484596Z INFO parsed_new_accounts=8842068 -2026-04-13T16:44:54.204385Z INFO parsed_new_accounts=9127296 -2026-04-13T16:44:56.270181Z INFO parsed_new_accounts=9412524 -2026-04-13T16:44:57.221695Z INFO parsed_new_accounts=9697752 -2026-04-13T16:45:02.768897Z INFO parsed_new_accounts=9982980 -2026-04-13T16:45:04.131802Z INFO parsed_new_accounts=10268208 -2026-04-13T16:45:05.862055Z INFO parsed_new_accounts=10553436 -2026-04-13T16:45:07.952379Z INFO parsed_new_accounts=10838664 -2026-04-13T16:45:08.844751Z INFO parsed_new_accounts=11123892 -2026-04-13T16:45:27.148172Z INFO parsed_new_accounts=11409120 -2026-04-13T16:45:34.429270Z INFO parsed_new_accounts=11694348 -2026-04-13T16:45:37.374610Z INFO parsed_new_accounts=11979576 -2026-04-13T16:45:41.062672Z INFO parsed_new_accounts=12264804 -2026-04-13T16:45:42.439363Z INFO parsed_new_accounts=12550032 -2026-04-13T16:45:44.713347Z INFO parsed_new_accounts=12835260 -2026-04-13T16:45:47.052955Z INFO parsed_new_accounts=13120488 -2026-04-13T16:45:48.486462Z INFO parsed_new_accounts=13405716 -2026-04-13T16:46:40.782331Z INFO parsed_new_accounts=13690944 -2026-04-13T16:46:41.731557Z INFO parsed_new_accounts=13976172 -2026-04-13T16:46:43.233270Z INFO parsed_new_accounts=14261400 -2026-04-13T16:46:47.344231Z INFO parsed_new_accounts=14546628 -2026-04-13T16:46:52.164761Z INFO parsed_new_accounts=14831856 -2026-04-13T16:46:53.917277Z INFO parsed_new_accounts=15117084 -2026-04-13T16:46:56.287892Z INFO parsed_new_accounts=15402312 -2026-04-13T16:47:03.937836Z INFO parsed_new_accounts=15687540 -2026-04-13T16:47:13.109870Z INFO parsed_new_accounts=15972768 -2026-04-13T16:47:18.574494Z INFO parsed_new_accounts=16257996 -2026-04-13T16:47:20.473239Z INFO parsed_new_accounts=16543224 -2026-04-13T16:47:24.387829Z INFO parsed_new_accounts=16828452 -2026-04-13T16:47:25.282035Z INFO parsed_new_accounts=17113680 -2026-04-13T16:47:28.572755Z INFO parsed_new_accounts=17398908 -2026-04-13T16:47:30.714713Z INFO parsed_new_accounts=17684136 -2026-04-13T16:47:40.000098Z INFO parsed_new_accounts=17969364 -2026-04-13T16:47:43.471973Z INFO parsed_new_accounts=18254592 -2026-04-13T16:47:44.565534Z INFO parsed_new_accounts=18539820 -2026-04-13T16:47:48.171336Z INFO parsed_new_accounts=18825048 -2026-04-13T16:47:53.268887Z INFO parsed_new_accounts=19110276 -2026-04-13T16:47:55.599853Z INFO parsed_new_accounts=19395504 -2026-04-13T16:47:57.916394Z INFO parsed_new_accounts=19680732 -2026-04-13T16:47:58.750556Z INFO parsed_new_accounts=19965960 -2026-04-13T16:48:00.229423Z INFO parsed_new_accounts=20251188 -2026-04-13T16:48:03.678579Z INFO parsed_new_accounts=20536416 -2026-04-13T16:48:06.687550Z INFO parsed_new_accounts=20821644 -2026-04-13T16:48:10.952793Z INFO parsed_new_accounts=21106872 -2026-04-13T16:48:13.010899Z INFO parsed_new_accounts=21392100 -2026-04-13T16:48:16.197875Z INFO parsed_new_accounts=21677328 -2026-04-13T16:48:46.673103Z INFO parsed_new_accounts=21962556 -2026-04-13T16:48:48.736134Z INFO parsed_new_accounts=22247784 -2026-04-13T16:48:52.021656Z INFO parsed_new_accounts=22533012 -2026-04-13T16:48:57.506038Z INFO parsed_new_accounts=22818240 -2026-04-13T16:48:59.110278Z INFO parsed_new_accounts=23103468 -2026-04-13T16:49:01.542361Z INFO parsed_new_accounts=23388696 -2026-04-13T16:49:02.849429Z INFO parsed_new_accounts=23673924 -2026-04-13T16:49:07.178136Z INFO Writing accounts to db total_inserted_accounts=285229 -2026-04-13T16:49:17.500647Z INFO Writing accounts to db total_inserted_accounts=570457 -2026-04-13T16:49:28.108600Z INFO Writing accounts to db total_inserted_accounts=855685 -2026-04-13T16:50:03.923589Z INFO Writing accounts to db total_inserted_accounts=1140913 -2026-04-13T16:52:35.831660Z INFO Writing accounts to db total_inserted_accounts=1426141 -2026-04-13T16:52:45.883713Z INFO Writing accounts to db total_inserted_accounts=1711369 -2026-04-13T16:52:59.472283Z INFO Writing accounts to db total_inserted_accounts=1996597 -2026-04-13T16:53:08.372623Z INFO Writing accounts to db total_inserted_accounts=2281825 -2026-04-13T16:53:14.781745Z INFO Writing accounts to db total_inserted_accounts=2567053 -2026-04-13T16:53:26.389300Z INFO Writing accounts to db total_inserted_accounts=2852281 -2026-04-13T16:53:45.282166Z INFO Writing accounts to db total_inserted_accounts=3137509 -2026-04-13T16:53:55.603621Z INFO Writing accounts to db total_inserted_accounts=3422737 -2026-04-13T16:54:01.525335Z INFO Writing accounts to db total_inserted_accounts=3707965 -2026-04-13T16:54:08.428505Z INFO Writing accounts to db total_inserted_accounts=3993193 -2026-04-13T16:54:17.078504Z INFO Writing accounts to db total_inserted_accounts=4278421 -2026-04-13T16:54:27.033591Z INFO Writing accounts to db total_inserted_accounts=4563649 -2026-04-13T16:54:36.092951Z INFO Writing accounts to db total_inserted_accounts=4848877 -2026-04-13T16:54:45.267075Z INFO Writing accounts to db total_inserted_accounts=5134105 -2026-04-13T16:55:09.267964Z INFO Writing accounts to db total_inserted_accounts=5419333 -2026-04-13T16:55:59.100860Z INFO Writing accounts to db total_inserted_accounts=5704561 -2026-04-13T16:56:10.258350Z INFO Writing accounts to db total_inserted_accounts=5989789 -2026-04-13T16:56:19.970851Z INFO Writing accounts to db total_inserted_accounts=6275017 -2026-04-13T16:56:45.127827Z INFO Writing accounts to db total_inserted_accounts=6560245 -2026-04-13T16:58:27.649731Z INFO Writing accounts to db total_inserted_accounts=6845473 -2026-04-13T16:58:48.402822Z INFO Writing accounts to db total_inserted_accounts=7130701 -2026-04-13T16:59:02.370346Z INFO Writing accounts to db total_inserted_accounts=7415929 -2026-04-13T16:59:18.178311Z INFO Writing accounts to db total_inserted_accounts=7701157 -2026-04-13T16:59:41.031120Z INFO Writing accounts to db total_inserted_accounts=7986385 -2026-04-13T16:59:45.080597Z INFO Writing accounts to db total_inserted_accounts=8271613 -2026-04-13T16:59:51.030033Z INFO Writing accounts to db total_inserted_accounts=8556841 -2026-04-13T17:00:00.362954Z INFO Writing accounts to db total_inserted_accounts=8842069 -2026-04-13T17:00:48.945788Z INFO Writing accounts to db total_inserted_accounts=9127297 -2026-04-13T17:01:35.158928Z INFO Writing accounts to db total_inserted_accounts=9412525 -2026-04-13T17:01:50.173355Z INFO Writing accounts to db total_inserted_accounts=9697753 -2026-04-13T17:02:02.994997Z INFO Writing accounts to db total_inserted_accounts=9982981 -2026-04-13T17:02:08.880774Z INFO Writing accounts to db total_inserted_accounts=10268209 -2026-04-13T17:02:14.654114Z INFO Writing accounts to db total_inserted_accounts=10553437 -2026-04-13T17:02:19.467126Z INFO Writing accounts to db total_inserted_accounts=10838665 -2026-04-13T17:02:29.333504Z INFO Writing accounts to db total_inserted_accounts=11123893 -2026-04-13T17:02:59.614413Z INFO Writing accounts to db total_inserted_accounts=11409121 -2026-04-13T17:03:07.361987Z INFO Writing accounts to db total_inserted_accounts=11694349 -2026-04-13T17:03:23.012917Z INFO Writing accounts to db total_inserted_accounts=11979577 -2026-04-13T17:03:33.465679Z INFO Writing accounts to db total_inserted_accounts=12264805 -2026-04-13T17:03:41.258517Z INFO Writing accounts to db total_inserted_accounts=12550033 -2026-04-13T17:03:50.245527Z INFO Writing accounts to db total_inserted_accounts=12835261 -2026-04-13T17:04:02.235349Z INFO Writing accounts to db total_inserted_accounts=13120489 -2026-04-13T17:04:07.842991Z INFO Writing accounts to db total_inserted_accounts=13405717 -2026-04-13T17:04:17.457631Z INFO Writing accounts to db total_inserted_accounts=13690945 -2026-04-13T17:04:31.578721Z INFO Writing accounts to db total_inserted_accounts=13976173 -2026-04-13T17:04:38.845099Z INFO Writing accounts to db total_inserted_accounts=14261401 -2026-04-13T17:04:46.594605Z INFO Writing accounts to db total_inserted_accounts=14546629 -2026-04-13T17:04:53.272062Z INFO Writing accounts to db total_inserted_accounts=14831857 -2026-04-13T17:05:06.760919Z INFO Writing accounts to db total_inserted_accounts=15117085 -2026-04-13T17:05:27.484118Z INFO Writing accounts to db total_inserted_accounts=15402313 -2026-04-13T17:05:51.557930Z INFO Writing accounts to db total_inserted_accounts=15687541 -2026-04-13T17:06:04.043248Z INFO Writing accounts to db total_inserted_accounts=15972769 -2026-04-13T17:06:15.434413Z INFO Writing accounts to db total_inserted_accounts=16257997 -2026-04-13T17:06:21.631663Z INFO Writing accounts to db total_inserted_accounts=16543225 -2026-04-13T17:06:34.033365Z INFO Writing accounts to db total_inserted_accounts=16828453 -2026-04-13T17:06:41.789633Z INFO Writing accounts to db total_inserted_accounts=17113681 -2026-04-13T17:06:50.300120Z INFO Writing accounts to db total_inserted_accounts=17398909 -2026-04-13T17:07:01.432326Z INFO Writing accounts to db total_inserted_accounts=17684137 -2026-04-13T17:07:16.606154Z INFO Writing accounts to db total_inserted_accounts=17969365 -2026-04-13T17:07:28.581218Z INFO Writing accounts to db total_inserted_accounts=18254593 -2026-04-13T17:07:54.371080Z INFO Writing accounts to db total_inserted_accounts=18539821 -2026-04-13T17:08:10.016478Z INFO Writing accounts to db total_inserted_accounts=18825049 -2026-04-13T17:08:18.033917Z INFO Writing accounts to db total_inserted_accounts=19110277 -2026-04-13T17:08:25.679326Z INFO Writing accounts to db total_inserted_accounts=19395505 -2026-04-13T17:08:35.017122Z INFO Writing accounts to db total_inserted_accounts=19680733 -2026-04-13T17:08:49.689781Z INFO Writing accounts to db total_inserted_accounts=19965961 -2026-04-13T17:09:00.907484Z INFO Writing accounts to db total_inserted_accounts=20251189 -2026-04-13T17:09:15.153160Z INFO Writing accounts to db total_inserted_accounts=20536417 -2026-04-13T17:09:43.232637Z INFO Writing accounts to db total_inserted_accounts=20821645 -2026-04-13T17:10:03.417596Z INFO Writing accounts to db total_inserted_accounts=21106873 -2026-04-13T17:10:17.799564Z INFO Writing accounts to db total_inserted_accounts=21392101 -2026-04-13T17:10:31.665755Z INFO Writing accounts to db total_inserted_accounts=21677329 -2026-04-13T17:10:40.229743Z INFO Writing accounts to db total_inserted_accounts=21962557 -2026-04-13T17:10:52.117399Z INFO Writing accounts to db total_inserted_accounts=22247785 -2026-04-13T17:11:18.432483Z INFO Writing accounts to db total_inserted_accounts=22533013 -2026-04-13T17:11:37.933215Z INFO Writing accounts to db total_inserted_accounts=22818241 -2026-04-13T17:11:50.539144Z INFO Writing accounts to db total_inserted_accounts=23103469 -2026-04-13T17:12:18.830799Z INFO Writing accounts to db total_inserted_accounts=23388697 -2026-04-13T17:12:35.140155Z INFO Writing accounts to db total_inserted_accounts=23673925 -2026-04-13T17:12:47.473810Z INFO Writing accounts to db total_inserted_accounts=23855330 -2026-04-13T17:12:50.644928Z INFO All accounts written to database, starting state root computation (may take some time) -2026-04-13T17:24:05.391624Z ERROR Computed state root does not match state root in state dump computed_state_root=0xd84e693fd4e8ce5ad0b4c7e45b088d4119b7d0e9b8d76ee74ee83a5c7adea6a1 expected_state_root=0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 -Error: state root mismatch: got 0xd84e693fd4e8ce5ad0b4c7e45b088d4119b7d0e9b8d76ee74ee83a5c7adea6a1, expected 0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 - -Location: - /mnt/ssd/rust/cargo/git/checkouts/reth-e231042ee7db3fb7/564ffa5/crates/storage/db-common/src/init.rs:684:10 +Done. +paul_lange_clabs_co@paul-reth-import-test:/mnt/ssd/optimism/rust$ ./target/release/op-reth init-state --chain celo --datadir=/mnt/ssd/data --without-ovm ../../celo/l1-final-state.json.with-allocs.jsonl +2026-04-15T10:05:34.713366Z INFO Initialized tracing, debug log directory: /home/paul_lange_clabs_co/.cache/reth/logs/celo +2026-04-15T10:05:34.714155Z INFO Reth init-state starting chain_name="Celo mainnet" +2026-04-15T10:05:34.716359Z INFO Opening storage db_path="/mnt/ssd/data/db" sf_path="/mnt/ssd/data/static_files" +2026-04-15T10:05:34.719588Z INFO check_consistency{read_only=false}: Verifying storage consistency. +2026-04-15T10:05:34.724666Z INFO Setting up dummy EVM chain before importing state. new_tip=NumHash { number: 31056500, hash: 0x7586014e20c69b3fa7c9070baf1a7edd95833db57853126f32593b455da2e5c5 } +2026-04-15T10:06:15.278653Z INFO Appending first valid block. +2026-04-15T10:06:15.298941Z INFO Set up finished. +2026-04-15T10:06:15.302261Z INFO Initiating state dump +2026-04-15T10:06:18.441280Z INFO parsed_new_accounts=285228 +2026-04-15T10:06:19.105206Z INFO parsed_new_accounts=570456 +... +2026-04-15T10:12:19.693707Z INFO parsed_new_accounts=23388696 +2026-04-15T10:12:21.001389Z INFO parsed_new_accounts=23673924 +2026-04-15T10:12:25.469480Z INFO Writing accounts to db total_inserted_accounts=285229 +2026-04-15T10:12:35.931102Z INFO Writing accounts to db total_inserted_accounts=570457 +... +2026-04-15T10:35:57.113326Z INFO Writing accounts to db total_inserted_accounts=23855315 +2026-04-15T10:36:02.674107Z INFO All accounts written to database, starting state root computation (may take some time) +2026-04-15T10:47:18.447497Z INFO Computed state root matches state root in state dump computed_state_root=0xed980641a4bd4d2e84c6c8db980b7f05e95733c92be2e0045db3735efeb1d807 +2026-04-15T10:47:18.660820Z INFO Genesis block written hash=0x7586014e20c69b3fa7c9070baf1a7edd95833db57853126f32593b455da2e5c5 ``` From 4e0e5bcd380650a99c9962917c69baee09af01e8 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 13 Apr 2026 19:42:42 +0200 Subject: [PATCH 13/18] reth: Fix storage v2 changeset block start for migration import With --storage.v2, genesis init creates changeset segments at block 0 (block_end=0), so next_block_number() returns 1. When importing at a non-zero migration block, this causes "trying to append data to StorageChangeSets as block #31056500 but expected block #1". Fix by advancing the changeset segments through the dummy blocks using increment_block, which properly creates segment files as needed. --- .../crates/cli/src/commands/init_state.rs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/rust/op-reth/crates/cli/src/commands/init_state.rs b/rust/op-reth/crates/cli/src/commands/init_state.rs index d89a46c7c67..560cd64b987 100644 --- a/rust/op-reth/crates/cli/src/commands/init_state.rs +++ b/rust/op-reth/crates/cli/src/commands/init_state.rs @@ -15,8 +15,9 @@ use reth_optimism_primitives::{ use reth_primitives_traits::{SealedHeader, header::HeaderMut}; use reth_provider::{ BlockNumReader, DBProvider, DatabaseProviderFactory, StaticFileProviderFactory, - StaticFileWriter, + StaticFileWriter, StorageSettingsCache, }; +use reth_static_file_types::StaticFileSegment; use std::{io::BufReader, sync::Arc}; use tracing::info; @@ -102,6 +103,23 @@ impl> InitStateCommandOp { }, )?; + // With storage v2, genesis init created changeset segments at block 0. + // Advance them through the dummy blocks so the next expected block is + // the migration block. Each increment_block call is cheap (header + // counter + small offset), and new segment files are created as needed. + if provider_rw.cached_storage_settings().storage_v2 { + info!(target: "reth::cli", "Advancing changeset segments to migration block"); + for segment in [ + StaticFileSegment::AccountChangeSets, + StaticFileSegment::StorageChangeSets, + ] { + let mut writer = static_file_provider.latest_writer(segment)?; + for block in 1..migration_block_number { + writer.increment_block(block)?; + } + } + } + // SAFETY: it's safe to commit static files, since in the event of a crash, they // will be unwound according to database checkpoints. // From bffe807d98bf525f04b00b82ab063903df810ac8 Mon Sep 17 00:00:00 2001 From: Piers Powlesland Date: Wed, 15 Apr 2026 16:04:16 +0100 Subject: [PATCH 14/18] fix(init-state): Use fixed upstream reth The fix prevents the block being incremented for each inserted batch of changesets. Insetad the block is now incremented when the init-state requests a new block. --- rust/Cargo.lock | 220 ++++++++++++++++++++++++------------------------ rust/Cargo.toml | 144 +++++++++++++++---------------- 2 files changed, 182 insertions(+), 182 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 86c0a2a92b3..7e59c381866 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -9447,7 +9447,7 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth-basic-payload-builder" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9471,7 +9471,7 @@ dependencies = [ [[package]] name = "reth-chain-state" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9503,7 +9503,7 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9523,7 +9523,7 @@ dependencies = [ [[package]] name = "reth-cli" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-genesis", "clap", @@ -9537,7 +9537,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9623,7 +9623,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "reth-tasks", "tokio", @@ -9633,7 +9633,7 @@ dependencies = [ [[package]] name = "reth-cli-util" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9653,7 +9653,7 @@ dependencies = [ [[package]] name = "reth-codecs" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9673,7 +9673,7 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "proc-macro2", "quote", @@ -9683,7 +9683,7 @@ dependencies = [ [[package]] name = "reth-config" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "eyre", "humantime-serde", @@ -9699,7 +9699,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9712,7 +9712,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9724,7 +9724,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9750,7 +9750,7 @@ dependencies = [ [[package]] name = "reth-db" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "derive_more", @@ -9777,7 +9777,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -9806,7 +9806,7 @@ dependencies = [ [[package]] name = "reth-db-common" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -9836,7 +9836,7 @@ dependencies = [ [[package]] name = "reth-db-models" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9851,7 +9851,7 @@ dependencies = [ [[package]] name = "reth-discv4" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9876,7 +9876,7 @@ dependencies = [ [[package]] name = "reth-discv5" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9900,7 +9900,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "dashmap", @@ -9924,7 +9924,7 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9959,7 +9959,7 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10017,7 +10017,7 @@ dependencies = [ [[package]] name = "reth-ecies" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "aes", "alloy-primitives", @@ -10045,7 +10045,7 @@ dependencies = [ [[package]] name = "reth-engine-local" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10069,7 +10069,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10094,7 +10094,7 @@ dependencies = [ [[package]] name = "reth-engine-service" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "futures", "pin-project", @@ -10116,7 +10116,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10173,7 +10173,7 @@ dependencies = [ [[package]] name = "reth-engine-util" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -10201,7 +10201,7 @@ dependencies = [ [[package]] name = "reth-era" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10216,7 +10216,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "bytes", @@ -10232,7 +10232,7 @@ dependencies = [ [[package]] name = "reth-era-utils" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10254,7 +10254,7 @@ dependencies = [ [[package]] name = "reth-errors" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -10265,7 +10265,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-chains", "alloy-primitives", @@ -10294,7 +10294,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-chains", "alloy-consensus", @@ -10318,7 +10318,7 @@ dependencies = [ [[package]] name = "reth-ethereum" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth", @@ -10359,7 +10359,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "clap", "eyre", @@ -10382,7 +10382,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10398,7 +10398,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10416,7 +10416,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -10430,7 +10430,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10459,7 +10459,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10479,7 +10479,7 @@ dependencies = [ [[package]] name = "reth-etl" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "rayon", "reth-db-api", @@ -10489,7 +10489,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10513,7 +10513,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10535,7 +10535,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-evm", "alloy-primitives", @@ -10548,7 +10548,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10566,7 +10566,7 @@ dependencies = [ [[package]] name = "reth-exex" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10604,7 +10604,7 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "eyre", @@ -10636,7 +10636,7 @@ dependencies = [ [[package]] name = "reth-exex-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10650,7 +10650,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "serde", "serde_json", @@ -10660,7 +10660,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10688,7 +10688,7 @@ dependencies = [ [[package]] name = "reth-ipc" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "bytes", "futures", @@ -10708,7 +10708,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "bitflags 2.10.0", "byteorder", @@ -10724,7 +10724,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "bindgen", "cc", @@ -10733,7 +10733,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "futures", "metrics", @@ -10745,7 +10745,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "ipnet", @@ -10754,7 +10754,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "futures-util", "if-addrs 0.14.0", @@ -10768,7 +10768,7 @@ dependencies = [ [[package]] name = "reth-network" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10825,7 +10825,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10850,7 +10850,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10873,7 +10873,7 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -10888,7 +10888,7 @@ dependencies = [ [[package]] name = "reth-network-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "anyhow", "bincode 1.3.3", @@ -10919,7 +10919,7 @@ dependencies = [ [[package]] name = "reth-node-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -10943,7 +10943,7 @@ dependencies = [ [[package]] name = "reth-node-builder" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11012,7 +11012,7 @@ dependencies = [ [[package]] name = "reth-node-core" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11067,7 +11067,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-network", @@ -11105,7 +11105,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -11129,7 +11129,7 @@ dependencies = [ [[package]] name = "reth-node-events" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11153,7 +11153,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "bytes", "eyre", @@ -11182,7 +11182,7 @@ dependencies = [ [[package]] name = "reth-node-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "reth-chainspec", "reth-db-api", @@ -11754,7 +11754,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -11775,7 +11775,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "pin-project", "reth-payload-primitives", @@ -11787,7 +11787,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11810,7 +11810,7 @@ dependencies = [ [[package]] name = "reth-payload-util" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -11820,7 +11820,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -11830,7 +11830,7 @@ dependencies = [ [[package]] name = "reth-primitives" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "once_cell", @@ -11843,7 +11843,7 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11877,7 +11877,7 @@ dependencies = [ [[package]] name = "reth-provider" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11922,7 +11922,7 @@ dependencies = [ [[package]] name = "reth-prune" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11951,7 +11951,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "arbitrary", @@ -11967,7 +11967,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "reth-primitives-traits", @@ -11980,7 +11980,7 @@ dependencies = [ [[package]] name = "reth-rpc" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -12057,7 +12057,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eip7928", "alloy-eips", @@ -12087,7 +12087,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-network", "alloy-provider", @@ -12128,7 +12128,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-evm", @@ -12152,7 +12152,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -12182,7 +12182,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -12226,7 +12226,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -12274,7 +12274,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-rpc-types-engine", "http", @@ -12288,7 +12288,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -12304,7 +12304,7 @@ dependencies = [ [[package]] name = "reth-stages" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -12354,7 +12354,7 @@ dependencies = [ [[package]] name = "reth-stages-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -12381,7 +12381,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "arbitrary", @@ -12395,7 +12395,7 @@ dependencies = [ [[package]] name = "reth-static-file" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "parking_lot", @@ -12415,7 +12415,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "clap", @@ -12430,7 +12430,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -12454,7 +12454,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-eips", "alloy-primitives", @@ -12471,7 +12471,7 @@ dependencies = [ [[package]] name = "reth-tasks" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "auto_impl", "dyn-clone", @@ -12489,7 +12489,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -12505,7 +12505,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "tokio", "tokio-stream", @@ -12515,7 +12515,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "clap", "eyre", @@ -12534,7 +12534,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "clap", "eyre", @@ -12552,7 +12552,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -12598,7 +12598,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-eips", @@ -12624,7 +12624,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -12651,7 +12651,7 @@ dependencies = [ [[package]] name = "reth-trie-db" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "metrics", @@ -12671,7 +12671,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -12696,7 +12696,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -12715,7 +12715,7 @@ dependencies = [ [[package]] name = "reth-zstd-compressors" version = "1.11.0" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8bb066f0c7b015ff36b26c08" +source = "git+https://github.com/celo-org/reth?rev=4861090#4861090ed3912f44c19177e18f5388f2be4f8b25" dependencies = [ "zstd", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index a2e0e80b9d7..e4b59a7799a 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -307,78 +307,78 @@ alloy-op-evm = { version = "0.26.3", path = "alloy-op-evm/", default-features = alloy-op-hardforks = { version = "0.4.7", path = "alloy-op-hardforks/", default-features = false } # ==================== RETH CRATES (from git rev 564ffa58 / main) ==================== -reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-cli-runner = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-codecs = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-downloaders = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-engine-local = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-eth-wire = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-fs-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-network = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-node-events = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-node-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-payload-validator = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-prune = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-stages = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-stages-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-static-file = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-static-file-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-storage-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-trie-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } -reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0" } -reth-zstd-compressors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.0", default-features = false } +reth = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-basic-payload-builder = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-chain-state = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-chainspec = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-cli = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-cli-commands = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-cli-runner = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-cli-util = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-codecs = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-consensus = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-consensus-common = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-db = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-db-api = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-db-common = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-downloaders = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-e2e-test-utils = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-engine-local = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-engine-primitives = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-errors = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-eth-wire = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-ethereum = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-ethereum-cli = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-ethereum-consensus = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-ethereum-forks = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-ethereum-primitives = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-evm = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-evm-ethereum = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-exex = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-exex-test-utils = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-execution-errors = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-execution-types = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-fs-util = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-metrics = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-network = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-network-api = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-network-peers = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-node-api = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-node-builder = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-node-core = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-node-ethereum = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-node-events = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-node-metrics = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-payload-builder = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-payload-builder-primitives = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-payload-primitives = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-payload-util = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-payload-validator = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-primitives-traits = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-provider = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-prune = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-prune-types = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-revm = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-rpc = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-rpc-api = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-rpc-builder = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-rpc-engine-api = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-rpc-eth-api = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-rpc-eth-types = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-rpc-server-types = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-stages = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-stages-types = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-static-file = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-static-file-types = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-storage-api = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-storage-errors = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-tasks = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-tracing = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-transaction-pool = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-trie = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-trie-common = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } +reth-trie-db = { git = "https://github.com/celo-org/reth", rev = "4861090" } +reth-zstd-compressors = { git = "https://github.com/celo-org/reth", rev = "4861090", default-features = false } # ==================== REVM (latest: op-reth versions) ==================== revm = { version = "34.0.0", default-features = false } From 5e06250ab7c8248e4cb26e1c70b8a4d060c5eafe Mon Sep 17 00:00:00 2001 From: Piers Powlesland Date: Tue, 21 Apr 2026 17:39:44 +0100 Subject: [PATCH 15/18] lint: cargo fmt --- rust/op-reth/crates/cli/src/commands/init_state.rs | 7 +++---- rust/op-reth/crates/primitives/src/celo.rs | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/op-reth/crates/cli/src/commands/init_state.rs b/rust/op-reth/crates/cli/src/commands/init_state.rs index 560cd64b987..76ff72e8c2e 100644 --- a/rust/op-reth/crates/cli/src/commands/init_state.rs +++ b/rust/op-reth/crates/cli/src/commands/init_state.rs @@ -109,10 +109,9 @@ impl> InitStateCommandOp { // counter + small offset), and new segment files are created as needed. if provider_rw.cached_storage_settings().storage_v2 { info!(target: "reth::cli", "Advancing changeset segments to migration block"); - for segment in [ - StaticFileSegment::AccountChangeSets, - StaticFileSegment::StorageChangeSets, - ] { + for segment in + [StaticFileSegment::AccountChangeSets, StaticFileSegment::StorageChangeSets] + { let mut writer = static_file_provider.latest_writer(segment)?; for block in 1..migration_block_number { writer.increment_block(block)?; diff --git a/rust/op-reth/crates/primitives/src/celo.rs b/rust/op-reth/crates/primitives/src/celo.rs index e2fbf49a341..bf6f790b378 100644 --- a/rust/op-reth/crates/primitives/src/celo.rs +++ b/rust/op-reth/crates/primitives/src/celo.rs @@ -30,7 +30,9 @@ pub const CEL2_HEADER: Header = Header { base_fee_per_gas: Some(0x5d240390e), blob_gas_used: Some(0), excess_blob_gas: Some(0), - parent_beacon_block_root: Some(b256!("0x6cb2e365f9d78b9071b90e8a1f4675d378cd0867b858571dc1b172ef1d3e085c")), + parent_beacon_block_root: Some(b256!( + "0x6cb2e365f9d78b9071b90e8a1f4675d378cd0867b858571dc1b172ef1d3e085c" + )), requests_hash: None, }; From 160824069d0bc735d6a03f6d83c059bea6ced7e4 Mon Sep 17 00:00:00 2001 From: Piers Powlesland Date: Tue, 21 Apr 2026 17:56:11 +0100 Subject: [PATCH 16/18] build: Add celo reth fork to allowed git repos --- rust/deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/deny.toml b/rust/deny.toml index 461d1eda193..b8f5e33c464 100644 --- a/rust/deny.toml +++ b/rust/deny.toml @@ -94,6 +94,7 @@ registries = [] [sources] allow-git = [ "https://github.com/paradigmxyz/reth", + "https://github.com/celo-org/reth", "https://github.com/alloy-rs/alloy", "https://github.com/alloy-rs/hardforks", "https://github.com/alloy-rs/evm", From 91c00324ff4b0f79a233f9b3b27532bcab3e2503 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Wed, 15 Apr 2026 16:27:12 +0200 Subject: [PATCH 17/18] cleanup --- scripts/check_dump_addresses.py | 48 --------------------------------- scripts/prepare_celo_import.sh | 8 ++---- 2 files changed, 2 insertions(+), 54 deletions(-) delete mode 100755 scripts/check_dump_addresses.py diff --git a/scripts/check_dump_addresses.py b/scripts/check_dump_addresses.py deleted file mode 100755 index 19e9d14f5c5..00000000000 --- a/scripts/check_dump_addresses.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 -"""Check a JSONL state dump for lines missing the 'address' field.""" - -import json -import os -import sys - - -def main(): - if len(sys.argv) != 2: - print(f"Usage: {sys.argv[0]} ", file=sys.stderr) - sys.exit(1) - - path = sys.argv[1] - total_size = os.path.getsize(path) - bytes_read = 0 - last_pct = -1 - - with open(path) as f: - for i, line in enumerate(f, start=1): - bytes_read += len(line.encode()) - pct = int(bytes_read * 100 / total_size) - if pct != last_pct: - print(f"\r {pct}% ({i:,} lines)", end="", flush=True, file=sys.stderr) - last_pct = pct - line = line.strip() - if not line: - continue - try: - entry = json.loads(line) - except json.JSONDecodeError as e: - print(f"Line {i}: INVALID JSON: {e}") - print(f" Content: {line[:200]}") - continue - - if "address" not in entry: - if "key" in entry: - print(f"\nLine {i}: missing 'address' field (key: {entry['key']})") - else: - print(f"\nLine {i}: missing 'address' field, no key either") - print(f" Keys: {list(entry.keys())}") - print(f" Content: {line[:200]}") - - print(f"\nDone. Checked {i:,} lines.", file=sys.stderr) - - -if __name__ == "__main__": - main() diff --git a/scripts/prepare_celo_import.sh b/scripts/prepare_celo_import.sh index fdf8a1fbbdc..249985dbcc5 100755 --- a/scripts/prepare_celo_import.sh +++ b/scripts/prepare_celo_import.sh @@ -32,11 +32,7 @@ else echo "==> L1 state dump already exists: $dump" fi -# Step 1: Fix zero address -echo "==> Fixing zero address entry..." -"$SCRIPT_DIR/fix_dump_zero_address.sh" "$dump" - -# Step 2: Append L2 allocs and update state root +# Step 1: Append L2 allocs and update state root if [ ! -f "$dump_allocs" ]; then echo "==> Appending L2 allocs..." python3 "$SCRIPT_DIR/append_l2_allocs.py" "$dump" @@ -44,7 +40,7 @@ else echo "==> Allocs file already exists: $dump_allocs" fi -# Step 3: Initialize reth +# Step 2: Initialize reth echo "==> Initializing reth (ulimit -n 10240)..." ulimit -n 10240 op-reth init-state \ From d6272dc95f81822833f154db9d715a766f5c5d48 Mon Sep 17 00:00:00 2001 From: piersy Date: Wed, 10 Jun 2026 16:49:33 +0100 Subject: [PATCH 18/18] Bump for circleci rerun --- scripts/prepare_celo_import.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/prepare_celo_import.sh b/scripts/prepare_celo_import.sh index 249985dbcc5..073f5ecf5b2 100755 --- a/scripts/prepare_celo_import.sh +++ b/scripts/prepare_celo_import.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# # Prepare and run the Celo L1 state import into op-reth. # See rust/op-reth/CELO_MIGRATION.md for details.