From 774adca13393c8bc00733b173d5cd2e8f24f3f6a Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Fri, 25 Sep 2026 15:04:30 -0700 Subject: [PATCH 1/8] fix(op-reth): handle partial trie pipeline sync --- rust/Cargo.lock | 1 + rust/op-reth/crates/exex/Cargo.toml | 4 +- rust/op-reth/crates/exex/src/lib.rs | 93 ++++++++++++++++++++++++++++- 3 files changed, 95 insertions(+), 3 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 58f3302a4ab..088e67f23a1 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -13463,6 +13463,7 @@ dependencies = [ "reth-optimism-trie", "reth-primitives-traits", "reth-provider", + "reth-stages-types", "reth-trie", "tempfile", "tokio", diff --git a/rust/op-reth/crates/exex/Cargo.toml b/rust/op-reth/crates/exex/Cargo.toml index e112dd325eb..708acc77098 100644 --- a/rust/op-reth/crates/exex/Cargo.toml +++ b/rust/op-reth/crates/exex/Cargo.toml @@ -18,6 +18,7 @@ reth-execution-types.workspace = true reth-node-api.workspace = true reth-trie.workspace = true reth-provider.workspace = true +reth-stages-types.workspace = true # op-reth # proofs exex handles `TrieUpdates` in notifications @@ -54,7 +55,8 @@ test-utils = [ "reth-provider/test-utils", "reth-ethereum-primitives/test-utils", "reth-primitives-traits/test-utils", - "reth-optimism-trie/test-utils" + "reth-optimism-trie/test-utils", + "reth-stages-types/test-utils" ] metrics = [ "reth-optimism-trie/metrics", diff --git a/rust/op-reth/crates/exex/src/lib.rs b/rust/op-reth/crates/exex/src/lib.rs index be269e08103..953fd7f2789 100644 --- a/rust/op-reth/crates/exex/src/lib.rs +++ b/rust/op-reth/crates/exex/src/lib.rs @@ -17,7 +17,8 @@ use reth_node_api::{FullNodeComponents, NodePrimitives, NodeTypes}; use reth_optimism_trie::{ OpProofStoragePruner, OpProofsProviderRO, OpProofsStore, engine::EngineHandle, }; -use reth_provider::BlockNumReader; +use reth_provider::{BlockNumReader, StageCheckpointReader}; +use reth_stages_types::StageId; use reth_trie::{HashedPostStateSorted, SortedTrieData, updates::TrieUpdatesSorted}; use std::sync::Arc; use tracing::{debug, info}; @@ -298,6 +299,30 @@ where return Ok(()); } + // During pipeline sync, block execution can run ahead of the Merkle stage. A state + // provider above the durable trie frontier depends on the canonical memory chain, which + // the pipeline can prune concurrently. Defer to the retrying sync loop until the required + // parent is durable instead of racing that pruning. + let execution_parent = new.blocks().iter().rev().find_map(|(&block_number, block)| { + let should_verify = self.verification_interval > 0 && + block_number.is_multiple_of(self.verification_interval); + (should_verify || new.trie_data_at(block_number).is_none()) + .then_some((block_number.saturating_sub(1), block.parent_hash())) + }); + if let Some((parent_number, parent_hash)) = execution_parent && + !self.state_trie_covers(parent_number)? + { + debug!( + target: "optimism::exex", + parent_number, + ?parent_hash, + target_block = new.tip().number(), + "Deferring proofs-history execution until parent state is available", + ); + engine_handle.sync_to(new.tip().number())?; + return Ok(()); + } + // `Chain::blocks()` is a BTreeMap so iteration is already ordered oldest → newest. for (&block_number, block) in new.blocks() { // Fast path: use pre-computed trie data only when verification is not due. @@ -322,6 +347,22 @@ where Ok(()) } + /// Returns whether reth has durably persisted state and trie data through `block_number`. + fn state_trie_covers(&self, block_number: u64) -> eyre::Result { + let partial_state_trie = self + .ctx + .provider() + .get_stage_checkpoint(StageId::Finish)? + .map(|checkpoint| { + checkpoint + .finish_stage_checkpoint() + .and_then(|finish| finish.partial_state_trie()) + .unwrap_or(checkpoint.block_number) + }) + .unwrap_or_default(); + Ok(partial_state_trie >= block_number) + } + fn handle_chain_reorged( &self, old: Arc>, @@ -458,11 +499,26 @@ mod tests { trie_data.insert(n, data); } + mk_chain(blocks, from, trie_data) + } + + fn mk_chain_without_updates( + from: u64, + to: u64, + ) -> Chain { + mk_chain((from..=to).map(mk_block).collect(), from, BTreeMap::new()) + } + + fn mk_chain( + blocks: Vec>, + first_block: u64, + trie_data: BTreeMap, + ) -> Chain { let execution_outcome: ExecutionOutcome = ExecutionOutcome { bundle: Default::default(), receipts: Vec::new(), requests: Vec::new(), - first_block: from, + first_block, }; Chain::new(blocks, execution_outcome, trie_data) @@ -890,6 +946,39 @@ mod tests { assert_eq!(err.to_string(), "No blocks found"); } + #[tokio::test] + async fn handle_notification_defers_execution_while_merkle_stage_is_behind() { + let dir = tempdir_path(); + let store = Arc::new(MdbxProofsStorageV2::new(dir.as_path()).expect("env")); + init_storage(store.clone()); + + let (ctx, _handle) = + reth_exex_test_utils::test_exex_context().await.expect("exex test context"); + let pruner = OpProofStoragePruner::new(store.clone(), ctx.components.provider.clone(), 20); + let engine_handle = EngineHandle::spawn_with_thresholds( + ctx.components.components.evm_config.clone(), + ctx.components.provider.clone(), + store.clone(), + pruner, + 1, + 2, + ); + let exex = build_test_exex(ctx, store.clone()); + + // Without pre-computed trie data this notification needs EVM execution. The test provider + // has no state for its parent and no completed Merkle checkpoint, so execution must be + // handed to the retrying sync loop rather than failing the ExEx. + let notif = + ExExNotification::ChainCommitted { new: Arc::new(mk_chain_without_updates(5, 10)) }; + exex.handle_notification(notif, &engine_handle) + .expect("unavailable parent state should defer execution"); + + engine_handle.flush(); + let latest = + store.provider_ro().expect("provider ro").get_latest_block().expect("get").number; + assert_eq!(latest, 0); + } + #[tokio::test] async fn handle_notification_schedules_async_on_gap() { // MDBX proofs storage From c2ab313163236d41a8e649a22d0081243eaf838a Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Fri, 25 Sep 2026 13:35:39 -0700 Subject: [PATCH 2/8] rust: update reth to v2.6.0 --- rust/Cargo.lock | 594 +++++++++--------- rust/Cargo.toml | 232 +++---- rust/alloy-op-evm/src/block/mod.rs | 5 +- rust/alloy-op-evm/src/env.rs | 4 +- rust/alloy-op-evm/src/lib.rs | 2 +- rust/alloy-op-evm/src/tx.rs | 2 +- rust/alloy-op-hardforks/src/lib.rs | 3 +- .../src/fpvm_evm/precompiles/provider.rs | 2 +- rust/kona/sp1/programs/Cargo.lock | 72 +-- rust/kona/sp1/programs/Cargo.toml | 4 +- .../crates/cli/tests/snapshots/cli.snap | 22 +- rust/op-reth/crates/consensus/src/lib.rs | 2 +- rust/op-reth/crates/consensus/src/proof.rs | 2 +- .../crates/consensus/src/validation/mod.rs | 8 +- rust/op-reth/crates/evm/src/build.rs | 16 +- rust/op-reth/crates/evm/src/config.rs | 2 +- rust/op-reth/crates/evm/src/lib.rs | 7 +- rust/op-reth/crates/hardforks/src/lib.rs | 2 +- rust/op-reth/crates/node/Cargo.toml | 2 - rust/op-reth/crates/node/tests/it/main.rs | 2 - .../crates/node/tests/it/p2p_version.rs | 4 +- .../crates/node/tests/it/payload_handoff.rs | 382 ----------- rust/op-reth/crates/payload/src/lib.rs | 2 +- rust/op-reth/crates/payload/src/payload.rs | 2 +- rust/op-reth/crates/payload/src/validator.rs | 9 +- rust/op-reth/crates/rpc/src/engine.rs | 4 +- rust/op-reth/crates/rpc/src/eth/mod.rs | 7 +- rust/op-reth/crates/rpc/src/eth/proofs.rs | 2 +- .../op-reth/crates/rpc/src/eth/transaction.rs | 6 +- rust/op-reth/crates/trie/src/db/store.rs | 155 ++--- .../crates/trie/src/db/store_v2/backfill.rs | 10 +- .../trie/src/db/store_v2/snapshot_tests.rs | 42 +- .../crates/trie/src/db/store_v2/tests.rs | 46 +- .../crates/trie/src/db/store_v2/write.rs | 179 +----- .../crates/trie/src/engine/buffer/overlay.rs | 31 +- rust/op-reth/crates/trie/src/in_memory.rs | 35 +- rust/op-reth/crates/trie/src/proof.rs | 35 +- rust/op-reth/crates/trie/src/provider.rs | 16 +- rust/op-reth/crates/trie/tests/lib.rs | 22 +- rust/op-reth/crates/txpool/src/pool.rs | 5 +- rust/op-reth/crates/txpool/src/validator.rs | 2 +- rust/op-revm/src/api/exec.rs | 12 +- rust/op-revm/src/evm.rs | 4 +- rust/op-revm/src/handler.rs | 20 +- rust/op-revm/src/precompiles.rs | 10 +- rust/op-revm/src/spec.rs | 2 +- rust/op-revm/src/transaction/abstraction.rs | 2 +- 47 files changed, 741 insertions(+), 1290 deletions(-) delete mode 100644 rust/op-reth/crates/node/tests/it/payload_handoff.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 088e67f23a1..c1d174f056d 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -318,9 +318,9 @@ dependencies = [ [[package]] name = "alloy-eip7928" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b12337f74cbfa451cb04dac173974814a6ff463079e1793aa09600ba8813ab" +checksum = "1cb19c9d53b507960f649e5689f7098e556696023fe1b57b67f2181ed54bc5b7" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -377,7 +377,7 @@ dependencies = [ "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eip8141", "alloy-primitives", "alloy-rlp", @@ -397,9 +397,9 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b307a52f91f7f3aad56b5cb4f54e5eb17dd0b3f4b2c82823301499fe1c6fdaf" +checksum = "7b6bd5f7e5ce9858bac99275e3f548c3b63bb3e5806da0142dc0b2f518d3ec4a" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -432,9 +432,9 @@ dependencies = [ [[package]] name = "alloy-hardforks" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ba208044232d14d4adbfa77e57d6329f51bc1acc21f5667bb7db72d88a0831" +checksum = "865371fb677c005f7cb0ea9c2847a1ba4fdb042caf6428b1769fee20368bbfc7" dependencies = [ "alloy-chains", "alloy-eip2124", @@ -4354,7 +4354,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -4722,7 +4722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4950,7 +4950,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5341,8 +5341,8 @@ dependencies = [ "libc", "log", "rustversion", - "windows-link 0.2.1", - "windows-result 0.4.1", + "windows-link 0.1.3", + "windows-result 0.3.4", ] [[package]] @@ -6014,7 +6014,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.5", "system-configuration", "tokio", "tower-layer", @@ -6035,7 +6035,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.2", + "windows-core 0.61.2", ] [[package]] @@ -6462,7 +6462,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -9142,7 +9142,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -10935,7 +10935,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.5.10", + "socket2 0.6.5", "thiserror 2.0.18", "tokio", "tracing", @@ -10974,9 +10974,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2 0.6.5", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -11489,8 +11489,8 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth-basic-payload-builder" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11516,8 +11516,8 @@ dependencies = [ [[package]] name = "reth-chain-state" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11547,8 +11547,8 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", @@ -11567,8 +11567,8 @@ dependencies = [ [[package]] name = "reth-cli" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-genesis", "clap", @@ -11580,11 +11580,12 @@ dependencies = [ [[package]] name = "reth-cli-commands" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-primitives", "alloy-rlp", @@ -11669,8 +11670,8 @@ dependencies = [ [[package]] name = "reth-cli-runner" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "reth-tasks", "tokio", @@ -11679,8 +11680,8 @@ dependencies = [ [[package]] name = "reth-cli-util" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -11700,9 +11701,9 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0dd7f542fbcae0e490ebe13f3eababcc05547375246ff7f62700b533cf3f01" +checksum = "a6bac09d9d84a412ae151149ec870d6eb7770335c5eb63f209453d81deff8d39" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11721,9 +11722,9 @@ dependencies = [ [[package]] name = "reth-codecs-derive" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e508fcbb8cb775639dbbb56b81b62756d4322f28e76c60a52aa32575f993fe" +checksum = "0101b1f474563c4c48c04fc2477199279a53d9c19b65301c6fd2131cf6e4a330" dependencies = [ "proc-macro2", "quote", @@ -11732,8 +11733,8 @@ dependencies = [ [[package]] name = "reth-config" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "eyre", "humantime-serde", @@ -11749,11 +11750,11 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-primitives", "auto_impl", "reth-execution-types", @@ -11763,8 +11764,8 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11776,8 +11777,8 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11801,8 +11802,8 @@ dependencies = [ [[package]] name = "reth-db" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "derive_more 2.1.1", @@ -11811,12 +11812,12 @@ dependencies = [ "metrics", "page_size", "parking_lot", - "quanta", "reth-db-api", "reth-fs-util", "reth-libmdbx", "reth-metrics", "reth-nippy-jar", + "reth-primitives-traits", "reth-static-file-types", "reth-storage-errors", "reth-tracing", @@ -11830,10 +11831,11 @@ dependencies = [ [[package]] name = "reth-db-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", + "alloy-eips 2.5.0", "alloy-primitives", "arbitrary", "arrayvec", @@ -11856,8 +11858,8 @@ dependencies = [ [[package]] name = "reth-db-common" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-genesis", @@ -11886,8 +11888,8 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -11901,8 +11903,8 @@ dependencies = [ [[package]] name = "reth-discv4" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -11926,8 +11928,8 @@ dependencies = [ [[package]] name = "reth-discv5" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -11950,8 +11952,8 @@ dependencies = [ [[package]] name = "reth-dns-discovery" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "dashmap", @@ -11974,8 +11976,8 @@ dependencies = [ [[package]] name = "reth-downloaders" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11990,6 +11992,7 @@ dependencies = [ "rayon", "reth-config", "reth-consensus", + "reth-eth-wire-types", "reth-ethereum-primitives", "reth-metrics", "reth-network-p2p", @@ -11999,6 +12002,7 @@ dependencies = [ "reth-storage-api", "reth-tasks", "reth-testing-utils", + "reth-trie-common", "tempfile", "thiserror 2.0.18", "tokio", @@ -12009,8 +12013,8 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12055,6 +12059,8 @@ dependencies = [ "reth-tasks", "reth-tokio-util", "reth-tracing", + "reth-trie", + "reth-trie-db", "revm", "serde_json", "tempfile", @@ -12066,8 +12072,8 @@ dependencies = [ [[package]] name = "reth-ecies" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "aes", "alloy-primitives", @@ -12093,8 +12099,8 @@ dependencies = [ [[package]] name = "reth-engine-local" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12116,8 +12122,8 @@ dependencies = [ [[package]] name = "reth-engine-primitives" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12143,11 +12149,11 @@ dependencies = [ [[package]] name = "reth-engine-tree" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-evm", "alloy-primitives", @@ -12199,8 +12205,8 @@ dependencies = [ [[package]] name = "reth-engine-util" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12229,8 +12235,8 @@ dependencies = [ [[package]] name = "reth-era" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12247,8 +12253,8 @@ dependencies = [ [[package]] name = "reth-era-downloader" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "bytes", @@ -12263,8 +12269,8 @@ dependencies = [ [[package]] name = "reth-era-utils" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12287,8 +12293,8 @@ dependencies = [ [[package]] name = "reth-errors" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -12298,8 +12304,8 @@ dependencies = [ [[package]] name = "reth-eth-wire" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-chains", "alloy-primitives", @@ -12327,12 +12333,12 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-hardforks", "alloy-primitives", @@ -12353,8 +12359,8 @@ dependencies = [ [[package]] name = "reth-ethereum" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth 2.4.2", @@ -12394,8 +12400,8 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "clap", "eyre", @@ -12417,8 +12423,8 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12433,8 +12439,8 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -12449,8 +12455,8 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -12463,8 +12469,8 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12493,12 +12499,11 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", - "alloy-primitives", "alloy-rpc-types-eth 2.4.2", "reth-codecs", "reth-primitives-traits", @@ -12507,8 +12512,8 @@ dependencies = [ [[package]] name = "reth-etl" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "rayon", "reth-db-api", @@ -12517,11 +12522,11 @@ dependencies = [ [[package]] name = "reth-evm" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-evm", "alloy-primitives", @@ -12543,8 +12548,8 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12563,8 +12568,8 @@ dependencies = [ [[package]] name = "reth-execution-cache" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "fixed-cache", @@ -12581,8 +12586,8 @@ dependencies = [ [[package]] name = "reth-execution-errors" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-evm", "alloy-primitives", @@ -12594,8 +12599,8 @@ dependencies = [ [[package]] name = "reth-execution-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12613,8 +12618,8 @@ dependencies = [ [[package]] name = "reth-exex" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12651,8 +12656,8 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "eyre", @@ -12683,8 +12688,8 @@ dependencies = [ [[package]] name = "reth-exex-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -12697,8 +12702,8 @@ dependencies = [ [[package]] name = "reth-fs-util" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "serde", "serde_json", @@ -12707,8 +12712,8 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12733,8 +12738,8 @@ dependencies = [ [[package]] name = "reth-ipc" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "bytes", "futures", @@ -12753,8 +12758,8 @@ dependencies = [ [[package]] name = "reth-libmdbx" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "bitflags 2.11.1", "byteorder", @@ -12770,8 +12775,8 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "bindgen", "cc", @@ -12779,8 +12784,8 @@ dependencies = [ [[package]] name = "reth-metrics" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "futures", "libc", @@ -12793,8 +12798,8 @@ dependencies = [ [[package]] name = "reth-net-banlist" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "ipnet", @@ -12802,8 +12807,8 @@ dependencies = [ [[package]] name = "reth-net-nat" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "futures-util", "if-addrs 0.14.0", @@ -12816,8 +12821,8 @@ dependencies = [ [[package]] name = "reth-network" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12875,8 +12880,8 @@ dependencies = [ [[package]] name = "reth-network-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12900,11 +12905,11 @@ dependencies = [ [[package]] name = "reth-network-p2p" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-primitives", "auto_impl", @@ -12924,8 +12929,8 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -12939,8 +12944,8 @@ dependencies = [ [[package]] name = "reth-network-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -12953,8 +12958,8 @@ dependencies = [ [[package]] name = "reth-nippy-jar" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "anyhow", "bincode 1.3.3", @@ -12963,6 +12968,7 @@ dependencies = [ "memmap2", "reth-fs-util", "serde", + "smallvec", "thiserror 2.0.18", "tracing", "zstd", @@ -12970,8 +12976,8 @@ dependencies = [ [[package]] name = "reth-node-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -12994,8 +13000,8 @@ dependencies = [ [[package]] name = "reth-node-builder" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13062,8 +13068,8 @@ dependencies = [ [[package]] name = "reth-node-core" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13117,18 +13123,20 @@ dependencies = [ [[package]] name = "reth-node-ethereum" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", "alloy-network 2.4.2", "alloy-primitives", + "alloy-rlp", "alloy-rpc-types-engine", "alloy-rpc-types-eth 2.4.2", "ethereum_ssz", "ethereum_ssz_derive", "eyre", + "futures", "http-body-util", "jsonrpsee", "reth-chainspec", @@ -13155,8 +13163,10 @@ dependencies = [ "reth-rpc-eth-api", "reth-rpc-eth-types", "reth-rpc-server-types", + "reth-tasks", "reth-tracing", "reth-transaction-pool", + "reth-trie-common", "revm", "serde", "serde_json", @@ -13166,8 +13176,8 @@ dependencies = [ [[package]] name = "reth-node-ethstats" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -13190,8 +13200,8 @@ dependencies = [ [[package]] name = "reth-node-events" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13214,8 +13224,8 @@ dependencies = [ [[package]] name = "reth-node-metrics" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "bytes", "eyre", @@ -13228,6 +13238,7 @@ dependencies = [ "metrics-exporter-prometheus", "metrics-process", "metrics-util", + "parking_lot", "pprof_util", "procfs", "reqwest 0.13.2", @@ -13243,8 +13254,8 @@ dependencies = [ [[package]] name = "reth-node-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "reth-chainspec", "reth-db-api", @@ -13555,7 +13566,6 @@ dependencies = [ "op-alloy-network", "op-alloy-rpc-types-engine", "op-revm", - "reth-basic-payload-builder", "reth-chain-state", "reth-chainspec", "reth-consensus", @@ -13569,7 +13579,6 @@ dependencies = [ "reth-node-api", "reth-node-builder", "reth-node-core", - "reth-node-metrics", "reth-optimism-chainspec", "reth-optimism-consensus", "reth-optimism-evm", @@ -13881,8 +13890,8 @@ dependencies = [ [[package]] name = "reth-payload-builder" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -13905,8 +13914,8 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "pin-project", "reth-payload-primitives", @@ -13917,8 +13926,8 @@ dependencies = [ [[package]] name = "reth-payload-primitives" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13940,8 +13949,8 @@ dependencies = [ [[package]] name = "reth-payload-util" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -13950,8 +13959,8 @@ dependencies = [ [[package]] name = "reth-payload-validator" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-rpc-types-engine", @@ -13960,11 +13969,12 @@ dependencies = [ [[package]] name = "reth-primitives-traits" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4666a8d5b246650b23e6767a45e46334d352557f473e91c2ea7211cc29291cca" +checksum = "18341fba74d004c7fad32f784488baaea9adebfde7a4f231a4d8d445aea70347" dependencies = [ "alloy-consensus 2.4.2", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-genesis", "alloy-primitives", @@ -13993,11 +14003,11 @@ dependencies = [ [[package]] name = "reth-provider" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-genesis", "alloy-primitives", @@ -14043,8 +14053,8 @@ dependencies = [ [[package]] name = "reth-prune" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -14070,8 +14080,8 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "arbitrary", @@ -14086,8 +14096,8 @@ dependencies = [ [[package]] name = "reth-revm" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -14101,12 +14111,12 @@ dependencies = [ [[package]] name = "reth-rpc" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-dyn-abi", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-evm", "alloy-genesis", @@ -14177,8 +14187,8 @@ dependencies = [ [[package]] name = "reth-rpc-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-genesis", @@ -14207,8 +14217,8 @@ dependencies = [ [[package]] name = "reth-rpc-builder" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-network 2.4.2", "alloy-provider", @@ -14250,8 +14260,8 @@ dependencies = [ [[package]] name = "reth-rpc-convert" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-evm", @@ -14270,8 +14280,8 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -14301,12 +14311,12 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-dyn-abi", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-evm", "alloy-json-rpc 2.5.0", @@ -14348,12 +14358,12 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-evm", "alloy-network 2.4.2", @@ -14385,7 +14395,6 @@ dependencies = [ "reth-storage-api", "reth-tasks", "reth-transaction-pool", - "reth-trie", "revm", "revm-inspectors", "schnellru", @@ -14399,13 +14408,15 @@ dependencies = [ [[package]] name = "reth-rpc-layer" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-rpc-types-engine", "http 1.4.0", + "http-body-util", "jsonrpsee-http-client", "pin-project", + "tokio", "tower 0.5.3", "tower-http", "tracing", @@ -14413,10 +14424,9 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ - "alloy-eips 2.5.0", "alloy-primitives", "alloy-rpc-types-engine", "jsonrpsee-core", @@ -14429,9 +14439,9 @@ dependencies = [ [[package]] name = "reth-rpc-traits" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b417a50d3fa9b58bb1a22e46fb47e0866006f24abffa1fbe75ae60116b5b2efa" +checksum = "f410d6bff1fd059ebaec2edeff1326f103f61162158411325d78158f94b2b4a9" dependencies = [ "alloy-consensus 2.4.2", "alloy-network 2.4.2", @@ -14444,10 +14454,11 @@ dependencies = [ [[package]] name = "reth-stages" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", + "alloy-eip7928 0.4.10", "alloy-primitives", "alloy-rlp", "eyre", @@ -14495,8 +14506,8 @@ dependencies = [ [[package]] name = "reth-stages-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -14523,8 +14534,8 @@ dependencies = [ [[package]] name = "reth-stages-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "arbitrary", @@ -14537,8 +14548,8 @@ dependencies = [ [[package]] name = "reth-static-file" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "parking_lot", @@ -14557,8 +14568,8 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "clap", @@ -14572,11 +14583,11 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "alloy-eips 2.5.0", "alloy-primitives", "alloy-rpc-types-engine", @@ -14598,8 +14609,8 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -14615,8 +14626,8 @@ dependencies = [ [[package]] name = "reth-storage-overlay" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -14637,13 +14648,14 @@ dependencies = [ "reth-trie", "reth-trie-common", "reth-trie-db", + "revm", "tracing", ] [[package]] name = "reth-tasks" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "crossbeam-utils", "dashmap", @@ -14663,8 +14675,8 @@ dependencies = [ [[package]] name = "reth-testing-utils" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -14679,8 +14691,8 @@ dependencies = [ [[package]] name = "reth-tokio-util" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "tokio", "tokio-stream", @@ -14689,8 +14701,8 @@ dependencies = [ [[package]] name = "reth-tracing" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "clap", "eyre", @@ -14709,8 +14721,8 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "base64 0.22.1", "clap", @@ -14728,8 +14740,8 @@ dependencies = [ [[package]] name = "reth-transaction-pool" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -14773,8 +14785,8 @@ dependencies = [ [[package]] name = "reth-trie" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -14799,8 +14811,8 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -14822,12 +14834,13 @@ dependencies = [ "revm", "serde", "serde_with", + "thiserror 2.0.18", ] [[package]] name = "reth-trie-db" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "reth-db-api", @@ -14842,8 +14855,8 @@ dependencies = [ [[package]] name = "reth-trie-parallel" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-evm", "alloy-primitives", @@ -14858,7 +14871,6 @@ dependencies = [ "reth-storage-errors", "reth-tasks", "reth-trie", - "reth-trie-sparse", "revm", "thiserror 2.0.18", "tracing", @@ -14866,8 +14878,8 @@ dependencies = [ [[package]] name = "reth-trie-sparse" -version = "2.5.2" -source = "git+https://github.com/ethereum-optimism/reth?rev=0fbe428518594611bdd3fdd822eb5968823c8e66#0fbe428518594611bdd3fdd822eb5968823c8e66" +version = "2.6.0" +source = "git+https://github.com/ethereum-optimism/reth?rev=4553cf1cab34d402fde04e6510bda0a3425df803#4553cf1cab34d402fde04e6510bda0a3425df803" dependencies = [ "alloy-primitives", "alloy-trie", @@ -14878,8 +14890,6 @@ dependencies = [ "reth-metrics", "reth-primitives-traits", "reth-trie-common", - "serde", - "serde_json", "slotmap", "smallvec", "strum", @@ -14888,18 +14898,18 @@ dependencies = [ [[package]] name = "reth-zstd-compressors" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80addacffc5df9398c55919f8993922d2b688f2aa5753708fdd658ca3cc63e39" +checksum = "dbdee2f0ad09dc32b43ab52641f8239766a66de4345834bad27d5cfa2f62864d" dependencies = [ "zstd", ] [[package]] name = "revm" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c7fcd426beab3b91300a6d0d5eb8d583c0fad0fba451126e19fd51443eca62" +checksum = "55f2322f5ea197fac72c2cdc88cb501b2a7db0b0009911133fd3dda45bfceedd" dependencies = [ "revm-bytecode", "revm-context", @@ -14916,9 +14926,9 @@ dependencies = [ [[package]] name = "revm-bytecode" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537356bdec80dbc04e4e6bb688b3441ff7cf18eecdcf3cac23150633c46467f1" +checksum = "c8d38e16b72ec1c836ec8490562bfb21003165ea8bc496086bf345680a6e6c41" dependencies = [ "bitvec", "phf 0.14.0", @@ -14928,9 +14938,9 @@ dependencies = [ [[package]] name = "revm-context" -version = "42.0.0" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6512f05f83378e29b2b016fa5bd7f5a533e3625548be4113732e1a536c2564" +checksum = "c16835bc2ead203219a18fcc84c2c71879ad6b890e8a71150cf7f10e4e355dc4" dependencies = [ "bitvec", "cfg-if", @@ -14945,9 +14955,9 @@ dependencies = [ [[package]] name = "revm-context-interface" -version = "42.0.0" +version = "43.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "103fff818b10311034c0c11ff8760294ee0e3c320daab3c5717990fe8ee2617b" +checksum = "e3b4109bdceaca5ee6e27bf41f6b156f2b15892dc5bb47d3530bc4d3b3060077" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -14961,9 +14971,9 @@ dependencies = [ [[package]] name = "revm-database" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df72760eab0852100e748c7cb03ce0221626d60ac14534118c84c5cc894fb4c9" +checksum = "31d764afa9a1c9278c05d40461b07319d21ccb39c1bdf0e9dde7e5ea7d9be53d" dependencies = [ "alloy-eips 2.5.0", "derive_more 2.1.1", @@ -14977,9 +14987,9 @@ dependencies = [ [[package]] name = "revm-database-interface" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9286c059a11be1dee814cafdc3a3ade57521c8caa050785a52c19a9d894f400" +checksum = "d2a27e4440c2ef4932afdaa28a1d1ac8601504c7030c1a387b5e307d07d864d1" dependencies = [ "auto_impl", "either", @@ -15001,9 +15011,9 @@ dependencies = [ [[package]] name = "revm-handler" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09126175c3fa482e71e80cc28c6bb17e681911e472b94d4f7f73dd6780411798" +checksum = "73a7409031d87ec281b74efff65d7a4dbea9d80727a55dbc7e4b3fd77b5e03fb" dependencies = [ "auto_impl", "derive-where", @@ -15020,9 +15030,9 @@ dependencies = [ [[package]] name = "revm-inspector" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa55b208b52f0c083ea68147c78866eeecadd7c0071a614f477de316b60648e" +checksum = "7a56f37224afd628f7244aa6965609ada04b440ed8ab7a19f55e4291df5a0112" dependencies = [ "auto_impl", "either", @@ -15038,9 +15048,9 @@ dependencies = [ [[package]] name = "revm-inspectors" -version = "0.42.2" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c136a072540987ee442e9824631835520b13e5756f20780a637ba2e11f9c28" +checksum = "79b609cb78fcb3a8c10f3190847c9bb0223423cf46e2de30a61ea9e37a3e6736" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth 2.4.2", @@ -15058,9 +15068,9 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "42.0.0" +version = "43.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd310927437752ce4bac6997b385772823b84843f04c82e151993bec1265a5ed" +checksum = "932f7fe05a2cdeb08195dd7e88a09a4da7c3660cdc6e62720839c77ba77f65aa" dependencies = [ "revm-bytecode", "revm-context-interface", @@ -15071,9 +15081,9 @@ dependencies = [ [[package]] name = "revm-precompile" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2431091420999795df6a200b9f7933defe3d654710560a895e6bcabbd9954a5" +checksum = "ac4dc0279f2a44770faa8c93d008df684440cf573c91b8e0e39d0d581abf7b3d" dependencies = [ "ark-bls12-381 0.6.0", "ark-bn254", @@ -15099,9 +15109,9 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef5564c1bce219fd08beca43d4f39fdcbc19193fa4f604c0c6b58950a13194a" +checksum = "f1f4ba1a5757fe4398262290422c371556fcebf236f762f7ed7ff2c56768a63c" dependencies = [ "alloy-primitives", "once_cell", @@ -15110,11 +15120,11 @@ dependencies = [ [[package]] name = "revm-state" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ae66db3abfcb565854dbfc95513bfa440b3dc390ddf8e50b0363d12a6fa79" +checksum = "7cd02082cf1baca01e8bc17456c45136bdc66632395a98db1c1a2afe4c6ea87f" dependencies = [ - "alloy-eip7928 0.4.5", + "alloy-eip7928 0.4.10", "bitflags 2.11.1", "nonmax", "revm-bytecode", @@ -15435,7 +15445,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -15503,7 +15513,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -15524,7 +15534,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.7", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -17629,7 +17639,7 @@ dependencies = [ "getrandom 0.4.2", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -18443,7 +18453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f7c95348f20c1c913d72157b3c6dee6ea3e30b3d19502c5a7f6d3f160dacbf" dependencies = [ "cc", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index df38fb1a44d..08b466125b1 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -350,104 +350,104 @@ alloy-op-evm = { version = "0.32.0", path = "alloy-op-evm/", default-features = alloy-op-hardforks = { version = "0.5.0", path = "alloy-op-hardforks/", default-features = false } # ==================== RETH CRATES (crates.io) ==================== -reth-codecs = { version = "0.6.0", default-features = false, features = [ +reth-codecs = { version = "0.7.0", default-features = false, features = [ "alloy", ] } -reth-codecs-derive = "0.6.0" -reth-primitives-traits = { version = "0.6.0", default-features = false } -reth-rpc-traits = { version = "0.6.0", default-features = false } -reth-zstd-compressors = { version = "0.6.0", default-features = false } +reth-codecs-derive = "0.7.0" +reth-primitives-traits = { version = "0.7.1", default-features = false } +reth-rpc-traits = { version = "0.7.0", default-features = false } +reth-zstd-compressors = { version = "0.7.0", default-features = false } # ==================== RETH CRATES (git) ==================== -reth = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-basic-payload-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-chain-state = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-chainspec = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-cli = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-cli-commands = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-cli-runner = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-cli-util = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-consensus = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-consensus-common = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-db = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-db-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-db-common = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-downloaders = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-e2e-test-utils = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-engine-local = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-engine-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-errors = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-eth-wire = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-eth-wire-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-ethereum = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-ethereum-cli = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-ethereum-consensus = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-ethereum-forks = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-ethereum-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-evm = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-evm-ethereum = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-exex = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-exex-test-utils = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-execution-errors = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-execution-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-fs-util = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-metrics = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-network = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-network-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-network-peers = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-node-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-node-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-node-core = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-node-ethereum = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-node-events = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-node-metrics = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-payload-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-payload-builder-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-payload-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-payload-util = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-payload-validator = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-provider = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-prune = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-prune-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-revm = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-rpc = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-rpc-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-rpc-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-rpc-engine-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-rpc-eth-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-rpc-eth-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-rpc-server-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-stages = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-stages-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-static-file = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-static-file-types = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-storage-api = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-storage-errors = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-storage-overlay = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-tasks = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-tracing = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-transaction-pool = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-trie = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } -reth-trie-common = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66", default-features = false } -reth-trie-db = { git = "https://github.com/ethereum-optimism/reth", rev = "0fbe428518594611bdd3fdd822eb5968823c8e66" } +reth = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-basic-payload-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-chain-state = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-chainspec = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-cli = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-cli-commands = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-cli-runner = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-cli-util = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-consensus = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-consensus-common = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-db = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-db-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-db-common = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-downloaders = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-e2e-test-utils = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-engine-local = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-engine-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-errors = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-eth-wire = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-eth-wire-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-ethereum = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-ethereum-cli = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-ethereum-consensus = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-ethereum-forks = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-ethereum-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-evm = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-evm-ethereum = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-exex = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-exex-test-utils = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-execution-errors = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-execution-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-fs-util = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-metrics = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-network = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-network-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-network-peers = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-node-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-node-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-node-core = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-node-ethereum = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-node-events = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-node-metrics = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-payload-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-payload-builder-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-payload-primitives = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-payload-util = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-payload-validator = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-provider = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-prune = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-prune-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-revm = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-rpc = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-rpc-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-rpc-builder = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-rpc-engine-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-rpc-eth-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-rpc-eth-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-rpc-server-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-stages = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-stages-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-static-file = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-static-file-types = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-storage-api = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-storage-errors = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-storage-overlay = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-tasks = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-tracing = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-transaction-pool = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-trie = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } +reth-trie-common = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803", default-features = false } +reth-trie-db = { git = "https://github.com/ethereum-optimism/reth", rev = "4553cf1cab34d402fde04e6510bda0a3425df803" } # ==================== REVM (latest: op-reth versions) ==================== -revm = { version = "42.0.1", default-features = false } -revm-bytecode = { version = "42.0.0", default-features = false } -revm-database = { version = "42.0.0", default-features = false } -revm-state = { version = "42.0.0", default-features = false } -revm-primitives = { version = "42.0.0", default-features = false } -revm-interpreter = { version = "42.0.0", default-features = false } -revm-database-interface = { version = "42.0.0", default-features = false } +revm = { version = "43.0.2", default-features = false } +revm-bytecode = { version = "43.0.0", default-features = false } +revm-database = { version = "43.0.0", default-features = false } +revm-state = { version = "43.0.0", default-features = false } +revm-primitives = { version = "43.0.0", default-features = false } +revm-interpreter = { version = "43.0.1", default-features = false } +revm-database-interface = { version = "43.0.0", default-features = false } op-revm = { version = "20.0.0", path = "op-revm/", default-features = false } -revm-inspectors = "0.42.0" +revm-inspectors = "0.43.0" # ==================== ALLOY ==================== alloy-chains = { version = "0.2.33", default-features = false } alloy-dyn-abi = "1.6.1" alloy-eip2124 = { version = "0.2.0", default-features = false } -alloy-eip7928 = { version = "0.4.5", default-features = false } -alloy-evm = { version = "0.38.0", default-features = false } +alloy-eip7928 = { version = "0.4.10", default-features = false } +alloy-evm = { version = "0.39.0", default-features = false } alloy-primitives = { version = "1.6.1", default-features = false, features = [ "map-foldhash", ] } @@ -458,45 +458,45 @@ alloy-sol-macro = "1.6.1" alloy-sol-types = { version = "1.6.1", default-features = false } alloy-trie = { version = "0.9.4", default-features = false } -alloy-hardforks = { version = "0.4.7", default-features = false } - -alloy-consensus = { version = "2.3.0", default-features = false } -alloy-contract = { version = "2.3.0", default-features = false } -alloy-eips = { version = "2.3.0", default-features = false } -alloy-genesis = { version = "2.3.0", default-features = false } -alloy-json-rpc = { version = "2.3.0", default-features = false } -alloy-network = { version = "2.3.0", default-features = false } -alloy-network-primitives = { version = "2.3.0", default-features = false } -alloy-node-bindings = { version = "2.3.0", default-features = false } -alloy-provider = { version = "2.3.0", features = [ +alloy-hardforks = { version = "0.4.8", default-features = false } + +alloy-consensus = { version = "2.4.2", default-features = false } +alloy-contract = { version = "2.4.2", default-features = false } +alloy-eips = { version = "2.4.2", default-features = false } +alloy-genesis = { version = "2.4.2", default-features = false } +alloy-json-rpc = { version = "2.4.2", default-features = false } +alloy-network = { version = "2.4.2", default-features = false } +alloy-network-primitives = { version = "2.4.2", default-features = false } +alloy-node-bindings = { version = "2.4.2", default-features = false } +alloy-provider = { version = "2.4.2", features = [ "reqwest", "debug-api", ], default-features = false } -alloy-pubsub = { version = "2.3.0", default-features = false } -alloy-rpc-client = { version = "2.3.0", default-features = false } -alloy-rpc-types = { version = "2.3.0", features = [ +alloy-pubsub = { version = "2.4.2", default-features = false } +alloy-rpc-client = { version = "2.4.2", default-features = false } +alloy-rpc-types = { version = "2.4.2", features = [ "eth", ], default-features = false } -alloy-rpc-types-admin = { version = "2.3.0", default-features = false } -alloy-rpc-types-anvil = { version = "2.3.0", default-features = false } -alloy-rpc-types-beacon = { version = "2.3.0", default-features = false } -alloy-rpc-types-debug = { version = "2.3.0", default-features = false } -alloy-rpc-types-engine = { version = "2.3.0", default-features = false } -alloy-rpc-types-eth = { version = "2.3.0", default-features = false } -alloy-rpc-types-mev = { version = "2.3.0", default-features = false } -alloy-rpc-types-trace = { version = "2.3.0", default-features = false } -alloy-rpc-types-txpool = { version = "2.3.0", default-features = false } -alloy-serde = { version = "2.3.0", default-features = false } -alloy-signer = { version = "2.3.0", default-features = false } +alloy-rpc-types-admin = { version = "2.4.2", default-features = false } +alloy-rpc-types-anvil = { version = "2.4.2", default-features = false } +alloy-rpc-types-beacon = { version = "2.4.2", default-features = false } +alloy-rpc-types-debug = { version = "2.4.2", default-features = false } +alloy-rpc-types-engine = { version = "2.4.2", default-features = false } +alloy-rpc-types-eth = { version = "2.4.2", default-features = false } +alloy-rpc-types-mev = { version = "2.4.2", default-features = false } +alloy-rpc-types-trace = { version = "2.4.2", default-features = false } +alloy-rpc-types-txpool = { version = "2.4.2", default-features = false } +alloy-serde = { version = "2.4.2", default-features = false } +alloy-signer = { version = "2.4.2", default-features = false } # sp1-sdk's dynamic_signer builder method uses alloy-signer 1.x, distinct from the workspace's 2.x. sp1-alloy-signer = { package = "alloy-signer", version = "1.0", default-features = false } -alloy-signer-local = { version = "2.3.0", default-features = false } -alloy-transport = { version = "2.3.0" } -alloy-transport-http = { version = "2.3.0", features = [ +alloy-signer-local = { version = "2.4.2", default-features = false } +alloy-transport = { version = "2.4.2" } +alloy-transport-http = { version = "2.4.2", features = [ "reqwest-rustls-tls", ], default-features = false } -alloy-transport-ipc = { version = "2.3.0", default-features = false } -alloy-transport-ws = { version = "2.3.0", default-features = false } +alloy-transport-ipc = { version = "2.4.2", default-features = false } +alloy-transport-ws = { version = "2.4.2", default-features = false } # ==================== OP-ALLOY (from crates.io) ==================== op-alloy = { version = "2.0.0", path = "op-alloy/crates/op-alloy", default-features = false } diff --git a/rust/alloy-op-evm/src/block/mod.rs b/rust/alloy-op-evm/src/block/mod.rs index 903aeb6d62b..a4b4dc10bf7 100644 --- a/rust/alloy-op-evm/src/block/mod.rs +++ b/rust/alloy-op-evm/src/block/mod.rs @@ -832,14 +832,15 @@ fn validate_block_gas( Ok(()) } -/// UPSTREAM-MIRROR(copy): alloy-evm@0.38.0 `alloy_evm::eth::block::EthBlockExecutor` +/// UPSTREAM-MIRROR(copy): alloy-evm@0.39.0 `alloy_evm::eth::block::EthBlockExecutor` /// /// Mirrors upstream's `BlockExecutor` impl, reusing its `EthTxResult` for the inner result /// but reimplementing every method. Known divergences to re-confirm on each bump: upstream /// tracks regular and state block gas separately and returns `GasOutput::with_state_gas`, /// this tracks `gas_used`/`evm_gas_used` and returns `GasOutput::new`; upstream's admission /// check clamps the transaction gas limit by `cfg.tx_gas_limit_cap`, `validate_block_gas` -/// does not. +/// does not. Upstream's Amsterdam state-gas capacity check is inapplicable until an OP fork maps +/// to Amsterdam semantics. impl BlockExecutor for OpBlockExecutor where E: PostExecEvm< diff --git a/rust/alloy-op-evm/src/env.rs b/rust/alloy-op-evm/src/env.rs index ed474383d5c..2c693b92362 100644 --- a/rust/alloy-op-evm/src/env.rs +++ b/rust/alloy-op-evm/src/env.rs @@ -51,7 +51,7 @@ pub fn spec_by_timestamp_after_bedrock(chain_spec: impl OpHardforks, timestamp: OpSpecId::BEDROCK } -/// UPSTREAM-MIRROR(copy): alloy-evm@0.38.0 `alloy_evm::eth::env::EvmEnvInput` +/// UPSTREAM-MIRROR(copy): alloy-evm@0.39.0 `alloy_evm::eth::env::EvmEnvInput` /// /// Omits upstream `excess_blob_gas` and `slot_number`; OP uses synthetic blob values and zero slot. /// Internal helper for constructing EVM environment from block header fields. @@ -120,7 +120,7 @@ pub fn evm_env_for_op_next_block( ) } -/// UPSTREAM-MIRROR(copy): alloy-evm@0.38.0 `alloy_evm::eth::env::EvmEnv::for_eth` +/// UPSTREAM-MIRROR(copy): alloy-evm@0.39.0 `alloy_evm::eth::env::EvmEnv::for_eth` /// /// Copies upstream environment construction with OP fork mapping and blob semantics. Upstream /// sets `cfg_env.tx_gas_limit_cap` explicitly at Osaka; this leaves it unset and relies on revm's diff --git a/rust/alloy-op-evm/src/lib.rs b/rust/alloy-op-evm/src/lib.rs index 161da26db97..afa1b4cca0b 100644 --- a/rust/alloy-op-evm/src/lib.rs +++ b/rust/alloy-op-evm/src/lib.rs @@ -297,7 +297,7 @@ impl DerefMut for OpEvm { } } -/// UPSTREAM-MIRROR(copy): alloy-evm@0.38.0 `alloy_evm::eth::EthEvm` +/// UPSTREAM-MIRROR(copy): alloy-evm@0.39.0 `alloy_evm::eth::EthEvm` /// /// Mirrors upstream's `Evm` impl for `EthEvm`, adding the OP transaction wrapper, the post-exec /// transaction short-circuit and the post-exec refund tracking. A method added to the `Evm` diff --git a/rust/alloy-op-evm/src/tx.rs b/rust/alloy-op-evm/src/tx.rs index c561ba67d7f..695905c9fe0 100644 --- a/rust/alloy-op-evm/src/tx.rs +++ b/rust/alloy-op-evm/src/tx.rs @@ -80,7 +80,7 @@ impl OpTxEnv for OpTx { } } -/// UPSTREAM-MIRROR(delegate): revm-context-interface@42.0.0 `revm_context_interface::Transaction` +/// UPSTREAM-MIRROR(delegate): revm-context-interface@43.0.1 `revm_context_interface::Transaction` /// /// Forwards the required getters and `effective_gas_price` to the inner `OpTransaction`, /// which overrides `tx_type` and `effective_gas_price` for deposits. The remaining defaulted diff --git a/rust/alloy-op-hardforks/src/lib.rs b/rust/alloy-op-hardforks/src/lib.rs index 730512da3b8..7033a27e6b6 100644 --- a/rust/alloy-op-hardforks/src/lib.rs +++ b/rust/alloy-op-hardforks/src/lib.rs @@ -175,7 +175,7 @@ impl OpHardfork { *self as usize } - /// UPSTREAM-MIRROR(set): alloy-hardforks@0.4.7 `alloy_hardforks::EthereumHardfork` + /// UPSTREAM-MIRROR(set): alloy-hardforks@0.4.8 `alloy_hardforks::EthereumHardfork` /// /// A new upstream variant needs an explicit decision here. The `VARIANTS` loop below /// only smoke-tests lookup; semantic mappings remain explicit assertions. @@ -820,6 +820,7 @@ mod tests { // L1 forks newer than the latest implied one are not activated by any OP fork. assert_eq!(OpHardfork::activating_op_fork(EthereumHardfork::Bpo1), None); assert_eq!(OpHardfork::activating_op_fork(EthereumHardfork::Amsterdam), None); + assert_eq!(OpHardfork::activating_op_fork(EthereumHardfork::Bogota), None); } #[test] diff --git a/rust/kona/bin/client/src/fpvm_evm/precompiles/provider.rs b/rust/kona/bin/client/src/fpvm_evm/precompiles/provider.rs index 3602e6f4f40..e85a848b1f5 100644 --- a/rust/kona/bin/client/src/fpvm_evm/precompiles/provider.rs +++ b/rust/kona/bin/client/src/fpvm_evm/precompiles/provider.rs @@ -96,7 +96,7 @@ where true } - /// UPSTREAM-MIRROR(copy): revm-handler@42.0.1 `revm_handler::EthPrecompiles::run` + /// UPSTREAM-MIRROR(copy): revm-handler@43.0.2 `revm_handler::EthPrecompiles::run` /// /// FPVM acceleration replaces dispatch, while output conversion delegates to revm. Re-check /// input materialization, execution errors, and gas/reservoir propagation across both paths. diff --git a/rust/kona/sp1/programs/Cargo.lock b/rust/kona/sp1/programs/Cargo.lock index d345d71ebd5..05c847e01df 100644 --- a/rust/kona/sp1/programs/Cargo.lock +++ b/rust/kona/sp1/programs/Cargo.lock @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "alloy-eip7928" -version = "0.4.2" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951e1d988b5753bc424b837c98ce0dc575031db99e7cd01833d3a5053b97951a" +checksum = "1cb19c9d53b507960f649e5689f7098e556696023fe1b57b67f2181ed54bc5b7" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -168,9 +168,9 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b307a52f91f7f3aad56b5cb4f54e5eb17dd0b3f4b2c82823301499fe1c6fdaf" +checksum = "7b6bd5f7e5ce9858bac99275e3f548c3b63bb3e5806da0142dc0b2f518d3ec4a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -199,9 +199,9 @@ dependencies = [ [[package]] name = "alloy-hardforks" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ba208044232d14d4adbfa77e57d6329f51bc1acc21f5667bb7db72d88a0831" +checksum = "865371fb677c005f7cb0ea9c2847a1ba4fdb042caf6428b1769fee20368bbfc7" dependencies = [ "alloy-chains", "alloy-eip2124", @@ -2672,9 +2672,9 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0dd7f542fbcae0e490ebe13f3eababcc05547375246ff7f62700b533cf3f01" +checksum = "a6bac09d9d84a412ae151149ec870d6eb7770335c5eb63f209453d81deff8d39" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2690,9 +2690,9 @@ dependencies = [ [[package]] name = "reth-codecs-derive" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e508fcbb8cb775639dbbb56b81b62756d4322f28e76c60a52aa32575f993fe" +checksum = "0101b1f474563c4c48c04fc2477199279a53d9c19b65301c6fd2131cf6e4a330" dependencies = [ "proc-macro2", "quote", @@ -2701,18 +2701,18 @@ dependencies = [ [[package]] name = "reth-zstd-compressors" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80addacffc5df9398c55919f8993922d2b688f2aa5753708fdd658ca3cc63e39" +checksum = "dbdee2f0ad09dc32b43ab52641f8239766a66de4345834bad27d5cfa2f62864d" dependencies = [ "zstd", ] [[package]] name = "revm" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c7fcd426beab3b91300a6d0d5eb8d583c0fad0fba451126e19fd51443eca62" +checksum = "55f2322f5ea197fac72c2cdc88cb501b2a7db0b0009911133fd3dda45bfceedd" dependencies = [ "revm-bytecode", "revm-context", @@ -2729,9 +2729,9 @@ dependencies = [ [[package]] name = "revm-bytecode" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537356bdec80dbc04e4e6bb688b3441ff7cf18eecdcf3cac23150633c46467f1" +checksum = "c8d38e16b72ec1c836ec8490562bfb21003165ea8bc496086bf345680a6e6c41" dependencies = [ "bitvec", "revm-primitives", @@ -2739,9 +2739,9 @@ dependencies = [ [[package]] name = "revm-context" -version = "42.0.0" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6512f05f83378e29b2b016fa5bd7f5a533e3625548be4113732e1a536c2564" +checksum = "c16835bc2ead203219a18fcc84c2c71879ad6b890e8a71150cf7f10e4e355dc4" dependencies = [ "bitvec", "cfg-if", @@ -2755,9 +2755,9 @@ dependencies = [ [[package]] name = "revm-context-interface" -version = "42.0.0" +version = "43.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "103fff818b10311034c0c11ff8760294ee0e3c320daab3c5717990fe8ee2617b" +checksum = "e3b4109bdceaca5ee6e27bf41f6b156f2b15892dc5bb47d3530bc4d3b3060077" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -2770,9 +2770,9 @@ dependencies = [ [[package]] name = "revm-database" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df72760eab0852100e748c7cb03ce0221626d60ac14534118c84c5cc894fb4c9" +checksum = "31d764afa9a1c9278c05d40461b07319d21ccb39c1bdf0e9dde7e5ea7d9be53d" dependencies = [ "derive_more", "either", @@ -2784,9 +2784,9 @@ dependencies = [ [[package]] name = "revm-database-interface" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9286c059a11be1dee814cafdc3a3ade57521c8caa050785a52c19a9d894f400" +checksum = "d2a27e4440c2ef4932afdaa28a1d1ac8601504c7030c1a387b5e307d07d864d1" dependencies = [ "auto_impl", "either", @@ -2797,9 +2797,9 @@ dependencies = [ [[package]] name = "revm-handler" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09126175c3fa482e71e80cc28c6bb17e681911e472b94d4f7f73dd6780411798" +checksum = "73a7409031d87ec281b74efff65d7a4dbea9d80727a55dbc7e4b3fd77b5e03fb" dependencies = [ "auto_impl", "derive-where", @@ -2815,9 +2815,9 @@ dependencies = [ [[package]] name = "revm-inspector" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa55b208b52f0c083ea68147c78866eeecadd7c0071a614f477de316b60648e" +checksum = "7a56f37224afd628f7244aa6965609ada04b440ed8ab7a19f55e4291df5a0112" dependencies = [ "auto_impl", "either", @@ -2831,9 +2831,9 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "42.0.0" +version = "43.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd310927437752ce4bac6997b385772823b84843f04c82e151993bec1265a5ed" +checksum = "932f7fe05a2cdeb08195dd7e88a09a4da7c3660cdc6e62720839c77ba77f65aa" dependencies = [ "revm-bytecode", "revm-context-interface", @@ -2843,9 +2843,9 @@ dependencies = [ [[package]] name = "revm-precompile" -version = "42.0.1" +version = "43.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2431091420999795df6a200b9f7933defe3d654710560a895e6bcabbd9954a5" +checksum = "ac4dc0279f2a44770faa8c93d008df684440cf573c91b8e0e39d0d581abf7b3d" dependencies = [ "ark-bls12-381 0.6.0", "ark-bn254", @@ -2866,9 +2866,9 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef5564c1bce219fd08beca43d4f39fdcbc19193fa4f604c0c6b58950a13194a" +checksum = "f1f4ba1a5757fe4398262290422c371556fcebf236f762f7ed7ff2c56768a63c" dependencies = [ "alloy-primitives", "once_cell", @@ -2876,9 +2876,9 @@ dependencies = [ [[package]] name = "revm-state" -version = "42.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ae66db3abfcb565854dbfc95513bfa440b3dc390ddf8e50b0363d12a6fa79" +checksum = "7cd02082cf1baca01e8bc17456c45136bdc66632395a98db1c1a2afe4c6ea87f" dependencies = [ "alloy-eip7928", "bitflags", diff --git a/rust/kona/sp1/programs/Cargo.toml b/rust/kona/sp1/programs/Cargo.toml index 36994af73cc..a8a81f45524 100644 --- a/rust/kona/sp1/programs/Cargo.toml +++ b/rust/kona/sp1/programs/Cargo.toml @@ -124,7 +124,7 @@ kona-sp1-range-vkeys = { path = "../crates/range-vkeys" } # Feature anchor only: revm's `bn` forwards to revm-precompile/bn so the guest # build uses the SP1-patched substrate-bn backend for bn128. -revm = { version = "42.0.1", default-features = false, features = ["bn"] } +revm = { version = "43.0.2", default-features = false, features = ["bn"] } sp1-lib = { version = "6.8.1", features = ["verify"] } sp1-zkvm = { version = "6.8.1", features = ["verify"] } @@ -135,7 +135,7 @@ anyhow = { version = "1.0.101", default-features = false } [patch.crates-io] sha2 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.9-sp1-6.2.0" } -# revm-precompile 42 resolves the 0.11 line next to the 0.10 one; a patch only covers the version it names. +# revm-precompile 43 resolves the 0.11 line next to the 0.10 one; a patch only covers the version it names. sha2-0-11 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.11.0-sp1-6.2.0" } sha3 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha3", tag = "patch-sha3-0.11.0-sp1-6.0.0" } crypto-bigint = { git = "https://github.com/sp1-patches/RustCrypto-bigint", tag = "patch-0.5.5-sp1-6.2.0" } diff --git a/rust/op-reth/crates/cli/tests/snapshots/cli.snap b/rust/op-reth/crates/cli/tests/snapshots/cli.snap index ae5b76b073c..0c728254dc4 100644 --- a/rust/op-reth/crates/cli/tests/snapshots/cli.snap +++ b/rust/op-reth/crates/cli/tests/snapshots/cli.snap @@ -86,7 +86,7 @@ arg: --max-seen-tx-history [action: Set] [num-args: 1] [default: 320] he arg: --max-pending-imports [action: Set] [num-args: 1] [default: 4096] help: Max number of transactions to import concurrently. arg: --pooled-tx-response-soft-limit [action: Set] [num-args: 1] [default: 2097152] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions\nto pack in one response.\nSpec'd at 2MiB. arg: --pooled-tx-pack-soft-limit [action: Set] [num-args: 1] [default: 131072] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions to\nrequest in one request. -arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Max capacity of cache of hashes for transactions pending fetch. +arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Maximum number of announced transaction hashes to track, including inflight requests. arg: --tx-channel-memory-limit [action: Set] [num-args: 1] [default: 1073741824] help: Memory limit (in bytes) for the channel that buffers transaction events flowing\nfrom the network manager to the transactions manager. arg: --net-if.experimental [action: Set] [num-args: 1] [conflicts: --addr] help: Name of network interface used to communicate with peers arg: --tx-propagation-policy [action: Set] [num-args: 1] [default: All] help: Transaction Propagation Policy @@ -102,6 +102,8 @@ arg: --http [action: SetTrue] [num-args: 0] [default: false] [default-values-if: arg: --http.addr [action: Set] [num-args: 1] [default: 127.0.0.1] help: Http server address to listen on arg: --http.port [action: Set] [num-args: 1] [default: 8545] help: Http server port to listen on arg: --http.disable-compression [action: SetTrue] [num-args: 0] [default: false] help: Disable compression for HTTP responses +arg: --http.compression [action: Append] [num-args: 1] [value-delimiter: ','] [possible: zstd, gzip, deflate, br] help: Comma-separated list of allowed compression algorithms for HTTP responses +arg: --http.decompression [action: Append] [num-args: 1] [value-delimiter: ','] [possible: zstd, gzip, deflate, br] help: Comma-separated list of allowed decompression algorithms for HTTP requests arg: --http.api [action: Set] [num-args: 1] [possible: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, flashbots, miner, mev, testing] help: Rpc Modules to be configured for the HTTP server arg: --http.corsdomain [action: Set] [num-args: 1] help: Http Corsdomain to allow request from arg: --ws [action: SetTrue] [num-args: 0] [default: false] help: Enable the WS-RPC server @@ -114,7 +116,8 @@ arg: --ipcpath [action: Set] [num-args: 1] [default: /tmp/reth.ipc] he arg: --ipc.permissions [action: Set] [num-args: 1] help: Set the permissions for the IPC socket file, in octal format arg: --authrpc.addr [action: Set] [num-args: 1] [default: 127.0.0.1] help: Auth server address to listen on arg: --authrpc.port [action: Set] [num-args: 1] [default: 8551] help: Auth server port to listen on -arg: --authrpc.jwtsecret [action: Set] [num-args: 1] [global] help: Path to a JWT secret to use for the authenticated engine-API RPC server +arg: --authrpc.jwtsecret [action: Set] [num-args: 1] [conflicts: --authrpc.jwtsecret-hex] [global] help: Path to a JWT secret to use for the authenticated engine-API RPC server +arg: --authrpc.jwtsecret-hex [action: Set] [num-args: 1] [conflicts: --authrpc.jwtsecret] [global] help: Hex encoded JWT secret to use for the authenticated engine-API RPC server arg: --auth-ipc [action: SetTrue] [num-args: 0] [default: false] help: Enable auth engine API over IPC arg: --auth-ipc.path [action: Set] [num-args: 1] [default: /tmp/reth_engine_api.ipc] help: Filename for auth IPC socket/pipe within the datadir arg: --disable-auth-server [action: SetTrue] [num-args: 0] [aliases: disable-engine-api] [default: false] help: Disable the auth/engine API server @@ -141,10 +144,12 @@ arg: --rpc.forwarder [action: Set] [num-args: 1] [aliases: rpc-forwa arg: --builder.disallow [action: Set] [num-args: 1] help: Path to file containing disallowed addresses, json-encoded list of strings. Block validation API will reject blocks containing transactions from these addresses arg: --rpc-cache.max-blocks [action: Set] [num-args: 1] [default: 5000] help: Max number of blocks in cache arg: --rpc-cache.max-receipts [action: Set] [num-args: 1] [default: 2000] help: Max number receipts in cache -arg: --rpc-cache.max-headers [action: Set] [num-args: 1] [aliases: rpc-cache.max-envs] [default: 1000] help: Max number of headers in cache +arg: --rpc-cache.max-headers [action: Set] [num-args: 1] [aliases: rpc-cache.max-envs] [default: 1000] [hidden] help: Legacy no-op retained for CLI compatibility arg: --rpc-cache.max-bals [action: Set] [num-args: 1] [default: 1000] help: Max number of block access lists in cache +arg: --rpc-cache.cache-computed-bals [action: SetTrue] [num-args: 0] help: Cache block access lists computed by RPC requests for transaction tracing +arg: --rpc-cache.prewarm-bals [action: Set] [num-args: 0..=1] [default-missing-values: ["0"]] [require-equals] help: Replay new canonical blocks to cache block access lists until native BAL support arg: --rpc-cache.max-concurrent-db-requests [action: Set] [num-args: 1] [default: 512] help: Max number of concurrent database requests -arg: --rpc-cache.max-cached-tx-hashes [action: Set] [num-args: 1] [default: 30000] help: Maximum number of transaction hashes to cache for transaction lookups +arg: --rpc-cache.max-cached-tx-hashes [action: Set] [num-args: 1] [default: 100000] help: Maximum number of transaction hashes to cache for transaction lookups arg: --gpo.blocks [action: Set] [num-args: 1] [default: 20] help: Number of recent blocks to check for gas price arg: --gpo.ignoreprice [action: Set] [num-args: 1] [default: 0] help: Gas Price below which gpo will ignore transactions arg: --gpo.maxprice [action: Set] [num-args: 1] [default: 500000000000] help: Maximum transaction priority fee(or gasprice before London Fork) to be recommended by gpo @@ -247,8 +252,9 @@ arg: --prune.bodies.pre-merge [action: SetTrue] [num-args: 0] [conflicts: --prun arg: --prune.bodies.distance [action: Set] [num-args: 1] [conflicts: --prune.bodies.before, --prune.bodies.pre-merge] help: Prune bodies before the `head-N` block number. In other words, keep last N + 1 blocks arg: --prune.bodies.before [action: Set] [num-args: 1] [conflicts: --prune.bodies.distance, --prune.bodies.pre-merge] help: Prune storage history before the specified block number. The specified block number is not pruned arg: --prune.minimum-distance [action: Set] [num-args: 1] help: Minimum pruning distance from the tip. This controls the safety margin for reorgs and manual unwinds -arg: --engine.persistence-threshold [action: Set] [num-args: 1] [default: 7] help: Configure persistence threshold for the engine. This determines how many canonical blocks must be in-memory, ahead of the last persisted block, before flushing canonical blocks to disk again +arg: --engine.persistence-threshold [action: Set] [num-args: 1] [env: RETH_ENGINE_PERSISTENCE_THRESHOLD] [default: 50] help: Configure persistence threshold for the engine. This determines how many canonical blocks must be in-memory, ahead of the last persisted block, before flushing canonical blocks to disk again arg: --engine.persistence-backpressure-threshold [action: Set] [num-args: 1] help: Configure the maximum number of blocks beyond the in-memory buffer target that may await persistence before engine API processing stalls +arg: --engine.num-state-masking-blocks [action: Set] [num-args: 1] [env: RETH_ENGINE_NUM_STATE_MASKING_BLOCKS] [default: 30] help: Configure how many of the blocks being persisted should only mask state/trie writes instead of durably persisting their state/trie updates in the current cycle arg: --engine.memory-block-buffer-target [action: Set] [num-args: 1] help: Configure the target number of blocks to keep in memory arg: --engine.invalid-header-cache-hit-eviction-threshold [action: Set] [num-args: 1] [default: 128] help: Configure how many cache hits an invalid header can accumulate before it is evicted and reprocessed arg: --engine.legacy-state-root [action: SetTrue] [num-args: 0] [default: false] [hidden] help: CAUTION: This CLI flag has no effect anymore, use --engine.state-root-fallback if you want to force synchronous state root computation @@ -686,7 +692,7 @@ arg: --max-seen-tx-history [action: Set] [num-args: 1] [default: 320] he arg: --max-pending-imports [action: Set] [num-args: 1] [default: 4096] help: Max number of transactions to import concurrently. arg: --pooled-tx-response-soft-limit [action: Set] [num-args: 1] [default: 2097152] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions\nto pack in one response.\nSpec'd at 2MiB. arg: --pooled-tx-pack-soft-limit [action: Set] [num-args: 1] [default: 131072] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions to\nrequest in one request. -arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Max capacity of cache of hashes for transactions pending fetch. +arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Maximum number of announced transaction hashes to track, including inflight requests. arg: --tx-channel-memory-limit [action: Set] [num-args: 1] [default: 1073741824] help: Memory limit (in bytes) for the channel that buffers transaction events flowing\nfrom the network manager to the transactions manager. arg: --net-if.experimental [action: Set] [num-args: 1] [conflicts: --addr] help: Name of network interface used to communicate with peers arg: --tx-propagation-policy [action: Set] [num-args: 1] [default: All] help: Transaction Propagation Policy @@ -863,7 +869,7 @@ arg: --max-seen-tx-history [action: Set] [num-args: 1] [default: 320] he arg: --max-pending-imports [action: Set] [num-args: 1] [default: 4096] help: Max number of transactions to import concurrently. arg: --pooled-tx-response-soft-limit [action: Set] [num-args: 1] [default: 2097152] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions\nto pack in one response.\nSpec'd at 2MiB. arg: --pooled-tx-pack-soft-limit [action: Set] [num-args: 1] [default: 131072] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions to\nrequest in one request. -arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Max capacity of cache of hashes for transactions pending fetch. +arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Maximum number of announced transaction hashes to track, including inflight requests. arg: --tx-channel-memory-limit [action: Set] [num-args: 1] [default: 1073741824] help: Memory limit (in bytes) for the channel that buffers transaction events flowing\nfrom the network manager to the transactions manager. arg: --net-if.experimental [action: Set] [num-args: 1] [conflicts: --addr] help: Name of network interface used to communicate with peers arg: --tx-propagation-policy [action: Set] [num-args: 1] [default: All] help: Transaction Propagation Policy @@ -922,7 +928,7 @@ arg: --max-seen-tx-history [action: Set] [num-args: 1] [default: 320] he arg: --max-pending-imports [action: Set] [num-args: 1] [default: 4096] help: Max number of transactions to import concurrently. arg: --pooled-tx-response-soft-limit [action: Set] [num-args: 1] [default: 2097152] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions\nto pack in one response.\nSpec'd at 2MiB. arg: --pooled-tx-pack-soft-limit [action: Set] [num-args: 1] [default: 131072] help: Experimental, for usage in research. Sets the max accumulated byte size of transactions to\nrequest in one request. -arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Max capacity of cache of hashes for transactions pending fetch. +arg: --max-tx-pending-fetch [action: Set] [num-args: 1] [default: 25600] help: Maximum number of announced transaction hashes to track, including inflight requests. arg: --tx-channel-memory-limit [action: Set] [num-args: 1] [default: 1073741824] help: Memory limit (in bytes) for the channel that buffers transaction events flowing\nfrom the network manager to the transactions manager. arg: --net-if.experimental [action: Set] [num-args: 1] [conflicts: --addr] help: Name of network interface used to communicate with peers arg: --tx-propagation-policy [action: Set] [num-args: 1] [default: All] help: Transaction Propagation Policy diff --git a/rust/op-reth/crates/consensus/src/lib.rs b/rust/op-reth/crates/consensus/src/lib.rs index 78b9a2c2817..21e6e0ab4cc 100644 --- a/rust/op-reth/crates/consensus/src/lib.rs +++ b/rust/op-reth/crates/consensus/src/lib.rs @@ -34,7 +34,7 @@ use reth_primitives_traits::{ }; mod proof; -pub use proof::calculate_receipt_root_no_memo_optimism; +pub use proof::{calculate_receipt_root_no_memo_optimism, calculate_receipt_root_optimism}; #[cfg(feature = "std")] mod sdm_metrics; diff --git a/rust/op-reth/crates/consensus/src/proof.rs b/rust/op-reth/crates/consensus/src/proof.rs index 7fedc49ad0d..f5ade58cf6f 100644 --- a/rust/op-reth/crates/consensus/src/proof.rs +++ b/rust/op-reth/crates/consensus/src/proof.rs @@ -9,7 +9,7 @@ use reth_optimism_forks::OpHardforks; use reth_optimism_primitives::DepositReceipt; /// Calculates the receipt root for a header. -pub(crate) fn calculate_receipt_root_optimism( +pub fn calculate_receipt_root_optimism( receipts: &[ReceiptWithBloom<&R>], chain_spec: impl OpHardforks, timestamp: u64, diff --git a/rust/op-reth/crates/consensus/src/validation/mod.rs b/rust/op-reth/crates/consensus/src/validation/mod.rs index ebb5273046b..461da55eee1 100644 --- a/rust/op-reth/crates/consensus/src/validation/mod.rs +++ b/rust/op-reth/crates/consensus/src/validation/mod.rs @@ -18,7 +18,7 @@ use reth_optimism_forks::OpHardforks; use reth_optimism_primitives::DepositReceipt; use reth_primitives_traits::{BlockBody, GotExpected, receipt::gas_spent_by_transactions}; -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_consensus_common::validation::validate_body_against_header` /// /// Copies the generic body/header checks and replaces withdrawals-root handling after Isthmus. @@ -85,7 +85,7 @@ where Ok(()) } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_ethereum_consensus::validation::validate_block_post_execution` /// /// Copies upstream post-execution validation with OP receipt roots and Jovian DA accounting. @@ -163,7 +163,7 @@ pub fn validate_block_post_execution( Ok(()) } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 `reth_ethereum_consensus::validation::verify_receipts` +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 `reth_ethereum_consensus::validation::verify_receipts` /// /// Copies the private upstream helper and substitutes OP receipt-root calculation. /// Verify the calculated receipts root against the expected receipts root. @@ -192,7 +192,7 @@ fn verify_receipts_optimism( Ok(()) } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_ethereum_consensus::validation::compare_receipts_root_and_logs_bloom` /// /// Kept identical to the private upstream comparison helper. diff --git a/rust/op-reth/crates/evm/src/build.rs b/rust/op-reth/crates/evm/src/build.rs index 07e999a1fd2..a1f3b8a35bd 100644 --- a/rust/op-reth/crates/evm/src/build.rs +++ b/rust/op-reth/crates/evm/src/build.rs @@ -1,4 +1,4 @@ -use alloc::sync::Arc; +use alloc::{sync::Arc, vec::Vec}; use alloy_consensus::{ Block, BlockBody, EMPTY_OMMER_ROOT_HASH, Header, TxReceipt, constants::EMPTY_WITHDRAWALS, proofs, @@ -6,11 +6,11 @@ use alloy_consensus::{ use alloy_eips::{eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE}; use alloy_evm::block::BlockExecutorFactory; use alloy_op_evm::OpBlockExecutionCtx; -use alloy_primitives::logs_bloom; +use alloy_primitives::Bloom; use reth_evm::execute::{BlockAssembler, BlockAssemblerInput}; use reth_execution_errors::BlockExecutionError; use reth_execution_types::BlockExecutionResult; -use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus}; +use reth_optimism_consensus::{calculate_receipt_root_optimism, isthmus}; use reth_optimism_forks::OpHardforks; use reth_optimism_primitives::DepositReceipt; use reth_primitives_traits::{Receipt, SignedTransaction}; @@ -30,7 +30,7 @@ impl OpBlockAssembler { } impl OpBlockAssembler { - /// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_evm_ethereum::EthBlockAssembler::assemble_block` /// /// Copies upstream block assembly with OP receipt roots, withdrawals, and DA fields. @@ -61,9 +61,13 @@ impl OpBlockAssembler { let timestamp = evm_env.block_env.timestamp().saturating_to(); let transactions_root = proofs::calculate_transaction_root(&transactions); + // Reuse the receipt blooms for the block bloom instead of hashing every log twice. + let receipts_with_bloom = + receipts.iter().map(TxReceipt::with_bloom_ref).collect::>(); let receipts_root = - calculate_receipt_root_no_memo_optimism(receipts, &self.chain_spec, timestamp); - let logs_bloom = logs_bloom(receipts.iter().flat_map(|r| r.logs())); + calculate_receipt_root_optimism(&receipts_with_bloom, &self.chain_spec, timestamp); + let logs_bloom = + receipts_with_bloom.iter().fold(Bloom::ZERO, |acc, receipt| acc | receipt.bloom_ref()); let mut requests_hash = None; diff --git a/rust/op-reth/crates/evm/src/config.rs b/rust/op-reth/crates/evm/src/config.rs index 0515a63aecf..bc1ff0e4c90 100644 --- a/rust/op-reth/crates/evm/src/config.rs +++ b/rust/op-reth/crates/evm/src/config.rs @@ -25,7 +25,7 @@ pub struct OpNextBlockEnvAttributes { impl reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv for OpNextBlockEnvAttributes { - /// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_rpc_eth_api::helpers::pending_block::NextBlockEnvAttributes::build_pending_env` /// /// Copies upstream pending-environment defaults for the OP attribute type, except that diff --git a/rust/op-reth/crates/evm/src/lib.rs b/rust/op-reth/crates/evm/src/lib.rs index ac5b4842009..296798bd8ea 100644 --- a/rust/op-reth/crates/evm/src/lib.rs +++ b/rust/op-reth/crates/evm/src/lib.rs @@ -21,7 +21,7 @@ use alloy_op_evm::{ use core::fmt::Debug; use op_alloy_consensus::{ EIP1559ParamError, OpTransaction as OpConsensusTransaction, - parse_post_exec_payload_from_transactions, validate_post_exec_entry_count, + parse_post_exec_payload_from_transactions, }; use op_revm::OpSpecId; use reth_chainspec::EthChainSpec; @@ -45,6 +45,7 @@ use { #[cfg(feature = "std")] use { alloy_op_evm::evm_env_for_op_payload, + op_alloy_consensus::validate_post_exec_entry_count, reth_evm::{ConfigureEngineEvm, ExecutableTxIterator}, }; @@ -224,7 +225,7 @@ where } } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 `reth_evm_ethereum::EthEvmConfig` +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 `reth_evm_ethereum::EthEvmConfig` /// /// Mirrors upstream `ConfigureEvm` plumbing with OP environments and execution context. impl ConfigureEvm for OpEvmConfig @@ -324,7 +325,7 @@ where } } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 `reth_evm_ethereum::EthEvmConfig` +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 `reth_evm_ethereum::EthEvmConfig` /// /// Mirrors upstream payload-to-EVM configuration with OP payload and fork semantics. /// `tx_iterator_for_payload` recovers senders directly; upstream routes the same recovery through diff --git a/rust/op-reth/crates/hardforks/src/lib.rs b/rust/op-reth/crates/hardforks/src/lib.rs index 7d15cadc1d2..baf81c7152a 100644 --- a/rust/op-reth/crates/hardforks/src/lib.rs +++ b/rust/op-reth/crates/hardforks/src/lib.rs @@ -23,7 +23,7 @@ use alloy_primitives::U256; use once_cell::sync::Lazy as LazyLock; use reth_ethereum_forks::{ChainHardforks, EthereumHardfork, ForkCondition, Hardfork}; -/// UPSTREAM-MIRROR(set): reth@rev:0fbe428 `reth_ethereum_forks::DEV_HARDFORKS` +/// UPSTREAM-MIRROR(set): reth@rev:4553cf1 `reth_ethereum_forks::DEV_HARDFORKS` /// /// Mirrors reth's dev hardfork list with OP forks interleaved. Upstream includes an explicit /// Osaka entry; this list activates those semantics through Karst instead. Re-diff every L1 diff --git a/rust/op-reth/crates/node/Cargo.toml b/rust/op-reth/crates/node/Cargo.toml index 522c3213908..89afad4c75a 100644 --- a/rust/op-reth/crates/node/Cargo.toml +++ b/rust/op-reth/crates/node/Cargo.toml @@ -90,8 +90,6 @@ alloy-genesis = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } [dev-dependencies] -reth-basic-payload-builder.workspace = true -reth-node-metrics.workspace = true reth-optimism-node = { workspace = true, features = ["test-utils"] } reth-db = { workspace = true, features = ["test-utils"] } reth-db-common.workspace = true diff --git a/rust/op-reth/crates/node/tests/it/main.rs b/rust/op-reth/crates/node/tests/it/main.rs index 10382155c42..d44168c9a77 100644 --- a/rust/op-reth/crates/node/tests/it/main.rs +++ b/rust/op-reth/crates/node/tests/it/main.rs @@ -18,6 +18,4 @@ mod estimate_gas_7825; mod p2p_version; -mod payload_handoff; - const fn main() {} diff --git a/rust/op-reth/crates/node/tests/it/p2p_version.rs b/rust/op-reth/crates/node/tests/it/p2p_version.rs index 09983fe1b0e..c61d64a2642 100644 --- a/rust/op-reth/crates/node/tests/it/p2p_version.rs +++ b/rust/op-reth/crates/node/tests/it/p2p_version.rs @@ -11,10 +11,10 @@ use reth_rpc_api::servers::AdminApiServer; use std::time::Duration; use tokio::time::{sleep, timeout}; -const EXPECTED_ETH_VERSION: u64 = 69; +const EXPECTED_ETH_VERSION: u64 = 71; #[tokio::test] -async fn peers_negotiate_eth_69() -> eyre::Result<()> { +async fn peers_negotiate_eth_71() -> eyre::Result<()> { // This test intermittently segfaults during teardown, after the body below has // passed (ethereum-optimism/optimism#20973). The handler outlives the body, so it // reports the faulting thread and stack when that happens. diff --git a/rust/op-reth/crates/node/tests/it/payload_handoff.rs b/rust/op-reth/crates/node/tests/it/payload_handoff.rs deleted file mode 100644 index d37d86dc1ed..00000000000 --- a/rust/op-reth/crates/node/tests/it/payload_handoff.rs +++ /dev/null @@ -1,382 +0,0 @@ -//! Real OP payload jobs must not stop Engine API traffic while persistence hands off its overlay. - -use alloy_genesis::Genesis; -use alloy_primitives::B256; -use alloy_rpc_types_engine::{ForkchoiceState, PayloadId, PayloadStatus}; -use jsonrpsee::{core::client::ClientT, rpc_params}; -use op_alloy_rpc_types_engine::OpExecutionPayloadEnvelopeV3; -use reth_basic_payload_builder::{ - BuildArguments, BuildOutcome, HeaderForPayload, MissingPayloadBehaviour, PayloadBuilder, - PayloadConfig, -}; -use reth_chainspec::EthChainSpec; -use reth_e2e_test_utils::{transaction::TransactionTestContext, wallet::Wallet}; -use reth_node_api::PayloadAttributes; -use reth_node_builder::{ - BuilderContext, FullNodeTypes, Node, NodeBuilder, NodeConfig, - components::{BasicPayloadServiceBuilder, PayloadBuilderBuilder}, -}; -use reth_node_metrics::recorder::install_prometheus_recorder; -use reth_optimism_chainspec::OpChainSpecBuilder; -use reth_optimism_node::{OpNode, utils::optimism_payload_attributes}; -use reth_payload_builder::{PayloadBuilderError, PayloadKind}; -use reth_provider::{BlockNumReader, ChainSpecProvider, DatabaseProviderFactory}; -use reth_tasks::Runtime; -use reth_transaction_pool::TransactionPool; -use std::{future::Future, process::Command, sync::Arc, time::Duration}; -use tokio::sync::{mpsc, oneshot}; - -const GUARD: Duration = Duration::from_secs(20); -const ABANDONED_TIMESTAMP: u64 = 5; - -/// Dropping this also releases the worker, including when an assertion fails. -#[derive(Debug)] -struct BuildGate { - id: PayloadId, - release: oneshot::Sender<()>, - finished: oneshot::Receiver, -} - -impl BuildGate { - async fn release(self) { - let _ = self.release.send(()); - assert!(guard("cancelled worker did not finish", self.finished).await.unwrap()); - } -} - -/// Decorates the real builder, without replacing any build result or lease management. -#[derive(Clone, Debug)] -struct GatedBuilder { - inner: B, - entered: mpsc::UnboundedSender, -} - -impl PayloadBuilder for GatedBuilder { - type Attributes = B::Attributes; - type BuiltPayload = B::BuiltPayload; - - fn try_build( - &self, - args: BuildArguments, - ) -> Result, PayloadBuilderError> { - // Let the first attempt produce a real best payload. Hold its replacement attempt so - // normal getPayload can return that best payload while the detached worker still owns - // the BasicPayloadJob lease. The abandoned job instead stalls on its first attempt. - let finished = (args.best_payload.is_some() || - args.config.attributes.timestamp() == ABANDONED_TIMESTAMP) - .then(|| { - let (release, wait) = oneshot::channel(); - let (finished, done) = oneshot::channel(); - let gate = BuildGate { id: args.config.payload_id(), release, finished: done }; - if self.entered.send(gate).is_ok() { - let _ = wait.blocking_recv(); - } - finished - }); - let cancelled = args.cancel.is_cancelled(); - let result = self.inner.try_build(args); - if let Some(finished) = finished { - let _ = finished.send(cancelled); - } - result - } - - fn on_missing_payload( - &self, - args: BuildArguments, - ) -> MissingPayloadBehaviour { - self.inner.on_missing_payload(args) - } - - fn build_empty_payload( - &self, - config: PayloadConfig>, - ) -> Result { - self.inner.build_empty_payload(config) - } -} - -struct GatedBuilderFactory { - inner: B, - entered: mpsc::UnboundedSender, -} - -impl PayloadBuilderBuilder for GatedBuilderFactory -where - N: FullNodeTypes, - Pool: TransactionPool, - Evm: Send, - B: PayloadBuilderBuilder, -{ - type PayloadBuilder = GatedBuilder; - - async fn build_payload_builder( - self, - ctx: &BuilderContext, - pool: Pool, - evm: Evm, - ) -> eyre::Result { - Ok(GatedBuilder { - inner: self.inner.build_payload_builder(ctx, pool, evm).await?, - entered: self.entered, - }) - } -} - -async fn guard(message: &str, future: impl Future) -> T { - tokio::time::timeout(GUARD, future).await.unwrap_or_else(|_| panic!("{message}")) -} - -async fn wait_until(message: &str, mut ready: impl FnMut() -> bool) { - guard(message, async { - while !ready() { - tokio::task::yield_now().await; - } - }) - .await; -} - -fn persistence_completions() -> u64 { - // This histogram is recorded by EngineApiTreeHandler::finish_persistence, not the disk - // writer. Once observed, the engine must pass through its active-build handoff branch - // before it can receive another request. Disk height alone cannot establish that ordering. - install_prometheus_recorder() - .handle() - .render() - .lines() - .find_map(|line| { - line.strip_prefix("reth_consensus_engine_beacon_persistence_duration_count ") - .map(|count| count.parse().unwrap()) - }) - .unwrap_or_default() -} - -#[test] -fn pending_handoff_keeps_engine_responsive_and_drains() { - // Metrics handles are cached globally upstream. A fresh process makes the rendezvous - // specific to this node, even under cargo test with other node tests running concurrently. - const CHILD: &str = "OP_RETH_HANDOFF_TEST_CHILD"; - if std::env::var_os(CHILD).is_none() { - let output = Command::new(std::env::current_exe().unwrap()) - .args([ - "--exact", - "payload_handoff::pending_handoff_keeps_engine_responsive_and_drains", - "--nocapture", - ]) - .env(CHILD, "1") - .output() - .unwrap(); - assert!( - output.status.success(), - "handoff regression failed: {}\n{}\n{}", - output.status, - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr), - ); - return; - } - - super::crash_backtrace::install(); - // Also bound startup/teardown: a blocked OS worker can outlive Tokio's async timeout. - let (_watchdog, watchdog_rx) = std::sync::mpsc::channel::<()>(); - std::thread::spawn(move || { - if matches!( - watchdog_rx.recv_timeout(Duration::from_secs(180)), - Err(std::sync::mpsc::RecvTimeoutError::Timeout) - ) { - eprintln!("handoff regression exceeded its process hang guard"); - std::process::exit(1); - } - }); - tokio::runtime::Builder::new_multi_thread() - .worker_threads(2) - .enable_all() - .build() - .unwrap() - .block_on(run_handoff_scenario()) - .unwrap(); -} - -async fn run_handoff_scenario() -> eyre::Result<()> { - let genesis: Genesis = serde_json::from_str(include_str!("../assets/genesis.json"))?; - let chain_spec = Arc::new( - OpChainSpecBuilder::optimism_sepolia().genesis(genesis).ecotone_activated().build(), - ); - let wallet = Wallet::default().with_chain_id(chain_spec.chain_id()); - let mut config = NodeConfig::test().map_chain(chain_spec).with_unused_ports(); - config.network.discovery.discv5_port = Some(0); - config.network.discovery.discv5_port_ipv6 = Some(0); - config.engine.persistence_threshold = 0; - config.engine.memory_block_buffer_target = Some(0); - config.engine.num_state_masking_blocks = 0; - config.engine.suppress_persistence_during_build = false; - config.builder.interval = Duration::from_millis(1); - config.builder.deadline = Duration::from_secs(300); - // Four overlapping replacement attempts and one abandoned first attempt. - config.builder.max_payload_tasks = 8; - - let (entered, mut gates) = mpsc::unbounded_channel(); - let op_node = OpNode::default(); - let node = NodeBuilder::new(config) - .testing_node(Runtime::test()) - .with_types::() - .with_components(op_node.components().payload(BasicPayloadServiceBuilder::new( - GatedBuilderFactory { inner: op_node.payload_builder(), entered }, - ))) - .with_add_ons(op_node.add_ons()) - .launch() - .await? - .node; - let engine = &node.add_ons_handle.beacon_engine_handle; - let client = node.auth_server_handle().http_client(); - let memory = node.provider.canonical_in_memory_state(); - let disk_height = || node.provider.database_provider_ro().unwrap().last_block_number().unwrap(); - let handed_off_height = || memory.get_persisted_num_hash().map_or(0, |block| block.number); - let mut head = node.provider.chain_spec().genesis_hash(); - let mut held = Vec::new(); - - for number in 1..=4 { - let mut attrs = optimism_payload_attributes(number); - attrs.0.transactions = Some(vec![ - TransactionTestContext::optimism_l1_block_info_tx( - wallet.chain_id, - wallet.inner.clone(), - number - 1, - ) - .await, - ]); - let fcu = guard( - "FCU blocked behind a payload worker's persisted handoff", - engine.fork_choice_updated(ForkchoiceState::same_hash(head), Some(attrs)), - ) - .await?; - assert!(fcu.payload_status.is_valid()); - let id = fcu.payload_id.unwrap(); - let gate = guard("replacement build did not enter its gate", gates.recv()).await.unwrap(); - assert_eq!(gate.id, id); - held.push(gate); - - // Exercise the normal authenticated getPayload RPC, not a fabricated build outcome. - let payload: OpExecutionPayloadEnvelopeV3 = guard( - "getPayload waited for the replacement worker instead of returning the best payload", - client.request("engine_getPayloadV3", rpc_params![id]), - ) - .await?; - assert_eq!(payload.execution_payload.payload_inner.payload_inner.block_number, number); - head = payload.execution_payload.payload_inner.payload_inner.block_hash; - let status: PayloadStatus = guard( - "newPayload blocked behind a payload worker's persisted handoff", - client.request( - "engine_newPayloadV3", - rpc_params![ - payload.execution_payload, - Vec::::new(), - payload.parent_beacon_block_root - ], - ), - ) - .await?; - assert!(status.is_valid()); - let fcu = guard( - "canonical FCU blocked behind a payload worker's persisted handoff", - engine.fork_choice_updated(ForkchoiceState::same_hash(head), None), - ) - .await?; - assert!(fcu.payload_status.is_valid()); - - if number == 1 { - wait_until("engine did not observe persistence completion", || { - persistence_completions() > 0 - }) - .await; - } - assert_eq!(disk_height(), 1, "a pending handoff must retain its persistence frontier"); - assert_eq!(handed_off_height(), 0, "live worker leases must protect the old overlay"); - } - - // Abandon a first attempt with no best payload. Dropping resolve_kind's response receiver - // cancels the real service job; it cannot cancel the detached blocking worker's lease. - let attrs = optimism_payload_attributes(ABANDONED_TIMESTAMP); - let id = guard( - "FCU could not start the abandoned build", - engine.fork_choice_updated(ForkchoiceState::same_hash(head), Some(attrs)), - ) - .await? - .payload_id - .unwrap(); - let abandoned = guard("abandoned worker did not enter its gate", gates.recv()).await.unwrap(); - assert_eq!(abandoned.id, id); - drop(node.payload_builder_handle.resolve_kind(id, PayloadKind::Earliest)); - assert!( - guard( - "cancelled job remained in the payload service", - node.payload_builder_handle.payload_timestamp(id) - ) - .await - .is_none() - ); - abandoned.release().await; - - // Drain newer workers first. The oldest detached worker must still protect the handoff. - while held.len() > 1 { - held.pop().unwrap().release().await; - } - assert_eq!(disk_height(), 1); - assert_eq!(handed_off_height(), 0); - held.pop().unwrap().release().await; - wait_until("finite payload workload never released persistence", || { - disk_height() == 4 && handed_off_height() == 4 - }) - .await; - - // A new build after the drain must use the caught-up provider and persist normally too. - let mut attrs = optimism_payload_attributes(6); - attrs.0.transactions = Some(vec![ - TransactionTestContext::optimism_l1_block_info_tx(wallet.chain_id, wallet.inner.clone(), 4) - .await, - ]); - let id = guard( - "FCU did not recover after leases drained", - engine.fork_choice_updated(ForkchoiceState::same_hash(head), Some(attrs)), - ) - .await? - .payload_id - .unwrap(); - let gate = guard("post-handoff worker did not enter its gate", gates.recv()).await.unwrap(); - assert_eq!(gate.id, id); - let payload: OpExecutionPayloadEnvelopeV3 = guard( - "post-handoff getPayload stalled", - client.request("engine_getPayloadV3", rpc_params![id]), - ) - .await?; - gate.release().await; - assert_eq!(payload.execution_payload.payload_inner.payload_inner.block_number, 5); - head = payload.execution_payload.payload_inner.payload_inner.block_hash; - let status: PayloadStatus = guard( - "post-handoff newPayload stalled", - client.request( - "engine_newPayloadV3", - rpc_params![ - payload.execution_payload, - Vec::::new(), - payload.parent_beacon_block_root - ], - ), - ) - .await?; - assert!(status.is_valid()); - assert!( - guard( - "post-handoff canonical FCU stalled", - engine.fork_choice_updated(ForkchoiceState::same_hash(head), None), - ) - .await? - .payload_status - .is_valid() - ); - wait_until("post-handoff build never persisted", || { - disk_height() == 5 && handed_off_height() == 5 - }) - .await; - Ok(()) -} diff --git a/rust/op-reth/crates/payload/src/lib.rs b/rust/op-reth/crates/payload/src/lib.rs index 3b1e5a6ddc2..553200c4c79 100644 --- a/rust/op-reth/crates/payload/src/lib.rs +++ b/rust/op-reth/crates/payload/src/lib.rs @@ -84,7 +84,7 @@ where // `block_to_payload` and `From> for OpExecData` are // separate conversion paths to the same type. OP execution data does not // currently carry a BAL, so both paths intentionally discard it. - /// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_ethereum_engine_primitives::EthPayloadTypes::block_to_payload` /// /// Mirrors the upstream conversion while constructing OP execution data. diff --git a/rust/op-reth/crates/payload/src/payload.rs b/rust/op-reth/crates/payload/src/payload.rs index e3dac3eb042..c21a1b54dd2 100644 --- a/rust/op-reth/crates/payload/src/payload.rs +++ b/rust/op-reth/crates/payload/src/payload.rs @@ -448,7 +448,7 @@ impl BuiltPayload for OpBuiltPayload { } } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_ethereum_engine_primitives::EthBuiltPayload::into_execution_data` /// /// Counterpart to `OpPayloadTypes::block_to_payload`; the two conversion paths are kept diff --git a/rust/op-reth/crates/payload/src/validator.rs b/rust/op-reth/crates/payload/src/validator.rs index 9a41c8d3913..d7a6d5d04ec 100644 --- a/rust/op-reth/crates/payload/src/validator.rs +++ b/rust/op-reth/crates/payload/src/validator.rs @@ -5,7 +5,7 @@ use alloy_consensus::Block; use derive_more::{Constructor, Deref}; use op_alloy_rpc_types_engine::{OpExecutionData, OpExecutionPayloadEnvelope, OpPayloadError}; use reth_optimism_forks::OpHardforks; -use reth_payload_validator::{cancun, prague, shanghai}; +use reth_payload_validator::{amsterdam, cancun, prague, shanghai}; use reth_primitives_traits::{Block as _, SealedBlock, SignedTransaction}; /// Execution payload validator. @@ -37,7 +37,7 @@ where } } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_ethereum_payload_builder::validator::ensure_well_formed_payload` /// /// Copies upstream's ordered payload checks with OP payload fields and fork activation. @@ -90,5 +90,10 @@ where chain_spec.is_prague_active_at_timestamp(sealed_block.timestamp), )?; + amsterdam::ensure_well_formed_fields( + &sealed_block, + chain_spec.is_amsterdam_active_at_timestamp(sealed_block.timestamp), + )?; + Ok(sealed_block) } diff --git a/rust/op-reth/crates/rpc/src/engine.rs b/rust/op-reth/crates/rpc/src/engine.rs index 5d835449215..51fe30f8792 100644 --- a/rust/op-reth/crates/rpc/src/engine.rs +++ b/rust/op-reth/crates/rpc/src/engine.rs @@ -19,7 +19,7 @@ use reth_storage_api::{BalProvider, BlockReader, HeaderProvider, StateProviderFa use reth_transaction_pool::TransactionPool; use tracing::{debug, trace}; -/// UPSTREAM-MIRROR(set): reth@rev:0fbe428 `reth_rpc_engine_api::capabilities::CAPABILITIES` +/// UPSTREAM-MIRROR(set): reth@rev:4553cf1 `reth_rpc_engine_api::capabilities::CAPABILITIES` /// /// Advertised capabilities must stay in step with the methods declared on [`OpEngineApi`]. /// The list of all supported Engine capabilities available over the engine endpoint. @@ -50,7 +50,7 @@ pub const OP_ENGINE_CAPABILITIES: &[&str] = &[ /// #[cfg_attr(not(feature = "client"), rpc(server, namespace = "engine"), server_bounds(Engine::PayloadAttributes: jsonrpsee::core::DeserializeOwned))] #[cfg_attr(feature = "client", rpc(server, client, namespace = "engine", client_bounds(Engine::PayloadAttributes: jsonrpsee::core::Serialize + Clone), server_bounds(Engine::PayloadAttributes: jsonrpsee::core::DeserializeOwned)))] -/// UPSTREAM-MIRROR(set): reth@rev:0fbe428 `reth_rpc_api::EngineApi` +/// UPSTREAM-MIRROR(set): reth@rev:4553cf1 `reth_rpc_api::EngineApi` /// /// Re-declares the engine RPC surface rather than extending upstream's trait. A method added /// upstream produces no diff here, so compare the method sets on each bump and update diff --git a/rust/op-reth/crates/rpc/src/eth/mod.rs b/rust/op-reth/crates/rpc/src/eth/mod.rs index 1321648d4a9..762a8e234be 100644 --- a/rust/op-reth/crates/rpc/src/eth/mod.rs +++ b/rust/op-reth/crates/rpc/src/eth/mod.rs @@ -43,7 +43,8 @@ use reth_rpc_eth_api::{ }, }; use reth_rpc_eth_types::{ - EthStateCache, FeeHistoryCache, GasPriceOracle, logs_utils::matching_block_logs_with_tx_hashes, + EthApiSettings, EthStateCache, FeeHistoryCache, GasPriceOracle, + logs_utils::matching_block_logs_with_tx_hashes, }; use reth_storage_api::ProviderHeader; use reth_tasks::{ @@ -263,6 +264,10 @@ where type NetworkTypes = Rpc::Network; type RpcConvert = Rpc; + fn eth_api_settings(&self) -> &EthApiSettings { + self.inner.eth_api.eth_api_settings() + } + fn converter(&self) -> &Self::RpcConvert { self.inner.eth_api.converter() } diff --git a/rust/op-reth/crates/rpc/src/eth/proofs.rs b/rust/op-reth/crates/rpc/src/eth/proofs.rs index ec04f421257..d0d055278fb 100644 --- a/rust/op-reth/crates/rpc/src/eth/proofs.rs +++ b/rust/op-reth/crates/rpc/src/eth/proofs.rs @@ -16,7 +16,7 @@ use std::time::Instant; /// The `eth_` proof methods served from the historical proofs storage. /// -/// UPSTREAM-MIRROR(set): reth@rev:0fbe428 `reth_rpc_eth_api::EthApi` +/// UPSTREAM-MIRROR(set): reth@rev:4553cf1 `reth_rpc_eth_api::EthApi` /// /// Re-declares the proof methods that are answered from historical proofs rather than live state. /// A proof method added to upstream's `EthApi` produces no diff here, so diff the two method sets diff --git a/rust/op-reth/crates/rpc/src/eth/transaction.rs b/rust/op-reth/crates/rpc/src/eth/transaction.rs index 45e8ea0d328..2c1983c922d 100644 --- a/rust/op-reth/crates/rpc/src/eth/transaction.rs +++ b/rust/op-reth/crates/rpc/src/eth/transaction.rs @@ -79,7 +79,7 @@ where Ok(hash) } - /// UPSTREAM-MIRROR(override): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(override): reth@rev:4553cf1 /// `reth_rpc_eth_api::helpers::EthTransactions::send_raw_transaction_sync` /// /// Derived from the upstream default: the timeout computation is taken verbatim and the @@ -171,7 +171,7 @@ where /// /// With flashblocks, we should also lookup the pending block for the transaction /// because this is considered confirmed/mined. - /// UPSTREAM-MIRROR(override): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(override): reth@rev:4553cf1 /// `reth_rpc_eth_api::helpers::EthTransactions::transaction_receipt` /// /// Extends the upstream default with a flashblock receipt lookup. @@ -208,7 +208,7 @@ where OpEthApiError: FromEvmError, Rpc: RpcConvert, { - /// UPSTREAM-MIRROR(override): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(override): reth@rev:4553cf1 /// `reth_rpc_eth_api::helpers::LoadTransaction::transaction_by_hash` /// /// Inserts a flashblock lookup between upstream's disk and pool lookups, and does not diff --git a/rust/op-reth/crates/trie/src/db/store.rs b/rust/op-reth/crates/trie/src/db/store.rs index 30814cc0aba..082bc0dc638 100644 --- a/rust/op-reth/crates/trie/src/db/store.rs +++ b/rust/op-reth/crates/trie/src/db/store.rs @@ -11,8 +11,8 @@ use crate::{ MdbxAccountCursor, MdbxStorageCursor, MdbxTrieCursor, models::{ AccountTrieHistory, BlockChangeSet, ChangeSet, HashedAccountHistory, - HashedStorageHistory, HashedStorageKey, MaybeDeleted, StorageTrieHistory, - StorageTrieKey, StorageValue, VersionedValue, kv::IntoKV, + HashedStorageHistory, HashedStorageKey, StorageTrieHistory, StorageTrieKey, + StorageValue, VersionedValue, kv::IntoKV, }, }, }; @@ -28,7 +28,6 @@ use reth_db::{ transaction::{DbTx, DbTxMut}, }; use reth_primitives_traits::Account; -use reth_trie::{hashed_cursor::HashedCursor, trie_cursor::TrieCursor}; use reth_trie_common::{ BranchNodeCompact, HashedPostState, Nibbles, StoredNibbles, updates::{StorageTrieUpdates, TrieUpdates}, @@ -414,38 +413,6 @@ impl MdbxProofsProvider { let mut storage_trie_keys = Vec::::with_capacity(storage_trie_len); for (hashed_address, nodes) in sorted_trie_updates.storage_tries_ref() { - // Handle wiped - mark all storage trie as deleted at the current block number - if nodes.is_deleted && append_mode { - let cursor = self.tx.cursor_dup_read::()?; - let mut ro = MdbxTrieCursor::new(cursor, block_number - 1, Some(*hashed_address)); - - // Merge old tombstones with new nodes in sorted key order. - // A BTreeMap ensures each path appears once and append_dup - // sees strictly increasing keys. - let mut merged: std::collections::BTreeMap> = - std::collections::BTreeMap::new(); - - // Old paths → tombstones - while let Some((path, _node)) = ro.next()? { - merged.insert(path, None); - } - - // New nodes override tombstones or add fresh entries - for (path, node) in nodes.storage_nodes_ref().iter().cloned() { - merged.insert(path, node); - } - - let mut cur = self.tx.cursor_dup_write::()?; - for (path, value) in merged { - let key = StorageTrieKey::new(*hashed_address, StoredNibbles::from(path)); - let vv = VersionedValue { block_number, value: MaybeDeleted(value) }; - cur.append_dup(key.clone(), vv)?; - storage_trie_keys.push(key); - } - - continue; - } - let keys = self.persist_history_batch( block_number, nodes @@ -460,36 +427,6 @@ impl MdbxProofsProvider { let mut hashed_storage_keys = Vec::::with_capacity(hashed_storage_len); for (hashed_address, storage) in sorted_post_state.storages { - if append_mode && storage.is_wiped() { - let cursor = self.tx.cursor_dup_read::()?; - let mut ro = MdbxStorageCursor::new(cursor, block_number - 1, hashed_address); - - // Merge old tombstones with new slot values in sorted key - // order. A BTreeMap ensures each slot appears once and - // append_dup sees strictly increasing keys. - let mut merged: std::collections::BTreeMap> = - std::collections::BTreeMap::new(); - - // Old slots → tombstones - while let Some((slot, _val)) = ro.next()? { - merged.insert(slot, None); - } - - // New slots override tombstones or add fresh entries - for (slot, val) in storage.storage_slots_ref() { - merged.insert(*slot, Some(StorageValue(*val))); - } - - let mut cur = self.tx.cursor_dup_write::()?; - for (slot, value) in merged { - let key = HashedStorageKey::new(hashed_address, slot); - let vv = VersionedValue { block_number, value: MaybeDeleted(value) }; - cur.append_dup(key.clone(), vv)?; - hashed_storage_keys.push(key); - } - - continue; - } let keys = self.persist_history_batch( block_number, storage @@ -981,7 +918,7 @@ impl OpProofsStore for MdbxProofsStorage { } } -/// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 `reth_db::database_metrics::DatabaseMetrics` +/// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 `reth_db::database_metrics::DatabaseMetrics` /// /// This implementation is copied from the /// [`DatabaseMetrics`](reth_db::database_metrics::DatabaseMetrics) implementation for @@ -1084,7 +1021,7 @@ mod tests { OpProofsInitProvider, OpProofsProviderRO, OpProofsProviderRw, db::{ StorageTrieKey, - models::{AccountTrieHistory, StorageTrieHistory}, + models::{AccountTrieHistory, MaybeDeleted, StorageTrieHistory}, }, }; use alloy_eips::NumHash; @@ -2967,7 +2904,7 @@ mod tests { } #[test] - fn store_trie_updates_wiped_storage_trie_nodes() { + fn store_trie_updates_deleted_storage_trie_nodes() { use reth_trie::updates::StorageTrieUpdates; let dir = TempDir::new().unwrap(); @@ -2987,16 +2924,15 @@ mod tests { .store_storage_branches(addr_wiped, vec![(p1, Some(n1)), (p2, Some(n2))]) .expect("seed wiped addr trie nodes"); - // Build a BlockStateDiff that wipes addr_wiped's storage trie, and - // also adds a normal storage-trie node for addr_live. + // Build a BlockStateDiff that deletes addr_wiped's storage trie nodes and also adds a + // normal storage-trie node for addr_live. const BLOCK: BlockWithParent = BlockWithParent::new(B256::ZERO, NumHash::new(123, B256::ZERO)); let mut diff_trie_updates = TrieUpdates::default(); - // Wipe for addr_wiped - let mut wiped_updates = StorageTrieUpdates::default(); - wiped_updates.set_deleted(true); - diff_trie_updates.storage_tries.insert(addr_wiped, wiped_updates); + let mut deleted_updates = StorageTrieUpdates::default(); + deleted_updates.removed_nodes.extend([p1, p2]); + diff_trie_updates.storage_tries.insert(addr_wiped, deleted_updates); // Normal update for addr_live let live_path = Nibbles::from_nibbles_unchecked([0xEE, 0xFF]); @@ -3045,12 +2981,12 @@ mod tests { } #[test] - fn store_trie_updates_wiped_storage() { + fn store_trie_updates_deleted_storage() { let dir = TempDir::new().unwrap(); let store = MdbxProofsStorage::new(dir.path()).expect("env"); store.set_earliest_block_number(0, B256::ZERO).expect("set earliest"); - // We'll pre-seed storage at block 0, then issue a wipe at BLOCK. + // Pre-seed storage at block 0, then delete it at BLOCK. const BLOCK: BlockWithParent = BlockWithParent::new(B256::ZERO, NumHash::new(42, B256::ZERO)); @@ -3063,12 +2999,9 @@ mod tests { // Seed prior storage (block_number = 0 in store_hashed_storages) store.store_hashed_storages(addr, vec![(s1, v1), (s2, v2)]).expect("seed"); - // Build BlockStateDiff that marks this address as wiped at BLOCK let mut diff_post_state = HashedPostState::default(); - - let wiped = reth_trie::HashedStorage::new(true); - - diff_post_state.storages.insert(addr, wiped); + let deleted = reth_trie::HashedStorage::from_iter([(s1, U256::ZERO), (s2, U256::ZERO)]); + diff_post_state.storages.insert(addr, deleted); // Execute let diff = BlockStateDiff { @@ -3088,8 +3021,8 @@ mod tests { cur.seek_by_key_subkey(key, BLOCK.block.number).expect("seek").expect("exists"); assert_eq!(vv.block_number, BLOCK.block.number); assert!( - vv.value.0.is_none(), - "expected deletion tombstone for slot {:?} at block {}", + vv.value.0.is_some_and(|value| value.0.is_zero()), + "expected zero value for slot {:?} at block {}", slot, BLOCK.block.number, ); @@ -3097,7 +3030,7 @@ mod tests { } #[test] - fn store_trie_updates_wiped_and_non_wiped_mixed_order() { + fn store_trie_updates_deleted_and_live_mixed_order() { let dir = TempDir::new().unwrap(); let store = MdbxProofsStorage::new(dir.path()).expect("env"); store.set_earliest_block_number(0, B256::ZERO).expect("set earliest"); @@ -3122,14 +3055,13 @@ mod tests { .expect("seed wiped addr"); store.store_hashed_storages(addr_live, vec![(ls1, lv1_old)]).expect("seed live addr"); - // Build diff: wiped first (by address sort), then non-wiped with a write + // Build diff: deleted slots first (by address sort), then a live write. const BLOCK: BlockWithParent = BlockWithParent::new(B256::ZERO, NumHash::new(77, B256::ZERO)); let mut diff_post_state = HashedPostState::default(); - // Wiped storage for addr_wiped - let wiped = reth_trie::HashedStorage::new(true); - diff_post_state.storages.insert(addr_wiped, wiped); + let deleted = reth_trie::HashedStorage::from_iter([(ws1, U256::ZERO), (ws2, U256::ZERO)]); + diff_post_state.storages.insert(addr_wiped, deleted); // Non-wiped storage for addr_live (append new value) let mut live = reth_trie::HashedStorage::default(); @@ -3153,8 +3085,8 @@ mod tests { cur.seek_by_key_subkey(key, BLOCK.block.number).expect("seek").expect("exists"); assert_eq!(vv.block_number, BLOCK.block.number); assert!( - vv.value.0.is_none(), - "expected deletion tombstone for wiped slot {:?} at block {}", + vv.value.0.is_some_and(|value| value.0.is_zero()), + "expected zero value for deleted slot {:?} at block {}", slot, BLOCK.block.number, ); @@ -3881,18 +3813,18 @@ mod tests { // ============= Wipe + re-add regression tests ============= - /// Regression: wiped storage with overlapping new slots must write the new - /// values (not just tombstones) and must not panic on `append_dup` ordering. + /// Regression: deleting storage with overlapping new slots must write the new values and must + /// not panic on `append_dup` ordering. #[test] - fn store_trie_updates_wiped_storage_with_readd() { + fn store_trie_updates_deleted_storage_with_readd() { let dir = TempDir::new().unwrap(); let store = MdbxProofsStorage::new(dir.path()).expect("env"); store.set_earliest_block_number(0, B256::ZERO).expect("set earliest"); let addr = B256::from([0x55; 32]); let old_slot = B256::from([0x01; 32]); - let shared_slot = B256::from([0x02; 32]); // exists before AND after wipe - let new_slot = B256::from([0x03; 32]); // only exists after wipe + let shared_slot = B256::from([0x02; 32]); + let new_slot = B256::from([0x03; 32]); // Seed prior storage store @@ -3902,12 +3834,14 @@ mod tests { ) .expect("seed"); - // Build diff: wipe + re-create shared_slot + add new_slot + // Delete old_slot, update shared_slot, and add new_slot. let mut post_state = HashedPostState::default(); - let mut wiped = reth_trie::HashedStorage::new(true); - wiped.storage.insert(shared_slot, U256::from(999u64)); - wiped.storage.insert(new_slot, U256::from(888u64)); - post_state.storages.insert(addr, wiped); + let storage = reth_trie::HashedStorage::from_iter([ + (old_slot, U256::ZERO), + (shared_slot, U256::from(999u64)), + (new_slot, U256::from(888u64)), + ]); + post_state.storages.insert(addr, storage); const BLOCK: BlockWithParent = BlockWithParent::new(B256::ZERO, NumHash::new(42, B256::ZERO)); @@ -3917,7 +3851,7 @@ mod tests { }; store.store_trie_updates(BLOCK, diff).expect("store"); - // Verify: old_slot has tombstone + // Verify: old_slot has a zero value. let tx = store.env.tx().expect("tx"); let mut cur = tx.new_cursor::().expect("cursor"); @@ -3925,7 +3859,7 @@ mod tests { let vv = cur.seek_by_key_subkey(key_old, BLOCK.block.number).expect("seek").expect("exists"); assert_eq!(vv.block_number, BLOCK.block.number); - assert!(vv.value.0.is_none(), "old_slot should be tombstoned"); + assert!(vv.value.0.is_some_and(|value| value.0.is_zero())); // Verify: shared_slot has the NEW value (not tombstone) let key_shared = HashedStorageKey::new(addr, shared_slot); @@ -3944,10 +3878,9 @@ mod tests { assert_eq!(inner.0, U256::from(888u64), "new_slot should have new value"); } - /// Regression: wiped storage trie with overlapping new nodes must write the - /// new nodes (not just tombstones) and must not panic on `append_dup` ordering. + /// Regression: deleting storage trie nodes while adding new nodes must preserve the new nodes. #[test] - fn store_trie_updates_wiped_storage_trie_with_readd() { + fn store_trie_updates_deleted_storage_trie_with_readd() { use reth_trie::updates::StorageTrieUpdates; let dir = TempDir::new().unwrap(); @@ -3971,13 +3904,13 @@ mod tests { ) .expect("seed"); - // Build diff: wipe + re-create shared_path + add new_path + // Delete old_path, update shared_path, and add new_path. let mut trie_updates = TrieUpdates::default(); - let mut wiped = StorageTrieUpdates::default(); - wiped.set_deleted(true); - wiped.storage_nodes.insert(shared_path, n_shared_new.clone()); - wiped.storage_nodes.insert(new_path, n_new.clone()); - trie_updates.storage_tries.insert(addr, wiped); + let mut updates = StorageTrieUpdates::default(); + updates.removed_nodes.insert(old_path); + updates.storage_nodes.insert(shared_path, n_shared_new.clone()); + updates.storage_nodes.insert(new_path, n_new.clone()); + trie_updates.storage_tries.insert(addr, updates); const BLOCK: BlockWithParent = BlockWithParent::new(B256::ZERO, NumHash::new(123, B256::ZERO)); diff --git a/rust/op-reth/crates/trie/src/db/store_v2/backfill.rs b/rust/op-reth/crates/trie/src/db/store_v2/backfill.rs index bfe12396196..3abe6b0fb6d 100644 --- a/rust/op-reth/crates/trie/src/db/store_v2/backfill.rs +++ b/rust/op-reth/crates/trie/src/db/store_v2/backfill.rs @@ -21,7 +21,7 @@ use alloy_eips::{BlockNumHash, eip1898::BlockWithParent}; use alloy_primitives::{B256, BlockNumber}; use reth_db::{ BlockNumberList, - cursor::{DbCursorRO, DbCursorRW, DbDupCursorRO, DbDupCursorRW}, + cursor::{DbCursorRO, DbCursorRW, DbDupCursorRO}, models::sharded_key::ShardedKey, table::Table, transaction::{DbTx, DbTxMut}, @@ -378,10 +378,6 @@ impl MdbxProofsProviderV2()?; for (hashed_address, nodes) in trie_updates.storage_tries_ref() { - if nodes.is_deleted && cur.seek_exact(*hashed_address)?.is_some() { - cur.delete_current_duplicates()?; - count += 1; - } for (nibbles, maybe_node) in nodes.storage_nodes_ref() { let subkey = StoredNibblesSubKey(*nibbles); let existing = cur @@ -434,10 +430,6 @@ impl MdbxProofsProviderV2()?; for (hashed_addr, storage) in hashed_post_state.account_storages() { - if storage.wiped && cur.seek_exact(*hashed_addr)?.is_some() { - cur.delete_current_duplicates()?; - count += 1; - } for (slot, value) in &storage.storage_slots { let existing = cur .seek_by_key_subkey(*hashed_addr, *slot)? diff --git a/rust/op-reth/crates/trie/src/db/store_v2/snapshot_tests.rs b/rust/op-reth/crates/trie/src/db/store_v2/snapshot_tests.rs index bc9ec5a3ab6..c9c5fb57a7c 100644 --- a/rust/op-reth/crates/trie/src/db/store_v2/snapshot_tests.rs +++ b/rust/op-reth/crates/trie/src/db/store_v2/snapshot_tests.rs @@ -552,7 +552,7 @@ fn write_update_snapshot_deletes_destroyed_account_leaf() { } #[test] -fn write_update_snapshot_wipes_all_storage_slots() { +fn write_update_snapshot_deletes_all_explicit_storage_slots() { let db = setup_db(); let old_anchor = anchor(10, 0x10); let new_anchor = anchor(9, 0x09); @@ -575,14 +575,17 @@ fn write_update_snapshot_wipes_all_storage_slots() { { let provider = MdbxProofsProviderV2::new(db.tx_mut().expect("rw")); let mut storages: B256Map = B256Map::default(); - storages.insert(addr, HashedStorageSorted { storage_slots: vec![], wiped: true }); + storages.insert( + addr, + HashedStorageSorted { storage_slots: vec![(slot_1, U256::ZERO), (slot_2, U256::ZERO)] }, + ); let sorted_post_state = HashedPostStateSorted::new(Vec::new(), storages); let diff = BlockStateDiff { sorted_trie_updates: TrieUpdates::default().into_sorted(), sorted_post_state, }; let counts = provider.update_snapshot(new_anchor, &diff).expect("update"); - assert_eq!(counts.hashed_storages_written_total, 1, "wipe counts once per address"); + assert_eq!(counts.hashed_storages_written_total, 2); OpProofsBackfillProvider::commit(provider).expect("commit"); } @@ -590,16 +593,16 @@ fn write_update_snapshot_wipes_all_storage_slots() { let mut cur = tx.cursor_dup_read::().expect("cur"); assert!( cur.seek_by_key_subkey(addr, slot_1).expect("seek").is_none_or(|e| e.key != slot_1), - "slot 1 must be wiped", + "slot 1 must be deleted", ); assert!( cur.seek_by_key_subkey(addr, slot_2).expect("seek").is_none_or(|e| e.key != slot_2), - "slot 2 must be wiped (delete_current_duplicates drops every dup, not just the first)", + "slot 2 must be deleted", ); } #[test] -fn write_update_snapshot_wipes_then_adds_slots_in_same_block() { +fn write_update_snapshot_deletes_then_adds_slots_in_same_block() { let db = setup_db(); let old_anchor = anchor(10, 0x10); let new_anchor = anchor(9, 0x09); @@ -631,8 +634,12 @@ fn write_update_snapshot_wipes_then_adds_slots_in_same_block() { storages.insert( addr, HashedStorageSorted { - storage_slots: vec![(slot_new_a, new_value_a), (slot_new_b, new_value_b)], - wiped: true, + storage_slots: vec![ + (slot_old_1, U256::ZERO), + (slot_old_2, U256::ZERO), + (slot_new_a, new_value_a), + (slot_new_b, new_value_b), + ], }, ); let sorted_post_state = HashedPostStateSorted::new(Vec::new(), storages); @@ -641,15 +648,14 @@ fn write_update_snapshot_wipes_then_adds_slots_in_same_block() { sorted_post_state, }; let counts = provider.update_snapshot(new_anchor, &diff).expect("update"); - // The wipe counts once + one per new slot. - assert_eq!(counts.hashed_storages_written_total, 3); + assert_eq!(counts.hashed_storages_written_total, 4); OpProofsBackfillProvider::commit(provider).expect("commit"); } let tx = db.tx().expect("ro"); let mut cur = tx.cursor_dup_read::().expect("cur"); - // Old slots are gone (wipe phase). + // Old slots are gone. assert!( cur.seek_by_key_subkey(addr, slot_old_1).expect("seek").is_none_or(|e| e.key != slot_old_1), "old slot 1 must be wiped", @@ -695,10 +701,7 @@ fn write_update_snapshot_deletes_zero_value_storage_slot() { { let provider = MdbxProofsProviderV2::new(db.tx_mut().expect("rw")); let mut storages: B256Map = B256Map::default(); - storages.insert( - addr, - HashedStorageSorted { storage_slots: vec![(slot, U256::ZERO)], wiped: false }, - ); + storages.insert(addr, HashedStorageSorted { storage_slots: vec![(slot, U256::ZERO)] }); let sorted_post_state = HashedPostStateSorted::new(Vec::new(), storages); let diff = BlockStateDiff { sorted_trie_updates: TrieUpdates::default().into_sorted(), @@ -720,7 +723,7 @@ fn write_update_snapshot_deletes_zero_value_storage_slot() { } #[test] -fn write_update_snapshot_deletes_storage_trie_when_is_deleted() { +fn write_update_snapshot_deletes_explicit_storage_trie_node() { let db = setup_db(); let old_anchor = anchor(10, 0x10); let new_anchor = anchor(9, 0x09); @@ -739,14 +742,15 @@ fn write_update_snapshot_deletes_storage_trie_when_is_deleted() { { let provider = MdbxProofsProviderV2::new(db.tx_mut().expect("rw")); let mut updates = TrieUpdates::default(); - let st = StorageTrieUpdates { is_deleted: true, ..Default::default() }; + let mut st = StorageTrieUpdates::default(); + st.removed_nodes.insert(path); updates.storage_tries.insert(addr, st); let diff = BlockStateDiff { sorted_trie_updates: updates.into_sorted(), sorted_post_state: HashedPostStateSorted::default(), }; let counts = provider.update_snapshot(new_anchor, &diff).expect("update"); - assert_eq!(counts.storage_trie_updates_written_total, 1, "is_deleted counts once"); + assert_eq!(counts.storage_trie_updates_written_total, 1); OpProofsBackfillProvider::commit(provider).expect("commit"); } @@ -756,7 +760,7 @@ fn write_update_snapshot_deletes_storage_trie_when_is_deleted() { cur.seek_by_key_subkey(addr, StoredNibblesSubKey(path)) .expect("seek") .is_none_or(|e| e.nibbles != StoredNibblesSubKey(path)), - "is_deleted must drop every storage-trie row under the address", + "the explicitly removed storage-trie node must be deleted", ); } diff --git a/rust/op-reth/crates/trie/src/db/store_v2/tests.rs b/rust/op-reth/crates/trie/src/db/store_v2/tests.rs index 50481d3baff..9c9913fcf06 100644 --- a/rust/op-reth/crates/trie/src/db/store_v2/tests.rs +++ b/rust/op-reth/crates/trie/src/db/store_v2/tests.rs @@ -689,7 +689,7 @@ fn store_trie_updates_deleted_storage_trie() { } #[test] -fn store_trie_updates_wiped_storage_trie_nodes() { +fn store_trie_updates_deleted_storage_trie_nodes() { let db = setup_db(); let addr_wiped = B256::from([0x10; 32]); @@ -710,11 +710,11 @@ fn store_trie_updates_wiped_storage_trie_nodes() { OpProofsInitProvider::commit(provider).expect("commit"); } - // Build diff that wipes addr_wiped's storage trie and adds a node for addr_live + // Delete addr_wiped's storage trie nodes and add a node for addr_live. let mut trie_updates = TrieUpdates::default(); - let mut wiped_updates = StorageTrieUpdates::default(); - wiped_updates.set_deleted(true); - trie_updates.storage_tries.insert(addr_wiped, wiped_updates); + let mut deleted_updates = StorageTrieUpdates::default(); + deleted_updates.removed_nodes.extend([p1, p2]); + trie_updates.storage_tries.insert(addr_wiped, deleted_updates); let live_path = Nibbles::from_nibbles_unchecked([0xEE, 0xFF]); let live_node = BranchNodeCompact::default(); @@ -744,7 +744,7 @@ fn store_trie_updates_wiped_storage_trie_nodes() { } #[test] -fn store_trie_updates_wiped_storage() { +fn store_trie_updates_deleted_storage() { let db = setup_db(); let addr = B256::from([0x55; 32]); @@ -762,9 +762,11 @@ fn store_trie_updates_wiped_storage() { OpProofsInitProvider::commit(provider).expect("commit"); } - // Build diff that wipes storage + // Delete both storage slots. let mut post_state = HashedPostState::default(); - post_state.storages.insert(addr, HashedStorage::new(true)); + post_state + .storages + .insert(addr, HashedStorage::from_iter([(s1, U256::ZERO), (s2, U256::ZERO)])); let diff = BlockStateDiff { sorted_trie_updates: TrieUpdates::default().into_sorted(), sorted_post_state: post_state.into_sorted(), @@ -796,7 +798,7 @@ fn store_trie_updates_wiped_storage() { } #[test] -fn store_trie_updates_wiped_and_non_wiped_mixed_order() { +fn store_trie_updates_deleted_and_live_mixed_order() { let db = setup_db(); let addr_wiped = B256::from([0x01; 32]); @@ -817,9 +819,9 @@ fn store_trie_updates_wiped_and_non_wiped_mixed_order() { OpProofsInitProvider::commit(provider).expect("commit"); } - // Build diff: wipe addr_wiped, update addr_live + // Delete addr_wiped's slot and update addr_live. let mut post_state = HashedPostState::default(); - post_state.storages.insert(addr_wiped, HashedStorage::new(true)); + post_state.storages.insert(addr_wiped, HashedStorage::from_iter([(ws1, U256::ZERO)])); let mut live_storage = HashedStorage::default(); live_storage.storage.insert(ls1, lv1_new); post_state.storages.insert(addr_live, live_storage); @@ -1790,10 +1792,9 @@ fn hashed_storages_no_duplicates_multiple_slots() { assert!(slots.iter().all(|(k, _)| *k != slot_b), "slot_b should be gone"); } -/// Regression: wipe followed by re-add in same block must leave exactly the -/// new slots, no ghosts from pre-wipe state. +/// Regression: deleting one slot while adding another must not leave duplicate entries. #[test] -fn hashed_storages_wipe_then_readd_no_duplicates() { +fn hashed_storages_delete_then_add_no_duplicates() { let db = setup_db(); let addr = B256::from([0xEE; 32]); @@ -1811,11 +1812,11 @@ fn hashed_storages_wipe_then_readd_no_duplicates() { assert_eq!(count_hashed_storage_entries(&db, addr), 1); - // Block 1: wipe + write new_slot + // Block 1: delete old_slot and write new_slot. { let mut post_state = HashedPostState::default(); - let mut storage = HashedStorage::new(true); // wiped = true - storage.storage.insert(new_slot, U256::from(42u64)); + let storage = + HashedStorage::from_iter([(old_slot, U256::ZERO), (new_slot, U256::from(42u64))]); post_state.storages.insert(addr, storage); let diff = BlockStateDiff { @@ -1825,16 +1826,15 @@ fn hashed_storages_wipe_then_readd_no_duplicates() { store_block(&db, make_block_ref(1, B256::repeat_byte(0x01), B256::ZERO), diff); } - // Exactly 1 entry: only new_slot, old_slot wiped + // Exactly 1 entry: only new_slot remains. let slots = collect_hashed_storage_slots(&db, addr); - assert_eq!(slots.len(), 1, "after wipe+add: exactly 1 entry"); + assert_eq!(slots.len(), 1, "after delete+add: exactly 1 entry"); assert_eq!(slots[0], (new_slot, U256::from(42u64))); - // Block 2: wipe + re-add the same new_slot with different value + // Block 2: update new_slot. { let mut post_state = HashedPostState::default(); - let mut storage = HashedStorage::new(true); - storage.storage.insert(new_slot, U256::from(84u64)); + let storage = HashedStorage::from_iter([(new_slot, U256::from(84u64))]); post_state.storages.insert(addr, storage); let diff = BlockStateDiff { @@ -1846,7 +1846,7 @@ fn hashed_storages_wipe_then_readd_no_duplicates() { // Still exactly 1 entry let slots = collect_hashed_storage_slots(&db, addr); - assert_eq!(slots.len(), 1, "after second wipe+add: exactly 1 entry"); + assert_eq!(slots.len(), 1, "after update: exactly 1 entry"); assert_eq!(slots[0], (new_slot, U256::from(84u64))); } diff --git a/rust/op-reth/crates/trie/src/db/store_v2/write.rs b/rust/op-reth/crates/trie/src/db/store_v2/write.rs index 0173611aecc..329a622e25e 100644 --- a/rust/op-reth/crates/trie/src/db/store_v2/write.rs +++ b/rust/op-reth/crates/trie/src/db/store_v2/write.rs @@ -184,51 +184,6 @@ fn append_storage_trie_entry( Ok(()) } -/// Snapshot all existing storage-trie nodes for `hashed_address` into the changeset and -/// collector, then delete them from the state table. -/// -/// Returns the set of nibble subkeys that were snapshotted so the caller can avoid -/// double-recording changeset entries for those nodes in the subsequent per-node loop. -/// -/// Used for the `is_deleted` (full-wipe) path in [`MdbxProofsProviderV2::write_storage_trie`]. -fn snapshot_and_wipe_storage_trie( - state_cursor: &mut ( - impl DbCursorRO - + DbDupCursorRO - + DbDupCursorRW - ), - cs_cursor: &mut impl DbDupCursorRW, - cs_key: BlockNumberHashedAddress, - collector: &mut HistoryCollector, -) -> OpProofsStorageResult> { - let hashed_address = cs_key.0.1; - let mut wiped_nibbles = BTreeSet::new(); - if let Some((_key, first_entry)) = state_cursor.seek_exact(hashed_address)? { - wiped_nibbles.insert(first_entry.nibbles.clone()); - append_storage_trie_entry( - cs_cursor, - cs_key, - first_entry.nibbles, - Some(first_entry.node), - collector, - )?; - while let Some((_, entry)) = state_cursor.next_dup()? { - wiped_nibbles.insert(entry.nibbles.clone()); - append_storage_trie_entry( - cs_cursor, - cs_key, - entry.nibbles, - Some(entry.node), - collector, - )?; - } - if state_cursor.seek_exact(hashed_address)?.is_some() { - state_cursor.delete_current_duplicates()?; - } - } - Ok(wiped_nibbles) -} - /// Write a single storage-trie node update: snapshot the old node into the changeset, /// record in the history collector, then apply the new value (upsert or delete). /// @@ -273,36 +228,6 @@ fn append_hashed_storage_entry( Ok(()) } -/// Snapshot all existing hashed-storage slots for `hashed_address` into the changeset and -/// collector, delete them from the state table, and return the set of slot keys that were wiped. -/// -/// Used for the `is_wiped` (full-wipe) path in [`MdbxProofsProviderV2::write_hashed_storages`]. -fn snapshot_and_wipe_hashed_storage( - state_cursor: &mut ( - impl DbCursorRO - + DbDupCursorRO - + DbDupCursorRW - ), - cs_cursor: &mut impl DbDupCursorRW, - cs_key: BlockNumberHashedAddress, - collector: &mut HistoryCollector, -) -> OpProofsStorageResult { - let hashed_address = cs_key.0.1; - let mut wiped_slots = alloy_primitives::map::B256Set::default(); - if let Some(entry) = state_cursor.seek_by_key_subkey(hashed_address, B256::ZERO)? { - append_hashed_storage_entry(cs_cursor, cs_key, entry, collector)?; - wiped_slots.insert(entry.key); - while let Some(entry) = state_cursor.next_dup_val()? { - append_hashed_storage_entry(cs_cursor, cs_key, entry, collector)?; - wiped_slots.insert(entry.key); - } - if state_cursor.seek_exact(hashed_address)?.is_some() { - state_cursor.delete_current_duplicates()?; - } - } - Ok(wiped_slots) -} - /// Write a single hashed-storage slot update: snapshot the old value into the changeset, /// record in the history collector, then apply the new value (upsert or delete). /// @@ -685,9 +610,6 @@ impl MdbxProofsProviderV2 { } /// Write storage trie branch-node updates for one block. - /// - /// Handles the `is_deleted` wipe path (snapshot all existing nodes into - /// the changeset before clearing) as well as per-node updates. fn write_storage_trie( block_number: BlockNumber, updates: &TrieUpdatesSorted, @@ -700,48 +622,16 @@ impl MdbxProofsProviderV2 { for (hashed_address, nodes) in updates.storage_tries_ref() { let cs_key = BlockNumberHashedAddress((block_number, *hashed_address)); - - if nodes.is_deleted { - let wiped_nibbles = - snapshot_and_wipe_storage_trie(state_cursor, cs_cursor, cs_key, collector)?; + for (nibbles, maybe_node) in nodes.storage_nodes_ref() { + write_storage_trie_node( + state_cursor, + cs_cursor, + cs_key, + StoredNibblesSubKey(*nibbles), + maybe_node, + collector, + )?; count += 1; - - // After a wipe the state table is empty for this address, so there is no - // old node to seek or delete. Nodes whose nibbles were already snapshotted - // above must not be recorded again (that would create conflicting duplicate - // changeset entries). Brand-new nibbles get a `None` old-value entry so - // that unwind knows to delete them. - for (nibbles, maybe_node) in nodes.storage_nodes_ref() { - let subkey = StoredNibblesSubKey(*nibbles); - if !wiped_nibbles.contains(&subkey) { - append_storage_trie_entry( - cs_cursor, - cs_key, - subkey.clone(), - None, - collector, - )?; - } - if let Some(node) = maybe_node { - state_cursor.upsert( - *hashed_address, - &StorageTrieEntry { nibbles: subkey, node: node.clone() }, - )?; - } - count += 1; - } - } else { - for (nibbles, maybe_node) in nodes.storage_nodes_ref() { - write_storage_trie_node( - state_cursor, - cs_cursor, - cs_key, - StoredNibblesSubKey(*nibbles), - maybe_node, - collector, - )?; - count += 1; - } } } Ok(count) @@ -787,9 +677,6 @@ impl MdbxProofsProviderV2 { } /// Write hashed-storage updates for one block. - /// - /// Handles the `is_wiped` path (snapshot all existing slots into the - /// changeset before clearing) as well as per-slot updates. fn write_hashed_storages( block_number: BlockNumber, post_state: &HashedPostStateSorted, @@ -802,44 +689,16 @@ impl MdbxProofsProviderV2 { for (hashed_address, storage) in &post_state.storages { let cs_key = BlockNumberHashedAddress((block_number, *hashed_address)); - - if storage.is_wiped() { - // Snapshot + wipe existing slots; track what was wiped so the - // new-slots loop below doesn't double-append changeset entries. - let wiped_slots = - snapshot_and_wipe_hashed_storage(state_cursor, cs_cursor, cs_key, collector)?; - - // Write new slots. Slots not seen during the wipe get a zero - // old-value entry in the changeset. - for (storage_key, value) in storage.storage_slots_ref() { - if !wiped_slots.contains(storage_key) { - append_hashed_storage_entry( - cs_cursor, - cs_key, - StorageEntry { key: *storage_key, value: U256::ZERO }, - collector, - )?; - } - if *value != U256::ZERO { - state_cursor.upsert( - *hashed_address, - &StorageEntry { key: *storage_key, value: *value }, - )?; - } - count += 1; - } - } else { - for (storage_key, value) in storage.storage_slots_ref() { - write_hashed_storage_slot( - state_cursor, - cs_cursor, - cs_key, - *storage_key, - *value, - collector, - )?; - count += 1; - } + for (storage_key, value) in storage.storage_slots_ref() { + write_hashed_storage_slot( + state_cursor, + cs_cursor, + cs_key, + *storage_key, + *value, + collector, + )?; + count += 1; } } Ok(count) diff --git a/rust/op-reth/crates/trie/src/engine/buffer/overlay.rs b/rust/op-reth/crates/trie/src/engine/buffer/overlay.rs index 74c30b43fcf..f22f8f41371 100644 --- a/rust/op-reth/crates/trie/src/engine/buffer/overlay.rs +++ b/rust/op-reth/crates/trie/src/engine/buffer/overlay.rs @@ -10,8 +10,9 @@ use reth_provider::{ }; use reth_revm::db::BundleState; use reth_trie::{ - AccountProof, ExecutionWitnessMode, HashedPostState, HashedStorage, MultiProof, - MultiProofTargets, StorageMultiProof, TrieInput, updates::TrieUpdates, + AccountProof, DecodedMultiProofV2, ExecutionWitnessMode, HashedPostState, HashedStorage, + MultiProof, MultiProofTargets, MultiProofTargetsV2, StorageMultiProof, TrieInput, + updates::TrieUpdates, }; use std::{ fmt::Debug, @@ -97,16 +98,11 @@ where // Check buffer via trie_input cache let state = &self.trie_input().state; - // Check for storage updates or wipes in the overlay - if let Some(account_storage) = state.storages.get(&hashed_address) { - // Check specific slot - if let Some(value) = account_storage.storage.get(&hashed_slot) { - return Ok(Some(*value)); - } - // If the whole storage was wiped in the overlay (e.g. reused address), we return 0 - if account_storage.wiped { - return Ok(Some(StorageValue::ZERO)); - } + // Check for storage updates in the overlay + if let Some(account_storage) = state.storages.get(&hashed_address) && + let Some(value) = account_storage.storage.get(&hashed_slot) + { + return Ok(Some(*value)); } // Check if account was destroyed in the overlay (implicit storage wipe) @@ -220,6 +216,15 @@ where self.inner.multiproof(input, targets) } + fn multiproof_v2( + &self, + mut input: TrieInput, + targets: MultiProofTargetsV2, + ) -> ProviderResult { + input.prepend_self(self.trie_input().clone()); + self.inner.multiproof_v2(input, targets) + } + fn witness( &self, mut input: TrieInput, @@ -281,7 +286,7 @@ impl<'a, P> HashedPostStateProvider for MemoryOverlayOpProofsStateProviderRef<'a where P: OpProofsProviderRO + Clone, { - /// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_chain_state::MemoryOverlayStateProviderRef::hashed_post_state` /// /// Uses the OP proofs-buffer trie input instead of upstream's executed-block overlay. diff --git a/rust/op-reth/crates/trie/src/in_memory.rs b/rust/op-reth/crates/trie/src/in_memory.rs index 59da731ace8..9efb2b63839 100644 --- a/rust/op-reth/crates/trie/src/in_memory.rs +++ b/rust/op-reth/crates/trie/src/in_memory.rs @@ -98,38 +98,9 @@ impl InMemoryStorageInner { } for (hashed_address, storage) in &block_state_diff.sorted_post_state.storages { - // Handle wiped storage: iterate all existing values and mark them as deleted - // This is an expensive operation and should never happen for blocks going forward. - if storage.wiped { - // Collect latest values for each slot up to the current block - let mut slot_to_latest: std::collections::BTreeMap = - std::collections::BTreeMap::new(); - - for ((block, address, slot), value) in &self.hashed_storages { - if *block < block_number && *address == *hashed_address { - if let Some((existing_block, _)) = slot_to_latest.get(slot) { - if *block > *existing_block { - slot_to_latest.insert(*slot, (*block, *value)); - } - } else { - slot_to_latest.insert(*slot, (*block, *value)); - } - } - } - - // Store zero values for all non-zero slots to mark them as deleted - for (slot, (_, value)) in slot_to_latest { - if !value.is_zero() { - self.hashed_storages - .insert((block_number, *hashed_address, slot), U256::ZERO); - result.hashed_storages_written_total += 1; - } - } - } else { - for (slot, value) in storage.storage_slots_ref() { - self.hashed_storages.insert((block_number, *hashed_address, *slot), *value); - result.hashed_storages_written_total += 1; - } + for (slot, value) in storage.storage_slots_ref() { + self.hashed_storages.insert((block_number, *hashed_address, *slot), *value); + result.hashed_storages_written_total += 1; } } diff --git a/rust/op-reth/crates/trie/src/proof.rs b/rust/op-reth/crates/trie/src/proof.rs index 075ac6ef757..cbdd2160434 100644 --- a/rust/op-reth/crates/trie/src/proof.rs +++ b/rust/op-reth/crates/trie/src/proof.rs @@ -17,8 +17,9 @@ use reth_trie::{ witness::TrieWitness, }; use reth_trie_common::{ - AccountProof, HashedPostState, HashedPostStateSorted, HashedStorage, MultiProof, - MultiProofTargets, StorageMultiProof, StorageProof, TrieInput, updates::TrieUpdates, + AccountProof, DecodedMultiProofV2, HashedPostState, HashedPostStateSorted, HashedStorage, + MultiProof, MultiProofTargets, MultiProofTargetsV2, StorageMultiProof, StorageProof, TrieInput, + updates::TrieUpdates, }; /// Extends [`Proof`] with operations specific for working with [`crate::OpProofsStorage`]. @@ -42,6 +43,14 @@ pub trait DatabaseProof

{ input: TrieInput, targets: MultiProofTargets, ) -> Result; + + /// Generates the state [`DecodedMultiProofV2`] for target hashed account and storage keys. + fn overlay_multiproof_v2( + provider: P, + block_number: u64, + input: TrieInput, + targets: MultiProofTargetsV2, + ) -> Result; } impl

DatabaseProof

@@ -101,6 +110,28 @@ where .with_prefix_sets_mut(input.prefix_sets) .multiproof(targets) } + + /// Generates the state [`DecodedMultiProofV2`] for target hashed account and storage keys. + fn overlay_multiproof_v2( + provider: P, + block_number: u64, + input: TrieInput, + targets: MultiProofTargetsV2, + ) -> Result { + let nodes_sorted = input.nodes.into_sorted(); + let state_sorted = input.state.into_sorted(); + Self::from_provider(provider.clone(), block_number) + .with_trie_cursor_factory(InMemoryTrieCursorFactory::new( + OpProofsTrieCursorFactory::new(provider.clone(), block_number), + &nodes_sorted, + )) + .with_hashed_cursor_factory(HashedPostStateCursorFactory::new( + OpProofsHashedAccountCursorFactory::new(provider, block_number), + &state_sorted, + )) + .with_prefix_sets_mut(input.prefix_sets) + .multiproof_v2(targets) + } } /// Extends [`StorageProof`] with operations specific for working with [`crate::OpProofsStorage`]. diff --git a/rust/op-reth/crates/trie/src/provider.rs b/rust/op-reth/crates/trie/src/provider.rs index 2d36ae50d74..b5c2fd73c67 100644 --- a/rust/op-reth/crates/trie/src/provider.rs +++ b/rust/op-reth/crates/trie/src/provider.rs @@ -25,8 +25,9 @@ use reth_trie::{ witness::TrieWitness, }; use reth_trie_common::{ - AccountProof, HashedPostState, HashedStorage, KeccakKeyHasher, MultiProof, MultiProofTargets, - StorageMultiProof, StorageProof, TrieInput, updates::TrieUpdates, + AccountProof, DecodedMultiProofV2, HashedPostState, HashedStorage, KeccakKeyHasher, MultiProof, + MultiProofTargets, MultiProofTargetsV2, StorageMultiProof, StorageProof, TrieInput, + updates::TrieUpdates, }; use std::fmt::Debug; @@ -177,6 +178,15 @@ where .map_err(ProviderError::from) } + fn multiproof_v2( + &self, + input: TrieInput, + targets: MultiProofTargetsV2, + ) -> ProviderResult { + Proof::overlay_multiproof_v2(self.provider.clone(), self.block_number, input, targets) + .map_err(ProviderError::from) + } + fn witness( &self, input: TrieInput, @@ -193,7 +203,7 @@ impl<'a, P> HashedPostStateProvider for OpProofsStateProviderRef<'a, P> where P: OpProofsProviderRO + Clone, { - /// UPSTREAM-MIRROR(copy): reth@rev:0fbe428 + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 /// `reth_provider::LatestStateProviderRef::hashed_post_state` /// /// Mirrors the hashing/zeroing sequence, using historical OP proofs cursors instead of diff --git a/rust/op-reth/crates/trie/tests/lib.rs b/rust/op-reth/crates/trie/tests/lib.rs index 7573ee33a6c..15aff21146f 100644 --- a/rust/op-reth/crates/trie/tests/lib.rs +++ b/rust/op-reth/crates/trie/tests/lib.rs @@ -1308,15 +1308,12 @@ fn test_large_batch_operations(storage: S) -> Result<(), OpPro Ok(()) } -/// Test wiped storage in [`HashedPostState`] -/// -/// When `store_trie_updates` receives a [`HashedPostState`] with wiped=true for a storage entry, -/// it should iterate all existing values for that address and create deletion entries for them. +/// Test explicit storage deletions in [`HashedPostState`]. #[test_case(InMemoryProofsStorage::new(); "InMemory")] #[test_case(create_mdbx_proofs_storage(); "Mdbx")] #[test_case(create_mdbx_proofs_storage_v2(); "MdbxV2")] #[serial] -fn test_store_trie_updates_with_wiped_storage( +fn test_store_trie_updates_with_deleted_storage( storage: S, ) -> Result<(), OpProofsStorageError> { use reth_trie::HashedStorage; @@ -1349,17 +1346,18 @@ fn test_store_trie_updates_with_wiped_storage( assert_eq!(found_slots[2], (B256::repeat_byte(0x30), U256::from(300))); assert_eq!(found_slots[3], (B256::repeat_byte(0x40), U256::from(400))); - // Now create a HashedPostState with wiped=true for this address at block 100 + // Delete every storage slot at block 100. let mut post_state = HashedPostState::default(); - let wiped_storage = HashedStorage::new(true); // wiped=true, empty storage map - post_state.storages.insert(hashed_address, wiped_storage); + let deleted_storage = + HashedStorage::from_iter(storage_slots.iter().map(|(slot, _)| (*slot, U256::ZERO))); + post_state.storages.insert(hashed_address, deleted_storage); let block_state_diff = BlockStateDiff { sorted_trie_updates: TrieUpdatesSorted::default(), sorted_post_state: post_state.into_sorted(), }; - // Store the wiped state + // Store the deleted state. let provider_rw = storage.provider_rw().expect("provider rw"); provider_rw.store_trie_updates(block_ref, block_state_diff)?; provider_rw.commit()?; @@ -1474,7 +1472,7 @@ fn test_store_trie_updates_comprehensive( // Add storage for an address let storage_addr = B256::repeat_byte(0x50); - let mut hashed_storage = HashedStorage::new(false); + let mut hashed_storage = HashedStorage::default(); hashed_storage.storage.insert(B256::repeat_byte(0x01), U256::from(111)); hashed_storage.storage.insert(B256::repeat_byte(0x02), U256::from(222)); hashed_storage.storage.insert(B256::repeat_byte(0x03), U256::ZERO); // Deleted storage @@ -1645,7 +1643,7 @@ fn test_replace_updates_applies_all_updates( initial_trie_updates_100.account_nodes.insert(common_branch_path, initial_branch.clone()); let mut initial_post_state_100 = HashedPostState::default(); - let mut initial_storage_100 = HashedStorage::new(false); + let mut initial_storage_100 = HashedStorage::default(); initial_storage_100.storage.insert(initial_storage_slot, initial_storage_value); initial_post_state_100.storages.insert(initial_storage_addr, initial_storage_100); @@ -1734,7 +1732,7 @@ fn test_replace_updates_applies_all_updates( let mut new_post_state = HashedPostState::default(); new_post_state.accounts.insert(new_account_addr, Some(new_account)); - let mut new_storage = HashedStorage::new(false); + let mut new_storage = HashedStorage::default(); new_storage.storage.insert(new_storage_slot, new_storage_value); new_post_state.storages.insert(new_storage_addr, new_storage); diff --git a/rust/op-reth/crates/txpool/src/pool.rs b/rust/op-reth/crates/txpool/src/pool.rs index 298cc27cdca..fda20dbad70 100644 --- a/rust/op-reth/crates/txpool/src/pool.rs +++ b/rust/op-reth/crates/txpool/src/pool.rs @@ -12,7 +12,7 @@ use std::{ }; use alloy_consensus::Transaction; -use alloy_eips::eip7594::BlobTransactionSidecarVariant; +use alloy_eips::eip7594::{BlobCellMask, BlobTransactionSidecarVariant}; use alloy_primitives::{Address, B256, TxHash}; use metrics::Counter; use reth_eth_wire_types::HandleMempoolData; @@ -362,6 +362,7 @@ where delegate!(fn queued_transactions(&self) -> Vec>>); delegate!(fn pending_and_queued_txn_count(&self) -> (usize, usize)); delegate!(fn all_transactions(&self) -> AllPoolTransactions); + delegate!(fn all_transactions_by_sender(&self, sender: Address) -> AllPoolTransactions); delegate!(fn all_transaction_hashes(&self) -> Vec); delegate!(fn remove_transactions(&self, hashes: Vec) -> Vec>>); delegate!(fn remove_transactions_and_descendants(&self, hashes: Vec) -> Vec>>); @@ -403,7 +404,7 @@ where delegate!(fn get_blobs_for_versioned_hashes_v1(&self, versioned_hashes: &[B256]) -> Result>, BlobStoreError>); delegate!(fn get_blobs_for_versioned_hashes_v2(&self, versioned_hashes: &[B256]) -> Result>, BlobStoreError>); delegate!(fn get_blobs_for_versioned_hashes_v3(&self, versioned_hashes: &[B256]) -> Result>, BlobStoreError>); - delegate!(fn get_blobs_for_versioned_hashes_v4(&self, versioned_hashes: &[B256], indices_bitarray: alloy_primitives::B128) -> Result>, BlobStoreError>); + delegate!(fn get_blobs_for_versioned_hashes_v4(&self, versioned_hashes: &[B256], cell_mask: BlobCellMask) -> Result>, BlobStoreError>); delegate!(fn has_blobs_for_versioned_hashes(&self, versioned_hashes: &[B256]) -> Result, BlobStoreError>); } diff --git a/rust/op-reth/crates/txpool/src/validator.rs b/rust/op-reth/crates/txpool/src/validator.rs index 6e9cbb614b5..0a9d0ebddf6 100644 --- a/rust/op-reth/crates/txpool/src/validator.rs +++ b/rust/op-reth/crates/txpool/src/validator.rs @@ -354,7 +354,7 @@ where } } -/// UPSTREAM-MIRROR(delegate): reth@rev:0fbe428 +/// UPSTREAM-MIRROR(delegate): reth@rev:4553cf1 /// `reth_transaction_pool::validate::EthTransactionValidator` /// /// Wraps the Ethereum validator. Re-check newly defaulted batch methods and upstream overrides; diff --git a/rust/op-revm/src/api/exec.rs b/rust/op-revm/src/api/exec.rs index 4d3c05f18ee..66064ccb983 100644 --- a/rust/op-revm/src/api/exec.rs +++ b/rust/op-revm/src/api/exec.rs @@ -48,7 +48,7 @@ impl OpContextTr for T where /// Type alias for the error type of the `OpEvm`. pub type OpError = EVMError<<::Db as Database>::Error, OpTransactionError>; -/// UPSTREAM-MIRROR(copy): revm-handler@42.0.1 `revm_handler::api::ExecuteEvm` +/// UPSTREAM-MIRROR(copy): revm-handler@43.0.2 `revm_handler::api::ExecuteEvm` /// /// Copies upstream's `ExecuteEvm` implementation with `OpHandler` substituted for /// `MainnetHandler`. Re-diff the bodies when the upstream implementation changes. @@ -95,7 +95,7 @@ where } } -/// UPSTREAM-MIRROR(copy): revm-handler@42.0.1 `revm_handler::api::ExecuteCommitEvm` +/// UPSTREAM-MIRROR(copy): revm-handler@43.0.2 `revm_handler::api::ExecuteCommitEvm` /// /// Copies the upstream commit implementation for the OP EVM. impl ExecuteCommitEvm @@ -109,7 +109,7 @@ where } } -/// UPSTREAM-MIRROR(copy): revm-inspector@42.0.1 `revm_inspector::mainnet_inspect::InspectEvm` +/// UPSTREAM-MIRROR(copy): revm-inspector@43.0.2 `revm_inspector::mainnet_inspect::InspectEvm` /// /// Copies the upstream inspector implementation with `OpHandler`. impl InspectEvm @@ -132,7 +132,7 @@ where } } -/// UPSTREAM-MIRROR(copy): revm-inspector@42.0.1 `revm_inspector::mainnet_inspect::InspectCommitEvm` +/// UPSTREAM-MIRROR(copy): revm-inspector@43.0.2 `revm_inspector::mainnet_inspect::InspectCommitEvm` /// /// Mirrors the upstream marker implementation for inspector commits. impl InspectCommitEvm @@ -144,7 +144,7 @@ where { } -/// UPSTREAM-MIRROR(copy): revm-handler@42.0.1 `revm_handler::system_call::SystemCallEvm` +/// UPSTREAM-MIRROR(copy): revm-handler@43.0.2 `revm_handler::system_call::SystemCallEvm` /// /// Copies upstream system-call setup with `OpHandler`. impl SystemCallEvm @@ -169,7 +169,7 @@ where } } -/// UPSTREAM-MIRROR(copy): revm-inspector@42.0.1 +/// UPSTREAM-MIRROR(copy): revm-inspector@43.0.2 /// `revm_inspector::mainnet_inspect::InspectSystemCallEvm` /// /// Copies upstream inspected system-call setup with `OpHandler`. diff --git a/rust/op-revm/src/evm.rs b/rust/op-revm/src/evm.rs index 84ddcc2ec5f..889569d369f 100644 --- a/rust/op-revm/src/evm.rs +++ b/rust/op-revm/src/evm.rs @@ -64,7 +64,7 @@ impl OpEvm { } } -/// UPSTREAM-MIRROR(delegate): revm-inspector@42.0.1 `revm_inspector::InspectorEvmTr` +/// UPSTREAM-MIRROR(delegate): revm-inspector@43.0.2 `revm_inspector::InspectorEvmTr` /// /// Forwards inspector EVM access to the inner mainnet-shaped EVM. impl InspectorEvmTr for OpEvm @@ -103,7 +103,7 @@ where } } -/// UPSTREAM-MIRROR(delegate): revm-handler@42.0.1 `revm_handler::EvmTr` +/// UPSTREAM-MIRROR(delegate): revm-handler@43.0.2 `revm_handler::EvmTr` /// /// Forwards selected EVM operations to the inner EVM. Re-check newly defaulted methods and /// upstream overrides that this wrapper would otherwise miss. diff --git a/rust/op-revm/src/handler.rs b/rust/op-revm/src/handler.rs index 739848dc6b1..1a56dda37e6 100644 --- a/rust/op-revm/src/handler.rs +++ b/rust/op-revm/src/handler.rs @@ -80,7 +80,7 @@ where type Error = ERROR; type HaltReason = OpHaltReason; - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::validate_env` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::validate_env` /// /// Deposits return before `validation::validate_env`; non-deposits add the /// `enveloped_tx` requirement and then delegate. Re-check changes to the upstream @@ -110,10 +110,10 @@ where self.mainnet.validate_env(evm) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 /// `revm_handler::Handler::validate_against_state_and_deduct_caller` /// - /// UPSTREAM-MIRROR(copy): revm-handler@42.0.1 + /// UPSTREAM-MIRROR(copy): revm-handler@43.0.2 /// `revm_handler::pre_execution::validate_against_state_and_deduct_caller` /// /// The non-deposit arm copies the upstream helper with the L1-fee deduction inserted @@ -199,7 +199,7 @@ where Ok(()) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::tx_gas` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::tx_gas` /// /// Deposits are force-included from L1 and are exempt from EIP-7825's per-transaction gas /// limit cap (), so @@ -221,7 +221,7 @@ where GasTracker::new(tx_gas_limit, remaining, reservoir) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::last_frame_result` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::last_frame_result` /// /// Structure and comments are taken verbatim from the upstream default: the frame is /// settled into the transaction-level gas exactly as upstream does, and the @@ -299,7 +299,7 @@ where Ok(()) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::reimburse_caller` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::reimburse_caller` /// /// Delegates to upstream `post_execution::reimburse_caller`, adding the operator-fee /// refund for non-deposits. Re-check that the upstream helper's signature and semantics @@ -321,7 +321,7 @@ where reimburse_caller(evm.ctx(), frame_result.gas(), additional_refund).map_err(From::from) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::refund` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::refund` /// /// Same as upstream except that pre-Regolith deposits get no refund at all. fn refund( @@ -346,7 +346,7 @@ where Ok(()) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::reward_beneficiary` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::reward_beneficiary` /// /// Returns early for deposits, otherwise calls the upstream implementation and then pays /// the three OP vaults. Re-check on any change to how upstream computes the beneficiary @@ -400,7 +400,7 @@ where Ok(()) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::execution_result` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::execution_result` /// /// Reproduces the upstream teardown (`take_error`, `post_execution::output`, `commit_tx`, /// clearing local state and the frame stack) with the post-Regolith halted-deposit @@ -433,7 +433,7 @@ where Ok(exec_result) } - /// UPSTREAM-MIRROR(override): revm-handler@42.0.1 `revm_handler::Handler::catch_error` + /// UPSTREAM-MIRROR(override): revm-handler@43.0.2 `revm_handler::Handler::catch_error` /// /// Re-derive upstream error-path cleanup, currently `journal.discard_tx()`, /// when the default or journal semantics change. diff --git a/rust/op-revm/src/precompiles.rs b/rust/op-revm/src/precompiles.rs index 23e510389a0..0e7e6b04c0a 100644 --- a/rust/op-revm/src/precompiles.rs +++ b/rust/op-revm/src/precompiles.rs @@ -48,7 +48,7 @@ impl OpPrecompiles { } } -/// UPSTREAM-MIRROR(set): revm-precompile@42.0.1 `revm_precompile::Precompiles` +/// UPSTREAM-MIRROR(set): revm-precompile@43.0.2 `revm_precompile::Precompiles` /// /// Fjord extends the upstream Cancun set with P256 verification. Re-check the /// inherited address set and gas parameters on each bump. @@ -63,7 +63,7 @@ pub fn fjord() -> &'static Precompiles { }) } -/// UPSTREAM-MIRROR(set): revm-precompile@42.0.1 `revm_precompile::Precompiles` +/// UPSTREAM-MIRROR(set): revm-precompile@43.0.2 `revm_precompile::Precompiles` /// /// Granite replaces the inherited pairing implementation. /// Returns precompiles for Granite spec. @@ -77,7 +77,7 @@ pub fn granite() -> &'static Precompiles { }) } -/// UPSTREAM-MIRROR(set): revm-precompile@42.0.1 `revm_precompile::Precompiles` +/// UPSTREAM-MIRROR(set): revm-precompile@43.0.2 `revm_precompile::Precompiles` /// /// Isthmus extends the inherited set with Prague BLS precompiles and OP pricing. /// Returns precompiles for isthmus spec. @@ -97,7 +97,7 @@ pub fn isthmus() -> &'static Precompiles { }) } -/// UPSTREAM-MIRROR(set): revm-precompile@42.0.1 `revm_precompile::Precompiles` +/// UPSTREAM-MIRROR(set): revm-precompile@43.0.2 `revm_precompile::Precompiles` /// /// Karst replaces the inherited Osaka-sensitive precompiles. /// Returns precompiles for karst spec. @@ -117,7 +117,7 @@ pub fn karst() -> &'static Precompiles { }) } -/// UPSTREAM-MIRROR(set): revm-precompile@42.0.1 `revm_precompile::Precompiles` +/// UPSTREAM-MIRROR(set): revm-precompile@43.0.2 `revm_precompile::Precompiles` /// /// Jovian replaces variable-input precompiles in the inherited set. /// Returns precompiles for jovian spec. diff --git a/rust/op-revm/src/spec.rs b/rust/op-revm/src/spec.rs index 84d3a7de3f5..5143b7be06b 100644 --- a/rust/op-revm/src/spec.rs +++ b/rust/op-revm/src/spec.rs @@ -34,7 +34,7 @@ pub enum OpSpecId { } impl OpSpecId { - /// UPSTREAM-MIRROR(set): revm-primitives@42.0.0 `revm_primitives::hardfork::SpecId` + /// UPSTREAM-MIRROR(set): revm-primitives@43.0.0 `revm_primitives::hardfork::SpecId` /// /// Maps each OP fork onto the L1 fork whose semantics it activates. A new upstream /// `SpecId` needs a decision here: which OP fork (if any) turns it on. diff --git a/rust/op-revm/src/transaction/abstraction.rs b/rust/op-revm/src/transaction/abstraction.rs index 6c129c3fe47..af60e02ad58 100644 --- a/rust/op-revm/src/transaction/abstraction.rs +++ b/rust/op-revm/src/transaction/abstraction.rs @@ -95,7 +95,7 @@ impl SystemCallTx for OpTransaction { } } -/// UPSTREAM-MIRROR(delegate): revm-context-interface@42.0.0 `revm_context_interface::Transaction` +/// UPSTREAM-MIRROR(delegate): revm-context-interface@43.0.1 `revm_context_interface::Transaction` /// /// Forwards the primitive getters to `self.base` and overrides `tx_type` and /// `effective_gas_price` for deposits. Everything not listed here inherits the upstream From 02ac6171589fae52a9086e5e44b263ea84202d3d Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Mon, 28 Sep 2026 09:47:44 -0700 Subject: [PATCH 3/8] refactor(op-reth): remove non-memoized receipt root helper --- rust/op-reth/crates/consensus/src/lib.rs | 2 +- rust/op-reth/crates/consensus/src/proof.rs | 37 ---------------------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/rust/op-reth/crates/consensus/src/lib.rs b/rust/op-reth/crates/consensus/src/lib.rs index 21e6e0ab4cc..5883d955286 100644 --- a/rust/op-reth/crates/consensus/src/lib.rs +++ b/rust/op-reth/crates/consensus/src/lib.rs @@ -34,7 +34,7 @@ use reth_primitives_traits::{ }; mod proof; -pub use proof::{calculate_receipt_root_no_memo_optimism, calculate_receipt_root_optimism}; +pub use proof::calculate_receipt_root_optimism; #[cfg(feature = "std")] mod sdm_metrics; diff --git a/rust/op-reth/crates/consensus/src/proof.rs b/rust/op-reth/crates/consensus/src/proof.rs index f5ade58cf6f..57e9d645c3d 100644 --- a/rust/op-reth/crates/consensus/src/proof.rs +++ b/rust/op-reth/crates/consensus/src/proof.rs @@ -39,43 +39,6 @@ pub fn calculate_receipt_root_optimism( ordered_trie_root_with_encoder(receipts, |r, buf| r.encode_2718(buf)) } -/// Calculates the receipt root for a header for the reference type of an OP receipt. -/// -/// NOTE: Prefer calculate receipt root optimism if you have log blooms memoized. -pub fn calculate_receipt_root_no_memo_optimism( - receipts: &[R], - chain_spec: impl OpHardforks, - timestamp: u64, -) -> B256 { - // There is a minor bug in op-geth and op-erigon where in the Regolith hardfork, - // the receipt root calculation does not include the deposit nonce in the receipt - // encoding. In the Regolith Hardfork, we must strip the deposit nonce from the - // receipts before calculating the receipt root. This was corrected in the Canyon - // hardfork. - if chain_spec.is_regolith_active_at_timestamp(timestamp) && - !chain_spec.is_canyon_active_at_timestamp(timestamp) - { - let receipts = receipts - .iter() - .map(|r| { - let mut r = (*r).clone(); - if let Some(receipt) = r.as_deposit_receipt_mut() { - receipt.deposit_nonce = None; - } - r - }) - .collect::>(); - - return ordered_trie_root_with_encoder(&receipts, |r, buf| { - r.with_bloom_ref().encode_2718(buf); - }); - } - - ordered_trie_root_with_encoder(receipts, |r, buf| { - r.with_bloom_ref().encode_2718(buf); - }) -} - #[cfg(test)] mod tests { use super::*; From 443007d2ef58dd1def38fb05e22e5e563d89ecda Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Tue, 29 Sep 2026 07:03:07 -0700 Subject: [PATCH 4/8] op-reth: encapsulate durable trie execution check --- rust/op-reth/crates/exex/src/lib.rs | 47 +++++++++++++++++------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/rust/op-reth/crates/exex/src/lib.rs b/rust/op-reth/crates/exex/src/lib.rs index 953fd7f2789..690b8fd45ae 100644 --- a/rust/op-reth/crates/exex/src/lib.rs +++ b/rust/op-reth/crates/exex/src/lib.rs @@ -9,7 +9,7 @@ #![cfg_attr(not(test), warn(unused_crate_dependencies))] use alloy_consensus::BlockHeader; -use alloy_eips::eip1898::BlockWithParent; +use alloy_eips::{NumHash, eip1898::BlockWithParent}; use futures_util::TryStreamExt; use reth_execution_types::Chain; use reth_exex::{ExExContext, ExExEvent, ExExNotification}; @@ -299,23 +299,11 @@ where return Ok(()); } - // During pipeline sync, block execution can run ahead of the Merkle stage. A state - // provider above the durable trie frontier depends on the canonical memory chain, which - // the pipeline can prune concurrently. Defer to the retrying sync loop until the required - // parent is durable instead of racing that pruning. - let execution_parent = new.blocks().iter().rev().find_map(|(&block_number, block)| { - let should_verify = self.verification_interval > 0 && - block_number.is_multiple_of(self.verification_interval); - (should_verify || new.trie_data_at(block_number).is_none()) - .then_some((block_number.saturating_sub(1), block.parent_hash())) - }); - if let Some((parent_number, parent_hash)) = execution_parent && - !self.state_trie_covers(parent_number)? - { + if let Some(parent) = self.execution_parent_above_durable_trie(&new)? { debug!( target: "optimism::exex", - parent_number, - ?parent_hash, + parent_number = parent.number, + parent_hash = ?parent.hash, target_block = new.tip().number(), "Deferring proofs-history execution until parent state is available", ); @@ -347,9 +335,27 @@ where Ok(()) } - /// Returns whether reth has durably persisted state and trie data through `block_number`. - fn state_trie_covers(&self, block_number: u64) -> eyre::Result { - let partial_state_trie = self + /// Returns the highest parent required for block execution if it is above reth's durable state + /// trie frontier. + /// + /// During pipeline sync, state above this frontier may depend on the canonical in-memory chain, + /// which the pipeline can prune concurrently. + fn execution_parent_above_durable_trie( + &self, + chain: &Chain, + ) -> eyre::Result> { + // Checking the highest execution parent is sufficient because the durable trie frontier is + // monotonic by block number. + let Some(parent) = chain.blocks().iter().rev().find_map(|(&block_number, block)| { + let should_verify = self.verification_interval > 0 && + block_number.is_multiple_of(self.verification_interval); + (should_verify || chain.trie_data_at(block_number).is_none()) + .then_some(NumHash::new(block_number.saturating_sub(1), block.parent_hash())) + }) else { + return Ok(None); + }; + + let durable_trie_tip = self .ctx .provider() .get_stage_checkpoint(StageId::Finish)? @@ -360,7 +366,8 @@ where .unwrap_or(checkpoint.block_number) }) .unwrap_or_default(); - Ok(partial_state_trie >= block_number) + + Ok((parent.number > durable_trie_tip).then_some(parent)) } fn handle_chain_reorged( From 4c6db9f72d8637951b7e9f241c3b84f2cfdff5f1 Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Tue, 29 Sep 2026 10:53:16 -0700 Subject: [PATCH 5/8] op-reth: limit historical proof RPC tasks --- rust/op-reth/crates/rpc/src/eth/proofs.rs | 36 ++++++++++++++++------- rust/op-reth/crates/rpc/src/state.rs | 9 +++++- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/rust/op-reth/crates/rpc/src/eth/proofs.rs b/rust/op-reth/crates/rpc/src/eth/proofs.rs index d0d055278fb..95b602ac9bf 100644 --- a/rust/op-reth/crates/rpc/src/eth/proofs.rs +++ b/rust/op-reth/crates/rpc/src/eth/proofs.rs @@ -12,6 +12,8 @@ use jsonrpsee_types::error::ErrorObject; use reth_optimism_trie::{OpProofsStorage, OpProofsStore}; use reth_provider::StateProofProvider; use reth_rpc_api::eth::helpers::FullEthApi; +use reth_rpc_eth_api::FromEthApiError; +use reth_rpc_eth_types::EthApiError; use std::time::Instant; /// The `eth_` proof methods served from the historical proofs storage. @@ -75,20 +77,34 @@ where let start = Instant::now(); self.metrics.get_proof_requests.increment(1); - let storage_keys = keys.iter().map(|key| key.as_b256()).collect::>(); + let eth_api = self.state_provider_factory.eth_api().clone(); + let state_provider_factory = self.state_provider_factory.clone(); - let result = async { - let proof = self - .state_provider_factory - .state_provider(block_number) + let result: RpcResult<_> = async move { + let permit = eth_api + .acquire_owned_tracing() .await - .map_err(Into::into)? - .proof(Default::default(), address, &storage_keys) - .map_err(Into::into)?; + .map_err(|_| Eth::Error::from_eth_err(EthApiError::InternalEthError))?; - Ok(proof.into_eip1186_response(keys)) + eth_api + .spawn_blocking_io_fut(move |_| async move { + // Hold the proof permit for the full lifetime of the blocking task, including + // after the requesting future is cancelled. + let _permit = permit; + let storage_keys = keys.iter().map(|key| key.as_b256()).collect::>(); + let proof = state_provider_factory + .state_provider(block_number) + .await + .map_err(Eth::Error::from_eth_err)? + .proof(Default::default(), address, &storage_keys) + .map_err(Eth::Error::from_eth_err)?; + + Ok(proof.into_eip1186_response(keys)) + }) + .await } - .await; + .await + .map_err(Into::into); match &result { Ok(_) => { diff --git a/rust/op-reth/crates/rpc/src/state.rs b/rust/op-reth/crates/rpc/src/state.rs index 90c2109a59b..ef9711e1887 100644 --- a/rust/op-reth/crates/rpc/src/state.rs +++ b/rust/op-reth/crates/rpc/src/state.rs @@ -12,12 +12,19 @@ use reth_rpc_api::eth::helpers::FullEthApi; use reth_rpc_eth_types::EthApiError; /// Creates a factory for state providers using OP Proofs external proofs storage. -#[derive(Debug, Constructor)] +#[derive(Debug, Constructor, Clone)] pub struct OpStateProviderFactory { eth_api: Eth, preimage_store: OpProofsStorage

, } +impl OpStateProviderFactory { + /// Returns the underlying Ethereum API. + pub(crate) const fn eth_api(&self) -> &Eth { + &self.eth_api + } +} + impl<'a, Eth, P> OpStateProviderFactory where Eth: FullEthApi + Send + Sync + 'static, From 3ae621cfbbfed122dbb90efd4517e46166638375 Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Tue, 29 Sep 2026 11:09:00 -0700 Subject: [PATCH 6/8] op-reth: simplify historical proof RPC flow --- rust/Cargo.lock | 1 + rust/op-reth/crates/rpc/Cargo.toml | 1 + rust/op-reth/crates/rpc/src/debug.rs | 4 +- rust/op-reth/crates/rpc/src/eth/proofs.rs | 94 +++++++++++------------ rust/op-reth/crates/rpc/src/metrics.rs | 30 +++++++- rust/op-reth/crates/rpc/src/state.rs | 16 +--- 6 files changed, 79 insertions(+), 67 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index c1d174f056d..0ede988d1d2 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -13746,6 +13746,7 @@ dependencies = [ "reth-basic-payload-builder", "reth-chain-state", "reth-chainspec", + "reth-errors", "reth-evm", "reth-metrics", "reth-node-api", diff --git a/rust/op-reth/crates/rpc/Cargo.toml b/rust/op-reth/crates/rpc/Cargo.toml index 1a59c2078cf..a321939abf9 100644 --- a/rust/op-reth/crates/rpc/Cargo.toml +++ b/rust/op-reth/crates/rpc/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [dependencies] # reth reth-basic-payload-builder.workspace = true +reth-errors.workspace = true reth-evm.workspace = true reth-primitives-traits.workspace = true reth-storage-api.workspace = true diff --git a/rust/op-reth/crates/rpc/src/debug.rs b/rust/op-reth/crates/rpc/src/debug.rs index 71b5ffa426e..6e3ff58c827 100644 --- a/rust/op-reth/crates/rpc/src/debug.rs +++ b/rust/op-reth/crates/rpc/src/debug.rs @@ -231,7 +231,7 @@ where let state_provider = this .state_provider_factory - .state_provider(Some(BlockId::Hash(parent_hash.into()))) + .state_provider(BlockId::Hash(parent_hash.into())) .await .map_err(PayloadBuilderError::other)?; @@ -277,7 +277,7 @@ where let state_provider = this .state_provider_factory - .state_provider(Some(BlockId::Hash(block.parent_hash().into()))) + .state_provider(BlockId::Hash(block.parent_hash().into())) .await .map_err(EthApiError::from)?; let db = StateProviderDatabase::new(&state_provider); diff --git a/rust/op-reth/crates/rpc/src/eth/proofs.rs b/rust/op-reth/crates/rpc/src/eth/proofs.rs index 95b602ac9bf..030dc1613ba 100644 --- a/rust/op-reth/crates/rpc/src/eth/proofs.rs +++ b/rust/op-reth/crates/rpc/src/eth/proofs.rs @@ -9,12 +9,12 @@ use async_trait::async_trait; use jsonrpsee::proc_macros::rpc; use jsonrpsee_core::RpcResult; use jsonrpsee_types::error::ErrorObject; +use reth_errors::RethError; use reth_optimism_trie::{OpProofsStorage, OpProofsStore}; use reth_provider::StateProofProvider; use reth_rpc_api::eth::helpers::FullEthApi; use reth_rpc_eth_api::FromEthApiError; use reth_rpc_eth_types::EthApiError; -use std::time::Instant; /// The `eth_` proof methods served from the historical proofs storage. /// @@ -41,7 +41,8 @@ pub trait EthApiOverride { #[derive(Debug)] /// Overrides applied to the `eth_` namespace of the RPC API for historical proofs ExEx. pub struct EthApiExt { - state_provider_factory: OpStateProviderFactory, + eth_api: Eth, + preimage_store: OpProofsStorage

, metrics: EthApiExtMetrics, } @@ -53,11 +54,45 @@ where { /// Creates a new instance of the `EthApiExt`. pub fn new(eth_api: Eth, preimage_store: OpProofsStorage

) -> Self { - let metrics = EthApiExtMetrics::default(); - Self { - state_provider_factory: OpStateProviderFactory::new(eth_api, preimage_store), - metrics, - } + Self { eth_api, preimage_store, metrics: EthApiExtMetrics::default() } + } + + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 + /// `reth_rpc_eth_api::helpers::state::EthState::get_proof` + /// + /// Uses the OP proofs-history state provider while preserving upstream permit and blocking-task + /// behavior. + async fn get_proof_inner( + &self, + address: Address, + keys: Vec, + block_id: BlockId, + ) -> Result { + let permit = self + .eth_api + .acquire_owned_tracing() + .await + .map_err(RethError::other) + .map_err(EthApiError::Internal)?; + let preimage_store = self.preimage_store.clone(); + + self.eth_api + .spawn_blocking_io_fut(move |eth_api| async move { + // Hold the proof permit for the full lifetime of the blocking task, including + // after the requesting future is cancelled. + let _permit = permit; + let state_provider_factory = OpStateProviderFactory::new(eth_api, preimage_store); + let state = state_provider_factory + .state_provider(block_id) + .await + .map_err(Eth::Error::from_eth_err)?; + let storage_keys = keys.iter().map(|key| key.as_b256()).collect::>(); + let proof = state + .proof(Default::default(), address, &storage_keys) + .map_err(Eth::Error::from_eth_err)?; + Ok(proof.into_eip1186_response(keys)) + }) + .await } } @@ -74,46 +109,9 @@ where keys: Vec, block_number: Option, ) -> RpcResult { - let start = Instant::now(); - self.metrics.get_proof_requests.increment(1); - - let eth_api = self.state_provider_factory.eth_api().clone(); - let state_provider_factory = self.state_provider_factory.clone(); - - let result: RpcResult<_> = async move { - let permit = eth_api - .acquire_owned_tracing() - .await - .map_err(|_| Eth::Error::from_eth_err(EthApiError::InternalEthError))?; - - eth_api - .spawn_blocking_io_fut(move |_| async move { - // Hold the proof permit for the full lifetime of the blocking task, including - // after the requesting future is cancelled. - let _permit = permit; - let storage_keys = keys.iter().map(|key| key.as_b256()).collect::>(); - let proof = state_provider_factory - .state_provider(block_number) - .await - .map_err(Eth::Error::from_eth_err)? - .proof(Default::default(), address, &storage_keys) - .map_err(Eth::Error::from_eth_err)?; - - Ok(proof.into_eip1186_response(keys)) - }) - .await - } - .await - .map_err(Into::into); - - match &result { - Ok(_) => { - self.metrics.get_proof_latency.record(start.elapsed().as_secs_f64()); - self.metrics.get_proof_successful_responses.increment(1); - } - Err(_) => self.metrics.get_proof_failures.increment(1), - } - - result + self.metrics + .record_get_proof(self.get_proof_inner(address, keys, block_number.unwrap_or_default())) + .await + .map_err(Into::into) } } diff --git a/rust/op-reth/crates/rpc/src/metrics.rs b/rust/op-reth/crates/rpc/src/metrics.rs index 17ac94f6aa6..e478c87bceb 100644 --- a/rust/op-reth/crates/rpc/src/metrics.rs +++ b/rust/op-reth/crates/rpc/src/metrics.rs @@ -28,16 +28,38 @@ impl SequencerMetrics { #[metrics(scope = "optimism_rpc.eth_api_ext")] pub struct EthApiExtMetrics { /// How long it takes to handle a `eth_getProof` request successfully - pub(crate) get_proof_latency: Histogram, + get_proof_latency: Histogram, /// Total number of `eth_getProof` requests - pub(crate) get_proof_requests: Counter, + get_proof_requests: Counter, /// Total number of successful `eth_getProof` responses - pub(crate) get_proof_successful_responses: Counter, + get_proof_successful_responses: Counter, /// Total number of failures handling `eth_getProof` requests - pub(crate) get_proof_failures: Counter, + get_proof_failures: Counter, +} + +impl EthApiExtMetrics { + /// Records an `eth_getProof` request while preserving the existing metric semantics. + pub(crate) async fn record_get_proof(&self, f: F) -> Result + where + F: Future>, + { + let start = Instant::now(); + self.get_proof_requests.increment(1); + let result = f.await; + + match &result { + Ok(_) => { + self.get_proof_latency.record(start.elapsed().as_secs_f64()); + self.get_proof_successful_responses.increment(1); + } + Err(_) => self.get_proof_failures.increment(1), + } + + result + } } /// Types of debug apis diff --git a/rust/op-reth/crates/rpc/src/state.rs b/rust/op-reth/crates/rpc/src/state.rs index ef9711e1887..ef8b255a201 100644 --- a/rust/op-reth/crates/rpc/src/state.rs +++ b/rust/op-reth/crates/rpc/src/state.rs @@ -2,7 +2,6 @@ use alloy_eips::BlockId; use derive_more::Constructor; -use jsonrpsee_types::error::ErrorObject; use reth_optimism_trie::{ OpProofsStorage, OpProofsStorageError, OpProofsStore, api::OpProofsProviderRO, provider::OpProofsStateProviderRef, @@ -12,31 +11,22 @@ use reth_rpc_api::eth::helpers::FullEthApi; use reth_rpc_eth_types::EthApiError; /// Creates a factory for state providers using OP Proofs external proofs storage. -#[derive(Debug, Constructor, Clone)] +#[derive(Debug, Constructor)] pub struct OpStateProviderFactory { eth_api: Eth, preimage_store: OpProofsStorage

, } -impl OpStateProviderFactory { - /// Returns the underlying Ethereum API. - pub(crate) const fn eth_api(&self) -> &Eth { - &self.eth_api - } -} - impl<'a, Eth, P> OpStateProviderFactory where - Eth: FullEthApi + Send + Sync + 'static, - ErrorObject<'static>: From, + Eth: FullEthApi + 'static, P: OpProofsStore + Clone + 'a, { /// Creates a state provider for the given block id. pub async fn state_provider( &'a self, - block_id: Option, + block_id: BlockId, ) -> ProviderResult> { - let block_id = block_id.unwrap_or_default(); // Check whether the distance to the block exceeds the maximum configured window. let block_number = self .eth_api From 29ee0573f3039d73e3d44fd61b15242eb4ab129f Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Tue, 29 Sep 2026 13:04:27 -0700 Subject: [PATCH 7/8] op-reth: use OP block time for pending RPC environments --- rust/Cargo.lock | 1 + rust/op-reth/crates/evm/Cargo.toml | 3 +- rust/op-reth/crates/evm/src/config.rs | 111 ++++++++++++++++++++++--- rust/op-reth/crates/evm/src/lib.rs | 2 + rust/op-reth/crates/rpc/Cargo.toml | 2 +- rust/op-reth/crates/rpc/src/eth/mod.rs | 47 ++++++++--- 6 files changed, 144 insertions(+), 22 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 0ede988d1d2..db9eb014796 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -13445,6 +13445,7 @@ dependencies = [ "reth-primitives-traits", "reth-revm", "reth-rpc-eth-api", + "reth-rpc-eth-types", "reth-storage-errors", "revm", "rstest", diff --git a/rust/op-reth/crates/evm/Cargo.toml b/rust/op-reth/crates/evm/Cargo.toml index 415418d7c3e..aae97703764 100644 --- a/rust/op-reth/crates/evm/Cargo.toml +++ b/rust/op-reth/crates/evm/Cargo.toml @@ -20,6 +20,7 @@ reth-execution-types.workspace = true reth-storage-errors.workspace = true reth-rpc-eth-api = { workspace = true, optional = true } +reth-rpc-eth-types = { workspace = true, optional = true } # ethereum alloy-eips.workspace = true @@ -97,4 +98,4 @@ portable = [ "op-revm/portable", "revm/portable", ] -rpc = ["reth-rpc-eth-api", "reth-optimism-primitives/serde", "reth-optimism-primitives/reth-codec", "alloy-evm/rpc", "alloy-op-evm/rpc", "op-alloy-rpc-types", "alloy-rpc-types-eth"] +rpc = ["reth-rpc-eth-api", "reth-rpc-eth-types", "reth-optimism-primitives/serde", "reth-optimism-primitives/reth-codec", "alloy-evm/rpc", "alloy-op-evm/rpc", "op-alloy-rpc-types", "alloy-rpc-types-eth"] diff --git a/rust/op-reth/crates/evm/src/config.rs b/rust/op-reth/crates/evm/src/config.rs index bc1ff0e4c90..cde4060ece7 100644 --- a/rust/op-reth/crates/evm/src/config.rs +++ b/rust/op-reth/crates/evm/src/config.rs @@ -2,8 +2,18 @@ pub use alloy_op_evm::{ spec as revm_spec, spec_by_timestamp_after_bedrock as revm_spec_by_timestamp_after_bedrock, }; use op_alloy_rpc_types_engine::OpFlashblockPayloadBase; +#[cfg(feature = "rpc")] +use reth_evm::ConfigureEvm; +#[cfg(feature = "rpc")] +use reth_primitives_traits::HeaderTy; +#[cfg(feature = "rpc")] +use reth_rpc_eth_api::helpers::pending_block::PendingEnvBuilder; use revm::primitives::{Address, B256, Bytes}; +/// Default OP Stack block time in seconds. +#[cfg(feature = "rpc")] +pub const DEFAULT_OP_BLOCK_TIME: u64 = 2; + /// Context relevant for execution of a next block w.r.t OP. #[derive(Debug, Clone, PartialEq, Eq)] pub struct OpNextBlockEnvAttributes { @@ -22,20 +32,15 @@ pub struct OpNextBlockEnvAttributes { } #[cfg(feature = "rpc")] -impl reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv - for OpNextBlockEnvAttributes -{ - /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 - /// `reth_rpc_eth_api::helpers::pending_block::NextBlockEnvAttributes::build_pending_env` - /// - /// Copies upstream pending-environment defaults for the OP attribute type, except that - /// `parent_beacon_block_root` carries the parent's actual root where upstream zeroes it. - fn build_pending_env( +impl OpNextBlockEnvAttributes { + /// Builds pending-block attributes using the configured block time. + fn build_pending_env_with_block_time( parent: &crate::SealedHeader, block_overrides: Option<&alloy_rpc_types_eth::BlockOverrides>, + block_time: u64, ) -> Self { let mut attributes = Self { - timestamp: parent.timestamp().saturating_add(12), + timestamp: parent.timestamp().saturating_add(block_time), suggested_fee_recipient: parent.beneficiary(), prev_randao: B256::random(), gas_limit: parent.gas_limit(), @@ -57,6 +62,65 @@ impl reth_rpc_eth_api::helpers::pending_block:: } } +/// Builds OP pending-block attributes using the configured block time. +#[cfg(feature = "rpc")] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct OpPendingEnvBuilder { + block_time: u64, +} + +#[cfg(feature = "rpc")] +impl OpPendingEnvBuilder { + /// Creates a pending environment builder for the given block time in seconds. + pub const fn new(block_time: u64) -> Self { + Self { block_time } + } +} + +#[cfg(feature = "rpc")] +impl Default for OpPendingEnvBuilder { + fn default() -> Self { + Self::new(DEFAULT_OP_BLOCK_TIME) + } +} + +#[cfg(feature = "rpc")] +impl PendingEnvBuilder for OpPendingEnvBuilder +where + Evm: ConfigureEvm, + HeaderTy: alloy_consensus::BlockHeader, +{ + fn pending_env_attributes( + &self, + parent: &crate::SealedHeader>, + block_overrides: Option<&alloy_rpc_types_eth::BlockOverrides>, + ) -> Result { + Ok(OpNextBlockEnvAttributes::build_pending_env_with_block_time( + parent, + block_overrides, + self.block_time, + )) + } +} + +#[cfg(feature = "rpc")] +impl reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv + for OpNextBlockEnvAttributes +{ + /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 + /// `reth_rpc_eth_api::helpers::pending_block::NextBlockEnvAttributes::build_pending_env` + /// + /// Copies upstream pending-environment defaults for the OP attribute type, except that it uses + /// the default OP block time and `parent_beacon_block_root` carries the parent's actual root + /// where upstream zeroes it. + fn build_pending_env( + parent: &crate::SealedHeader, + block_overrides: Option<&alloy_rpc_types_eth::BlockOverrides>, + ) -> Self { + Self::build_pending_env_with_block_time(parent, block_overrides, DEFAULT_OP_BLOCK_TIME) + } +} + impl From for OpNextBlockEnvAttributes { fn from(base: OpFlashblockPayloadBase) -> Self { Self { @@ -69,3 +133,30 @@ impl From for OpNextBlockEnvAttributes { } } } + +#[cfg(all(test, feature = "rpc"))] +mod tests { + use super::*; + use alloy_consensus::Header; + use reth_primitives_traits::SealedHeader; + use reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv; + + #[test] + fn pending_env_uses_default_op_block_time() { + let parent = SealedHeader::seal_slow(Header { timestamp: 100, ..Default::default() }); + + let attributes = OpNextBlockEnvAttributes::build_pending_env(&parent, None); + + assert_eq!(attributes.timestamp, 102); + } + + #[test] + fn pending_env_uses_configured_block_time() { + let parent = SealedHeader::seal_slow(Header { timestamp: 100, ..Default::default() }); + + let attributes = + OpNextBlockEnvAttributes::build_pending_env_with_block_time(&parent, None, 1); + + assert_eq!(attributes.timestamp, 101); + } +} diff --git a/rust/op-reth/crates/evm/src/lib.rs b/rust/op-reth/crates/evm/src/lib.rs index 296798bd8ea..5d8070f0e7c 100644 --- a/rust/op-reth/crates/evm/src/lib.rs +++ b/rust/op-reth/crates/evm/src/lib.rs @@ -50,6 +50,8 @@ use { }; mod config; +#[cfg(feature = "rpc")] +pub use config::{DEFAULT_OP_BLOCK_TIME, OpPendingEnvBuilder}; pub use config::{OpNextBlockEnvAttributes, revm_spec, revm_spec_by_timestamp_after_bedrock}; mod execute; pub use execute::*; diff --git a/rust/op-reth/crates/rpc/Cargo.toml b/rust/op-reth/crates/rpc/Cargo.toml index a321939abf9..10dbecb483a 100644 --- a/rust/op-reth/crates/rpc/Cargo.toml +++ b/rust/op-reth/crates/rpc/Cargo.toml @@ -35,7 +35,7 @@ reth-payload-util.workspace = true reth-provider.workspace = true # op-reth -reth-optimism-evm.workspace = true +reth-optimism-evm = { workspace = true, features = ["rpc"] } reth-optimism-flashblocks.workspace = true reth-optimism-payload-builder.workspace = true reth-optimism-post-exec-replay.workspace = true diff --git a/rust/op-reth/crates/rpc/src/eth/mod.rs b/rust/op-reth/crates/rpc/src/eth/mod.rs index 762a8e234be..e3e9a03f741 100644 --- a/rust/op-reth/crates/rpc/src/eth/mod.rs +++ b/rust/op-reth/crates/rpc/src/eth/mod.rs @@ -20,13 +20,13 @@ use eyre::WrapErr; use futures::StreamExt; use op_alloy_consensus::OpReceipt; use op_alloy_network::Optimism; -use op_alloy_rpc_types_engine::OpFlashblockPayloadBase; pub use receipt::{OpReceiptBuilder, OpReceiptFieldsBuilder}; use reqwest::Url; -use reth_chainspec::{EthereumHardforks, Hardforks}; +use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks, Hardforks}; use reth_evm::ConfigureEvm; -use reth_node_api::{FullNodeComponents, FullNodeTypes, HeaderTy, NodeTypes}; +use reth_node_api::{FullNodeComponents, FullNodeTypes, NodeTypes}; use reth_node_builder::rpc::{EthApiBuilder, EthApiCtx}; +use reth_optimism_evm::{DEFAULT_OP_BLOCK_TIME, OpNextBlockEnvAttributes, OpPendingEnvBuilder}; use reth_optimism_flashblocks::{ FlashBlockBuildInfo, FlashBlockCompleteSequence, FlashBlockCompleteSequenceRx, FlashBlockConsensusClient, FlashBlockRx, FlashBlockService, FlashblockCachedReceipt, @@ -39,7 +39,7 @@ use reth_rpc_eth_api::{ RpcNodeCoreExt, RpcTypes, helpers::{ EthApiSpec, EthFees, EthState, EthSubscriptions, LoadFee, LoadPendingBlock, LoadState, - SpawnBlocking, Trace, bal::GetBlockAccessList, pending_block::BuildPendingEnv, + SpawnBlocking, Trace, bal::GetBlockAccessList, }, }; use reth_rpc_eth_types::{ @@ -64,6 +64,13 @@ use tracing::{info, warn}; /// Maximum duration to wait for a fresh flashblock when one is being built. const MAX_FLASHBLOCK_WAIT_DURATION: Duration = Duration::from_millis(50); +fn pending_block_timestamp_increment(block_time_hint: Option) -> u64 { + block_time_hint + .map(|duration| duration.as_secs().saturating_add(u64::from(duration.subsec_nanos() > 0))) + .filter(|&seconds| seconds > 0) + .unwrap_or(DEFAULT_OP_BLOCK_TIME) +} + /// Adapter for [`EthApiInner`], which holds all the data required to serve core `eth_` API. pub type EthApiNodeBackend = EthApiInner; @@ -587,11 +594,7 @@ impl OpEthApiBuilder { impl EthApiBuilder for OpEthApiBuilder where N: FullNodeComponents< - Evm: ConfigureEvm< - NextBlockEnvCtx: BuildPendingEnv> - + From - + Unpin, - >, + Evm: ConfigureEvm, Types: NodeTypes< ChainSpec: Hardforks + EthereumHardforks, Payload: reth_node_api::PayloadTypes< @@ -624,6 +627,9 @@ where RpcConverter::new(OpReceiptConverter::new(ctx.components.provider().clone())) .with_mapper(OpTxInfoMapper::new(ctx.components.provider().clone())) .with_tx_env_converter(reth_optimism_evm::tx::OpTxEnvConverter); + let pending_block_time = pending_block_timestamp_increment( + ctx.components.provider().chain_spec().chain().average_blocktime_hint(), + ); let sequencer_client = if let Some(url) = sequencer_url { Some( @@ -673,7 +679,11 @@ where None }; - let eth_api = ctx.eth_api_builder().with_rpc_converter(rpc_converter).build_inner(); + let eth_api = ctx + .eth_api_builder() + .with_rpc_converter(rpc_converter) + .with_pending_env_builder(OpPendingEnvBuilder::new(pending_block_time)) + .build_inner(); Ok(OpEthApi::new( eth_api, @@ -684,3 +694,20 @@ where )) } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn pending_block_time_uses_chain_hint() { + assert_eq!(pending_block_timestamp_increment(Some(Duration::from_secs(2))), 2); + assert_eq!(pending_block_timestamp_increment(Some(Duration::from_millis(500))), 1); + } + + #[test] + fn pending_block_time_falls_back_to_op_default() { + assert_eq!(pending_block_timestamp_increment(None), DEFAULT_OP_BLOCK_TIME); + assert_eq!(pending_block_timestamp_increment(Some(Duration::ZERO)), DEFAULT_OP_BLOCK_TIME); + } +} From febe2cba1ca596c9da9177d395dabcfeeb87c715 Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Tue, 29 Sep 2026 12:14:22 -0700 Subject: [PATCH 8/8] op-reth!: use standard RPC metrics for historical proofs Remove the dedicated eth_getProof metrics in favor of Reth RPC server metrics. BREAKING CHANGE: Historical-proofs operators must migrate dashboards from reth_optimism_rpc_eth_api_ext_get_proof_* to reth_rpc_server_calls_* filtered by method="eth_getProof". Per-entry batch outcomes and latency, authenticated RPC calls, and standalone notifications are no longer measured. --- .../op-reth-historical-proof-config.mdx | 34 +++++++++++++--- .../tutorials/reth-historical-proofs.mdx | 2 +- rust/op-reth/crates/rpc/src/eth/proofs.rs | 10 ++--- rust/op-reth/crates/rpc/src/lib.rs | 2 +- rust/op-reth/crates/rpc/src/metrics.rs | 39 ------------------- 5 files changed, 35 insertions(+), 52 deletions(-) diff --git a/docs/public-docs/node-operators/reference/op-reth-historical-proof-config.mdx b/docs/public-docs/node-operators/reference/op-reth-historical-proof-config.mdx index 3281e2bdf74..2852a856d8d 100644 --- a/docs/public-docs/node-operators/reference/op-reth-historical-proof-config.mdx +++ b/docs/public-docs/node-operators/reference/op-reth-historical-proof-config.mdx @@ -181,14 +181,38 @@ When the `metrics` feature is enabled, the proofs-history system exposes Prometh | `hashed_accounts_written` | Gauge | Hashed account entries deleted in the last prune | | `hashed_storages_written` | Gauge | Hashed storage entries deleted in the last prune | -### RPC (`optimism_rpc.eth_api_ext.*`) +### RPC (`reth_rpc_server_calls_*`) + +Reth's built-in RPC server metrics cover the historical `eth_getProof` override. Filter these metrics by the `method="eth_getProof"` label: | Metric | Type | Description | | --- | --- | --- | -| `get_proof_latency` | Histogram | Latency of successful `eth_getProof` requests | -| `get_proof_requests` | Counter | Total `eth_getProof` requests received | -| `get_proof_successful_responses` | Counter | Total successful `eth_getProof` responses | -| `get_proof_failures` | Counter | Total failed `eth_getProof` requests | +| `reth_rpc_server_calls_started_total` | Counter | Total non-batched requests started | +| `reth_rpc_server_calls_successful_total` | Counter | Total successful non-batched responses | +| `reth_rpc_server_calls_failed_total` | Counter | Total failed non-batched responses | +| `reth_rpc_server_calls_batched_total` | Counter | Total requests received as batch entries | +| `reth_rpc_server_calls_time_seconds` | Histogram | Response time for completed non-batched requests | + +These per-method metrics cover the configured HTTP, WebSocket, and IPC transports unless `--rpc.disable-metrics` is set. They are generic RPC metrics, so nodes without proofs-history enabled report the same series for the standard `eth_getProof` implementation. + +#### Migrating from `optimism_rpc.eth_api_ext` + +The dedicated historical-proof RPC metrics have been removed. Update dashboards and alerts as follows: + +| Removed Prometheus metric | Replacement | +| --- | --- | +| `reth_optimism_rpc_eth_api_ext_get_proof_requests` | `reth_rpc_server_calls_started_total`; add `reth_rpc_server_calls_batched_total` to include regular-server batch volume | +| `reth_optimism_rpc_eth_api_ext_get_proof_successful_responses` | `reth_rpc_server_calls_successful_total` | +| `reth_optimism_rpc_eth_api_ext_get_proof_failures` | `reth_rpc_server_calls_failed_total` | +| `reth_optimism_rpc_eth_api_ext_get_proof_latency` | `reth_rpc_server_calls_time_seconds` | + +The replacement metrics have different accounting boundaries: + +- Batch entries only contribute to `batched_total`; per-entry outcomes and latency are unavailable. +- Calls to the authenticated RPC server and standalone JSON-RPC notifications are not included. Notifications inside batches contribute only to `batched_total`. +- `time_seconds` includes successful and failed non-batched calls, while the removed latency histogram included only successful typed handler calls. +- For non-batched calls, invalid parameters are counted as failures by the RPC middleware before the typed handler runs; batch entries expose volume only. The removed metrics did not count invalid parameters. +- Setting `--rpc.disable-metrics` disables the replacement metrics. It did not disable the removed handler-level metrics. ### Storage operations (`optimism_trie.storage.operation.*`) diff --git a/docs/public-docs/node-operators/tutorials/reth-historical-proofs.mdx b/docs/public-docs/node-operators/tutorials/reth-historical-proofs.mdx index d96a185c712..e485dfea7a3 100644 --- a/docs/public-docs/node-operators/tutorials/reth-historical-proofs.mdx +++ b/docs/public-docs/node-operators/tutorials/reth-historical-proofs.mdx @@ -118,7 +118,7 @@ INFO reth::cli eth_replaced=true debug_replaced=true: Proofs-history RPC overrid ## Monitoring -When op-reth is run with the `--metrics=:` flag, the proofs-history ExEx exposes Prometheus metrics covering proofs-DB sync state (`optimism_trie_block_*`), the background pruner (`optimism_trie_pruner_*`), and `eth_getProof` RPC traffic (`optimism_rpc_eth_api_ext_*`). See the [historical proof configuration reference](/node-operators/reference/op-reth-historical-proof-config#metrics) for the full list. +When op-reth is run with the `--metrics=:` flag, the proofs-history ExEx exposes Prometheus metrics covering proofs-DB sync state (`optimism_trie_block_*`) and the background pruner (`optimism_trie_pruner_*`). The built-in Reth RPC server metrics cover `eth_getProof` traffic under `reth_rpc_server_calls_*` with the `method="eth_getProof"` label. See the [historical proof configuration reference](/node-operators/reference/op-reth-historical-proof-config#metrics) for the full list and migration guidance. ## Operational Commands diff --git a/rust/op-reth/crates/rpc/src/eth/proofs.rs b/rust/op-reth/crates/rpc/src/eth/proofs.rs index 030dc1613ba..54498a6e700 100644 --- a/rust/op-reth/crates/rpc/src/eth/proofs.rs +++ b/rust/op-reth/crates/rpc/src/eth/proofs.rs @@ -1,6 +1,6 @@ //! Historical proofs RPC server implementation. -use crate::{metrics::EthApiExtMetrics, state::OpStateProviderFactory}; +use crate::state::OpStateProviderFactory; use alloy_eips::BlockId; use alloy_primitives::Address; use alloy_rpc_types_eth::EIP1186AccountProofResponse; @@ -43,7 +43,6 @@ pub trait EthApiOverride { pub struct EthApiExt { eth_api: Eth, preimage_store: OpProofsStorage

, - metrics: EthApiExtMetrics, } impl EthApiExt @@ -53,8 +52,8 @@ where P: OpProofsStore + Clone + 'static, { /// Creates a new instance of the `EthApiExt`. - pub fn new(eth_api: Eth, preimage_store: OpProofsStorage

) -> Self { - Self { eth_api, preimage_store, metrics: EthApiExtMetrics::default() } + pub const fn new(eth_api: Eth, preimage_store: OpProofsStorage

) -> Self { + Self { eth_api, preimage_store } } /// UPSTREAM-MIRROR(copy): reth@rev:4553cf1 @@ -109,8 +108,7 @@ where keys: Vec, block_number: Option, ) -> RpcResult { - self.metrics - .record_get_proof(self.get_proof_inner(address, keys, block_number.unwrap_or_default())) + self.get_proof_inner(address, keys, block_number.unwrap_or_default()) .await .map_err(Into::into) } diff --git a/rust/op-reth/crates/rpc/src/lib.rs b/rust/op-reth/crates/rpc/src/lib.rs index e29c19861f5..fcac63e5ea2 100644 --- a/rust/op-reth/crates/rpc/src/lib.rs +++ b/rust/op-reth/crates/rpc/src/lib.rs @@ -25,5 +25,5 @@ pub use engine::OpEngineApiClient; pub use engine::{OP_ENGINE_CAPABILITIES, OpEngineApi, OpEngineApiServer}; pub use error::{OpEthApiError, OpInvalidTransactionError, SequencerClientError}; pub use eth::{OpEthApi, OpEthApiBuilder, OpReceiptBuilder}; -pub use metrics::{EthApiExtMetrics, SequencerMetrics}; +pub use metrics::SequencerMetrics; pub use sequencer::SequencerClient; diff --git a/rust/op-reth/crates/rpc/src/metrics.rs b/rust/op-reth/crates/rpc/src/metrics.rs index e478c87bceb..23f171feafd 100644 --- a/rust/op-reth/crates/rpc/src/metrics.rs +++ b/rust/op-reth/crates/rpc/src/metrics.rs @@ -23,45 +23,6 @@ impl SequencerMetrics { } } -/// Optimism ETH API extension metrics -#[derive(Metrics, Clone)] -#[metrics(scope = "optimism_rpc.eth_api_ext")] -pub struct EthApiExtMetrics { - /// How long it takes to handle a `eth_getProof` request successfully - get_proof_latency: Histogram, - - /// Total number of `eth_getProof` requests - get_proof_requests: Counter, - - /// Total number of successful `eth_getProof` responses - get_proof_successful_responses: Counter, - - /// Total number of failures handling `eth_getProof` requests - get_proof_failures: Counter, -} - -impl EthApiExtMetrics { - /// Records an `eth_getProof` request while preserving the existing metric semantics. - pub(crate) async fn record_get_proof(&self, f: F) -> Result - where - F: Future>, - { - let start = Instant::now(); - self.get_proof_requests.increment(1); - let result = f.await; - - match &result { - Ok(_) => { - self.get_proof_latency.record(start.elapsed().as_secs_f64()); - self.get_proof_successful_responses.increment(1); - } - Err(_) => self.get_proof_failures.increment(1), - } - - result - } -} - /// Types of debug apis #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, EnumCount, EnumIter)] pub enum DebugApis {