From 080a9cfc106be7f9d4565ba384ef8251cf919ef9 Mon Sep 17 00:00:00 2001 From: MergeBot Date: Wed, 25 Feb 2026 21:04:02 +0100 Subject: [PATCH] fix(rpc): add missing `apply_pre_execution_changes` in `spawn_replay_transaction` (#22575) --- crates/rpc/rpc-eth-api/src/helpers/call.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 836ba3c495..68e109c249 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -20,8 +20,8 @@ use alloy_rpc_types_eth::{ use futures::Future; use reth_errors::{ProviderError, RethError}; use reth_evm::{ - env::BlockEnvironment, execute::BlockBuilder, ConfigureEvm, Evm, EvmEnvFor, HaltReasonFor, - InspectorFor, TransactionEnv, TxEnvFor, + block::BlockExecutor, env::BlockEnvironment, execute::BlockBuilder, ConfigureEvm, Evm, + EvmEnvFor, HaltReasonFor, InspectorFor, TransactionEnv, TxEnvFor, }; use reth_node_api::BlockBody; use reth_primitives_traits::Recovered; @@ -746,6 +746,14 @@ pub trait Call: self.spawn_with_state_at_block(parent_block, move |this, mut db| { let block_txs = block.transactions_recovered(); + // apply pre-execution changes (e.g. EIP-4788 beacon root, EIP-2935 blockhashes) + RpcNodeCore::evm_config(&this) + .executor_for_block(&mut db, block.sealed_block()) + .map_err(RethError::other) + .map_err(Self::Error::from_eth_err)? + .apply_pre_execution_changes() + .map_err(Self::Error::from_eth_err)?; + // replay all transactions prior to the targeted transaction this.replay_transactions_until(&mut db, evm_env.clone(), block_txs, *tx.tx_hash())?;