diff --git a/Cargo.lock b/Cargo.lock index 0153d42fae..0cf63c85e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,9 +287,9 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.26.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249337d8316a9ab983784597adfad66b78047ec9522d8b510185bc968c272618" +checksum = "a96827207397445a919a8adc49289b53cc74e48e460411740bba31cec2fc307d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -404,9 +404,9 @@ dependencies = [ [[package]] name = "alloy-op-evm" -version = "0.26.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9fc7cbe100f7b094428b488225c9aedb835f28a31b74f474ee1c41878e58c6" +checksum = "54dc5c46a92fc7267055a174d30efb34e2599a0047102a4d38a025ae521435ba" dependencies = [ "alloy-consensus", "alloy-eips", diff --git a/Cargo.toml b/Cargo.toml index 068a8f9ef6..fa6ae2f84f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -488,7 +488,7 @@ alloy-chains = { version = "0.2.5", default-features = false } alloy-dyn-abi = "1.4.3" alloy-eip2124 = { version = "0.2.0", default-features = false } alloy-eip7928 = { version = "0.3.0", default-features = false } -alloy-evm = { version = "0.26.0", default-features = false } +alloy-evm = { version = "0.26.3", default-features = false } alloy-primitives = { version = "1.5.0", default-features = false, features = ["map-foldhash"] } alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] } alloy-sol-macro = "1.5.0" @@ -526,7 +526,7 @@ alloy-transport-ipc = { version = "1.4.3", default-features = false } alloy-transport-ws = { version = "1.4.3", default-features = false } # op -alloy-op-evm = { version = "0.26.0", default-features = false } +alloy-op-evm = { version = "0.26.3", default-features = false } alloy-op-hardforks = "0.4.4" op-alloy-rpc-types = { version = "0.23.1", default-features = false } op-alloy-rpc-types-engine = { version = "0.23.1", default-features = false } diff --git a/crates/engine/tree/src/tree/metrics.rs b/crates/engine/tree/src/tree/metrics.rs index ac4bb50044..5acf81104e 100644 --- a/crates/engine/tree/src/tree/metrics.rs +++ b/crates/engine/tree/src/tree/metrics.rs @@ -408,12 +408,13 @@ mod tests { /// A simple mock executor for testing that doesn't require complex EVM setup struct MockExecutor { state: EvmState, + receipts: Vec, hook: Option>, } impl MockExecutor { fn new(state: EvmState) -> Self { - Self { state, hook: None } + Self { state, receipts: vec![], hook: None } } } @@ -495,12 +496,16 @@ mod tests { self.hook = hook; } + fn evm_mut(&mut self) -> &mut Self::Evm { + panic!("Mock executor evm_mut() not implemented") + } + fn evm(&self) -> &Self::Evm { panic!("Mock executor evm() not implemented") } - fn evm_mut(&mut self) -> &mut Self::Evm { - panic!("Mock executor evm_mut() not implemented") + fn receipts(&self) -> &[Self::Receipt] { + &self.receipts } } diff --git a/crates/ethereum/evm/src/test_utils.rs b/crates/ethereum/evm/src/test_utils.rs index fe791b9f5f..cf32d9e6bd 100644 --- a/crates/ethereum/evm/src/test_utils.rs +++ b/crates/ethereum/evm/src/test_utils.rs @@ -65,7 +65,12 @@ impl BlockExecutorFactory for MockEvmConfig { DB: Database + 'a, I: Inspector<::Context<&'a mut State>> + 'a, { - MockExecutor { result: self.exec_results.lock().pop().unwrap(), evm, hook: None } + MockExecutor { + result: self.exec_results.lock().pop().unwrap(), + evm, + hook: None, + receipts: Vec::new(), + } } } @@ -76,6 +81,7 @@ pub struct MockExecutor<'a, DB: Database, I> { evm: EthEvm<&'a mut State, I, PrecompilesMap>, #[debug(skip)] hook: Option>, + receipts: Vec, } impl<'a, DB: Database, I: Inspector>>> BlockExecutor @@ -89,6 +95,10 @@ impl<'a, DB: Database, I: Inspector>>> BlockExec Ok(()) } + fn receipts(&self) -> &[Self::Receipt] { + &self.receipts + } + fn execute_transaction_without_commit( &mut self, _tx: impl ExecutableTx, diff --git a/examples/custom-beacon-withdrawals/src/main.rs b/examples/custom-beacon-withdrawals/src/main.rs index 1d93226dd6..d1e59384c5 100644 --- a/examples/custom-beacon-withdrawals/src/main.rs +++ b/examples/custom-beacon-withdrawals/src/main.rs @@ -201,6 +201,10 @@ where self.inner.apply_pre_execution_changes() } + fn receipts(&self) -> &[Self::Receipt] { + self.inner.receipts() + } + fn execute_transaction_without_commit( &mut self, tx: impl ExecutableTx, diff --git a/examples/custom-node/src/evm/executor.rs b/examples/custom-node/src/evm/executor.rs index 5288e1d67a..575b4949c0 100644 --- a/examples/custom-node/src/evm/executor.rs +++ b/examples/custom-node/src/evm/executor.rs @@ -37,6 +37,10 @@ where self.inner.apply_pre_execution_changes() } + fn receipts(&self) -> &[Self::Receipt] { + self.inner.receipts() + } + fn execute_transaction_without_commit( &mut self, tx: impl ExecutableTx,