diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index cba91bbcce05..533fc6ab22d7 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -252,6 +252,9 @@ where /// The debug_traceCall method lets you run an `eth_call` within the context of the given block /// execution using the final state of parent block as the base. + /// + /// Differences compare to `eth_call`: + /// - `debug_traceCall` executes with __enabled__ basefee check, `eth_call` does not: pub async fn debug_trace_call( &self, call: CallRequest, diff --git a/crates/rpc/rpc/src/eth/api/transactions.rs b/crates/rpc/rpc/src/eth/api/transactions.rs index 659c7032831e..c93de8f2158b 100644 --- a/crates/rpc/rpc/src/eth/api/transactions.rs +++ b/crates/rpc/rpc/src/eth/api/transactions.rs @@ -63,6 +63,22 @@ pub(crate) type StateCacheDB = CacheDB>; /// /// Async functions that are spawned onto the /// [BlockingTaskPool](crate::blocking_pool::BlockingTaskPool) begin with `spawn_` +/// +/// +/// ## Calls +/// +/// There are subtle differences between when transacting [CallRequest]: +/// +/// The endpoints `eth_call` and `eth_estimateGas` and `eth_createAccessList` should always +/// __disable__ the base fee check in the [Env] [Cfg](revm_primitives::CfgEnv). +/// +/// The behaviour for tracing endpoints is not consistent across clients. +/// Geth also disables the basefee check for tracing: +/// Erigon does not: +/// +/// See also +/// +/// This implementation follows the behaviour of Geth and disables the basefee check for tracing. #[async_trait::async_trait] pub trait EthTransactions: Send + Sync { /// Returns default gas limit to use for `eth_call` and tracing RPC methods. @@ -160,6 +176,9 @@ pub trait EthTransactions: Send + Sync { /// Prepares the state and env for the given [CallRequest] at the given [BlockId] and executes /// the closure on a new task returning the result of the closure. + /// + /// This returns the configured [Env] for the given [CallRequest] at the given [BlockId] and + /// with configured call settings: `prepare_call_env`. async fn spawn_with_call_at( &self, request: CallRequest, diff --git a/crates/rpc/rpc/src/eth/revm_utils.rs b/crates/rpc/rpc/src/eth/revm_utils.rs index 931240a3e360..f7bdfb17114e 100644 --- a/crates/rpc/rpc/src/eth/revm_utils.rs +++ b/crates/rpc/rpc/src/eth/revm_utils.rs @@ -207,6 +207,11 @@ where /// Prepares the [Env] for execution. /// /// Does not commit any changes to the underlying database. +/// +/// EVM settings: +/// - `disable_block_gas_limit` is set to `true` +/// - `disable_eip3607` is set to `true` +/// - `disable_base_fee` is set to `true` pub(crate) fn prepare_call_env( mut cfg: CfgEnv, block: BlockEnv,