From 2eb423c1ab98e0410a8bf38d6ea16e72ccd020b1 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Fri, 28 Jun 2024 18:51:13 +0200 Subject: [PATCH 1/2] Revert "chore: remove `tx_env_with_recovered` from rpc crates (#9158)" This reverts commit b24ca7637fb2674024050b26dbd4eff6a2f4be4f. --- crates/evm/src/lib.rs | 11 +------ crates/rpc/rpc-eth-api/src/helpers/call.rs | 16 ++++------ .../rpc-eth-api/src/helpers/pending_block.rs | 10 +++---- crates/rpc/rpc-eth-api/src/helpers/trace.rs | 13 ++++----- crates/rpc/rpc/src/debug.rs | 29 +++++-------------- crates/rpc/rpc/src/trace.rs | 13 +++------ 6 files changed, 28 insertions(+), 64 deletions(-) diff --git a/crates/evm/src/lib.rs b/crates/evm/src/lib.rs index 20d2f67ed6f2..f86219eec7fa 100644 --- a/crates/evm/src/lib.rs +++ b/crates/evm/src/lib.rs @@ -12,12 +12,10 @@ #[cfg(not(feature = "std"))] extern crate alloc; -use core::ops::Deref; - use reth_chainspec::ChainSpec; use reth_primitives::{ revm::env::{fill_block_env, fill_tx_env}, - Address, Header, TransactionSigned, TransactionSignedEcRecovered, U256, + Address, Header, TransactionSigned, U256, }; use revm::{inspector_handle_register, Database, Evm, EvmBuilder, GetInspector}; use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, SpecId, TxEnv}; @@ -108,13 +106,6 @@ pub trait ConfigureEvm: ConfigureEvmEnv { /// Default trait method implementation is done w.r.t. L1. #[auto_impl::auto_impl(&, Arc)] pub trait ConfigureEvmEnv: Send + Sync + Unpin + Clone + 'static { - /// Returns a [`TxEnv`] from a [`TransactionSignedEcRecovered`]. - fn tx_env(&self, transaction: &TransactionSignedEcRecovered) -> TxEnv { - let mut tx_env = TxEnv::default(); - self.fill_tx_env(&mut tx_env, transaction.deref(), transaction.signer()); - tx_env - } - /// Fill transaction environment from a [`TransactionSigned`] and the given sender address. fn fill_tx_env(&self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address) { fill_tx_env(tx_env, transaction, sender) diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 5f6aebaa85b3..888b739945ee 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -4,6 +4,7 @@ use futures::Future; use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; use reth_primitives::{ + revm::env::tx_env_with_recovered, revm_primitives::{ BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ExecutionResult, HaltReason, ResultAndState, TransactTo, @@ -118,11 +119,9 @@ pub trait EthCall: Call + LoadPendingBlock { // to be replayed let transactions = block.into_transactions_ecrecovered().take(num_txs); for tx in transactions { - let env = EnvWithHandlerCfg::new_with_cfg_env( - cfg.clone(), - block_env.clone(), - Call::evm_config(&this).tx_env(&tx), - ); + let tx = tx_env_with_recovered(&tx); + let env = + EnvWithHandlerCfg::new_with_cfg_env(cfg.clone(), block_env.clone(), tx); let (res, _) = this.transact(&mut db, env)?; db.commit(res.state); } @@ -423,11 +422,8 @@ pub trait Call: LoadState + SpawnBlocking { tx.hash, )?; - let env = EnvWithHandlerCfg::new_with_cfg_env( - cfg, - block_env, - Call::evm_config(&this).tx_env(&tx), - ); + let env = + EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, tx_env_with_recovered(&tx)); let (res, _) = this.transact(&mut db, env)?; f(tx_info, res, db) diff --git a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs index 8f3e38817695..f30e397e030f 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs @@ -5,11 +5,12 @@ use std::time::{Duration, Instant}; use futures::Future; use reth_chainspec::EthereumHardforks; -use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; +use reth_evm::ConfigureEvm; use reth_execution_types::ExecutionOutcome; use reth_primitives::{ constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE, EMPTY_ROOT_HASH}, proofs::calculate_transaction_root, + revm::env::tx_env_with_recovered, revm_primitives::{ BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EVMError, Env, ExecutionResult, InvalidTransaction, ResultAndState, SpecId, @@ -291,11 +292,8 @@ pub trait LoadPendingBlock { } // Configure the environment for the block. - let env = Env::boxed( - cfg.cfg_env.clone(), - block_env.clone(), - Self::evm_config(self).tx_env(&tx), - ); + let env = + Env::boxed(cfg.cfg_env.clone(), block_env.clone(), tx_env_with_recovered(&tx)); let mut evm = revm::Evm::builder().with_env(env).with_db(&mut db).build(); diff --git a/crates/rpc/rpc-eth-api/src/helpers/trace.rs b/crates/rpc/rpc-eth-api/src/helpers/trace.rs index d48e566ed51d..63b210204065 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/trace.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/trace.rs @@ -1,8 +1,8 @@ //! Loads a pending block from database. Helper trait for `eth_` call and trace RPC methods. use futures::Future; -use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; -use reth_primitives::B256; +use reth_evm::ConfigureEvm; +use reth_primitives::{revm::env::tx_env_with_recovered, B256}; use reth_revm::database::StateProviderDatabase; use reth_rpc_eth_types::{ cache::db::{StateCacheDb, StateCacheDbRefMutWrapper, StateProviderTraitObjWrapper}, @@ -196,11 +196,8 @@ pub trait Trace: LoadState { tx.hash, )?; - let env = EnvWithHandlerCfg::new_with_cfg_env( - cfg, - block_env, - Call::evm_config(&this).tx_env(&tx), - ); + let env = + EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, tx_env_with_recovered(&tx)); let (res, _) = this.inspect(StateCacheDbRefMutWrapper(&mut db), env, &mut inspector)?; f(tx_info, inspector, res, db) @@ -311,7 +308,7 @@ pub trait Trace: LoadState { block_number: Some(block_number), base_fee: Some(base_fee), }; - let tx_env = Trace::evm_config(&this).tx_env(&tx); + let tx_env = tx_env_with_recovered(&tx); (tx_info, tx_env) }) .peekable(); diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 67363dff31c1..2658547b1963 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -4,10 +4,9 @@ use alloy_rlp::{Decodable, Encodable}; use async_trait::async_trait; use jsonrpsee::core::RpcResult; use reth_chainspec::EthereumHardforks; -use reth_evm::ConfigureEvmEnv; use reth_primitives::{ - Address, Block, BlockId, BlockNumberOrTag, Bytes, TransactionSignedEcRecovered, Withdrawals, - B256, U256, + revm::env::tx_env_with_recovered, Address, Block, BlockId, BlockNumberOrTag, Bytes, + TransactionSignedEcRecovered, Withdrawals, B256, U256, }; use reth_provider::{ BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory, @@ -15,7 +14,7 @@ use reth_provider::{ }; use reth_revm::database::StateProviderDatabase; use reth_rpc_api::DebugApiServer; -use reth_rpc_eth_api::helpers::{Call, EthApiSpec, EthTransactions, TraceExt}; +use reth_rpc_eth_api::helpers::{EthApiSpec, EthTransactions, TraceExt}; use reth_rpc_eth_types::{revm_utils::prepare_call_env, EthApiError, EthResult, StateCacheDb}; use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult}; use reth_rpc_types::{ @@ -100,13 +99,9 @@ where let mut transactions = transactions.into_iter().enumerate().peekable(); while let Some((index, tx)) = transactions.next() { let tx_hash = tx.hash; - + let tx = tx_env_with_recovered(&tx); let env = EnvWithHandlerCfg { - env: Env::boxed( - cfg.cfg_env.clone(), - block_env.clone(), - Call::evm_config(this.eth_api()).tx_env(&tx), - ), + env: Env::boxed(cfg.cfg_env.clone(), block_env.clone(), tx), handler_cfg: cfg.handler_cfg, }; let (result, state_changes) = this.trace_transaction( @@ -245,11 +240,7 @@ where )?; let env = EnvWithHandlerCfg { - env: Env::boxed( - cfg.cfg_env.clone(), - block_env, - Call::evm_config(this.eth_api()).tx_env(&tx), - ), + env: Env::boxed(cfg.cfg_env.clone(), block_env, tx_env_with_recovered(&tx)), handler_cfg: cfg.handler_cfg, }; @@ -462,7 +453,6 @@ where } let this = self.clone(); - self.inner .eth_api .spawn_with_state_at_block(at.into(), move |state| { @@ -477,12 +467,9 @@ where // Execute all transactions until index for tx in transactions { + let tx = tx_env_with_recovered(&tx); let env = EnvWithHandlerCfg { - env: Env::boxed( - cfg.cfg_env.clone(), - block_env.clone(), - Call::evm_config(this.eth_api()).tx_env(&tx), - ), + env: Env::boxed(cfg.cfg_env.clone(), block_env.clone(), tx), handler_cfg: cfg.handler_cfg, }; let (res, _) = this.inner.eth_api.transact(&mut db, env)?; diff --git a/crates/rpc/rpc/src/trace.rs b/crates/rpc/rpc/src/trace.rs index ff98194b91fb..110f35dbd1eb 100644 --- a/crates/rpc/rpc/src/trace.rs +++ b/crates/rpc/rpc/src/trace.rs @@ -6,12 +6,11 @@ use reth_chainspec::EthereumHardforks; use reth_consensus_common::calc::{ base_block_reward, base_block_reward_pre_merge, block_reward, ommer_reward, }; -use reth_evm::ConfigureEvmEnv; -use reth_primitives::{BlockId, Bytes, Header, B256, U256}; +use reth_primitives::{revm::env::tx_env_with_recovered, BlockId, Bytes, Header, B256, U256}; use reth_provider::{BlockReader, ChainSpecProvider, EvmEnvProvider, StateProviderFactory}; use reth_revm::database::StateProviderDatabase; use reth_rpc_api::TraceApiServer; -use reth_rpc_eth_api::helpers::{Call, TraceExt}; +use reth_rpc_eth_api::helpers::TraceExt; use reth_rpc_eth_types::{ error::{EthApiError, EthResult}, revm_utils::prepare_call_env, @@ -114,12 +113,8 @@ where let tx = recover_raw_transaction(tx)?; let (cfg, block, at) = self.inner.eth_api.evm_env_at(block_id.unwrap_or_default()).await?; - - let env = EnvWithHandlerCfg::new_with_cfg_env( - cfg, - block, - Call::evm_config(self.eth_api()).tx_env(&tx.into_ecrecovered_transaction()), - ); + let tx = tx_env_with_recovered(&tx.into_ecrecovered_transaction()); + let env = EnvWithHandlerCfg::new_with_cfg_env(cfg, block, tx); let config = TracingInspectorConfig::from_parity_config(&trace_types); From fb4eb19e1fe2e3906f98c4517d1986a27eb862c4 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Fri, 28 Jun 2024 18:51:31 +0200 Subject: [PATCH 2/2] Merged main into group_imports and overwrote changes --- crates/evm/src/lib.rs | 11 ++++++- crates/rpc/rpc-eth-api/src/helpers/call.rs | 16 ++++++---- .../rpc-eth-api/src/helpers/pending_block.rs | 10 ++++--- crates/rpc/rpc-eth-api/src/helpers/trace.rs | 13 +++++---- crates/rpc/rpc/src/debug.rs | 29 ++++++++++++++----- crates/rpc/rpc/src/trace.rs | 13 ++++++--- 6 files changed, 64 insertions(+), 28 deletions(-) diff --git a/crates/evm/src/lib.rs b/crates/evm/src/lib.rs index f86219eec7fa..20d2f67ed6f2 100644 --- a/crates/evm/src/lib.rs +++ b/crates/evm/src/lib.rs @@ -12,10 +12,12 @@ #[cfg(not(feature = "std"))] extern crate alloc; +use core::ops::Deref; + use reth_chainspec::ChainSpec; use reth_primitives::{ revm::env::{fill_block_env, fill_tx_env}, - Address, Header, TransactionSigned, U256, + Address, Header, TransactionSigned, TransactionSignedEcRecovered, U256, }; use revm::{inspector_handle_register, Database, Evm, EvmBuilder, GetInspector}; use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, SpecId, TxEnv}; @@ -106,6 +108,13 @@ pub trait ConfigureEvm: ConfigureEvmEnv { /// Default trait method implementation is done w.r.t. L1. #[auto_impl::auto_impl(&, Arc)] pub trait ConfigureEvmEnv: Send + Sync + Unpin + Clone + 'static { + /// Returns a [`TxEnv`] from a [`TransactionSignedEcRecovered`]. + fn tx_env(&self, transaction: &TransactionSignedEcRecovered) -> TxEnv { + let mut tx_env = TxEnv::default(); + self.fill_tx_env(&mut tx_env, transaction.deref(), transaction.signer()); + tx_env + } + /// Fill transaction environment from a [`TransactionSigned`] and the given sender address. fn fill_tx_env(&self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address) { fill_tx_env(tx_env, transaction, sender) diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 888b739945ee..5f6aebaa85b3 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -4,7 +4,6 @@ use futures::Future; use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; use reth_primitives::{ - revm::env::tx_env_with_recovered, revm_primitives::{ BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ExecutionResult, HaltReason, ResultAndState, TransactTo, @@ -119,9 +118,11 @@ pub trait EthCall: Call + LoadPendingBlock { // to be replayed let transactions = block.into_transactions_ecrecovered().take(num_txs); for tx in transactions { - let tx = tx_env_with_recovered(&tx); - let env = - EnvWithHandlerCfg::new_with_cfg_env(cfg.clone(), block_env.clone(), tx); + let env = EnvWithHandlerCfg::new_with_cfg_env( + cfg.clone(), + block_env.clone(), + Call::evm_config(&this).tx_env(&tx), + ); let (res, _) = this.transact(&mut db, env)?; db.commit(res.state); } @@ -422,8 +423,11 @@ pub trait Call: LoadState + SpawnBlocking { tx.hash, )?; - let env = - EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, tx_env_with_recovered(&tx)); + let env = EnvWithHandlerCfg::new_with_cfg_env( + cfg, + block_env, + Call::evm_config(&this).tx_env(&tx), + ); let (res, _) = this.transact(&mut db, env)?; f(tx_info, res, db) diff --git a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs index f30e397e030f..8f3e38817695 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs @@ -5,12 +5,11 @@ use std::time::{Duration, Instant}; use futures::Future; use reth_chainspec::EthereumHardforks; -use reth_evm::ConfigureEvm; +use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; use reth_execution_types::ExecutionOutcome; use reth_primitives::{ constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE, EMPTY_ROOT_HASH}, proofs::calculate_transaction_root, - revm::env::tx_env_with_recovered, revm_primitives::{ BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EVMError, Env, ExecutionResult, InvalidTransaction, ResultAndState, SpecId, @@ -292,8 +291,11 @@ pub trait LoadPendingBlock { } // Configure the environment for the block. - let env = - Env::boxed(cfg.cfg_env.clone(), block_env.clone(), tx_env_with_recovered(&tx)); + let env = Env::boxed( + cfg.cfg_env.clone(), + block_env.clone(), + Self::evm_config(self).tx_env(&tx), + ); let mut evm = revm::Evm::builder().with_env(env).with_db(&mut db).build(); diff --git a/crates/rpc/rpc-eth-api/src/helpers/trace.rs b/crates/rpc/rpc-eth-api/src/helpers/trace.rs index 63b210204065..d48e566ed51d 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/trace.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/trace.rs @@ -1,8 +1,8 @@ //! Loads a pending block from database. Helper trait for `eth_` call and trace RPC methods. use futures::Future; -use reth_evm::ConfigureEvm; -use reth_primitives::{revm::env::tx_env_with_recovered, B256}; +use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; +use reth_primitives::B256; use reth_revm::database::StateProviderDatabase; use reth_rpc_eth_types::{ cache::db::{StateCacheDb, StateCacheDbRefMutWrapper, StateProviderTraitObjWrapper}, @@ -196,8 +196,11 @@ pub trait Trace: LoadState { tx.hash, )?; - let env = - EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, tx_env_with_recovered(&tx)); + let env = EnvWithHandlerCfg::new_with_cfg_env( + cfg, + block_env, + Call::evm_config(&this).tx_env(&tx), + ); let (res, _) = this.inspect(StateCacheDbRefMutWrapper(&mut db), env, &mut inspector)?; f(tx_info, inspector, res, db) @@ -308,7 +311,7 @@ pub trait Trace: LoadState { block_number: Some(block_number), base_fee: Some(base_fee), }; - let tx_env = tx_env_with_recovered(&tx); + let tx_env = Trace::evm_config(&this).tx_env(&tx); (tx_info, tx_env) }) .peekable(); diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 2658547b1963..67363dff31c1 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -4,9 +4,10 @@ use alloy_rlp::{Decodable, Encodable}; use async_trait::async_trait; use jsonrpsee::core::RpcResult; use reth_chainspec::EthereumHardforks; +use reth_evm::ConfigureEvmEnv; use reth_primitives::{ - revm::env::tx_env_with_recovered, Address, Block, BlockId, BlockNumberOrTag, Bytes, - TransactionSignedEcRecovered, Withdrawals, B256, U256, + Address, Block, BlockId, BlockNumberOrTag, Bytes, TransactionSignedEcRecovered, Withdrawals, + B256, U256, }; use reth_provider::{ BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory, @@ -14,7 +15,7 @@ use reth_provider::{ }; use reth_revm::database::StateProviderDatabase; use reth_rpc_api::DebugApiServer; -use reth_rpc_eth_api::helpers::{EthApiSpec, EthTransactions, TraceExt}; +use reth_rpc_eth_api::helpers::{Call, EthApiSpec, EthTransactions, TraceExt}; use reth_rpc_eth_types::{revm_utils::prepare_call_env, EthApiError, EthResult, StateCacheDb}; use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult}; use reth_rpc_types::{ @@ -99,9 +100,13 @@ where let mut transactions = transactions.into_iter().enumerate().peekable(); while let Some((index, tx)) = transactions.next() { let tx_hash = tx.hash; - let tx = tx_env_with_recovered(&tx); + let env = EnvWithHandlerCfg { - env: Env::boxed(cfg.cfg_env.clone(), block_env.clone(), tx), + env: Env::boxed( + cfg.cfg_env.clone(), + block_env.clone(), + Call::evm_config(this.eth_api()).tx_env(&tx), + ), handler_cfg: cfg.handler_cfg, }; let (result, state_changes) = this.trace_transaction( @@ -240,7 +245,11 @@ where )?; let env = EnvWithHandlerCfg { - env: Env::boxed(cfg.cfg_env.clone(), block_env, tx_env_with_recovered(&tx)), + env: Env::boxed( + cfg.cfg_env.clone(), + block_env, + Call::evm_config(this.eth_api()).tx_env(&tx), + ), handler_cfg: cfg.handler_cfg, }; @@ -453,6 +462,7 @@ where } let this = self.clone(); + self.inner .eth_api .spawn_with_state_at_block(at.into(), move |state| { @@ -467,9 +477,12 @@ where // Execute all transactions until index for tx in transactions { - let tx = tx_env_with_recovered(&tx); let env = EnvWithHandlerCfg { - env: Env::boxed(cfg.cfg_env.clone(), block_env.clone(), tx), + env: Env::boxed( + cfg.cfg_env.clone(), + block_env.clone(), + Call::evm_config(this.eth_api()).tx_env(&tx), + ), handler_cfg: cfg.handler_cfg, }; let (res, _) = this.inner.eth_api.transact(&mut db, env)?; diff --git a/crates/rpc/rpc/src/trace.rs b/crates/rpc/rpc/src/trace.rs index 110f35dbd1eb..ff98194b91fb 100644 --- a/crates/rpc/rpc/src/trace.rs +++ b/crates/rpc/rpc/src/trace.rs @@ -6,11 +6,12 @@ use reth_chainspec::EthereumHardforks; use reth_consensus_common::calc::{ base_block_reward, base_block_reward_pre_merge, block_reward, ommer_reward, }; -use reth_primitives::{revm::env::tx_env_with_recovered, BlockId, Bytes, Header, B256, U256}; +use reth_evm::ConfigureEvmEnv; +use reth_primitives::{BlockId, Bytes, Header, B256, U256}; use reth_provider::{BlockReader, ChainSpecProvider, EvmEnvProvider, StateProviderFactory}; use reth_revm::database::StateProviderDatabase; use reth_rpc_api::TraceApiServer; -use reth_rpc_eth_api::helpers::TraceExt; +use reth_rpc_eth_api::helpers::{Call, TraceExt}; use reth_rpc_eth_types::{ error::{EthApiError, EthResult}, revm_utils::prepare_call_env, @@ -113,8 +114,12 @@ where let tx = recover_raw_transaction(tx)?; let (cfg, block, at) = self.inner.eth_api.evm_env_at(block_id.unwrap_or_default()).await?; - let tx = tx_env_with_recovered(&tx.into_ecrecovered_transaction()); - let env = EnvWithHandlerCfg::new_with_cfg_env(cfg, block, tx); + + let env = EnvWithHandlerCfg::new_with_cfg_env( + cfg, + block, + Call::evm_config(self.eth_api()).tx_env(&tx.into_ecrecovered_transaction()), + ); let config = TracingInspectorConfig::from_parity_config(&trace_types);