diff --git a/crates/evm/src/provider.rs b/crates/evm/src/provider.rs index ec2f1803da..6ef4cefbb4 100644 --- a/crates/evm/src/provider.rs +++ b/crates/evm/src/provider.rs @@ -13,18 +13,6 @@ use revm::primitives::{BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, SpecId}; /// usually stored on disk. #[auto_impl::auto_impl(&, Arc)] pub trait EvmEnvProvider: Send + Sync { - /// Fills the [`CfgEnvWithHandlerCfg`] and [BlockEnv] fields with values specific to the given - /// [BlockHashOrNumber]. - fn fill_env_at( - &self, - cfg: &mut CfgEnvWithHandlerCfg, - block_env: &mut BlockEnv, - at: BlockHashOrNumber, - evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
; - /// Fills the default [`CfgEnvWithHandlerCfg`] and [BlockEnv] fields with values specific to the /// given block header. fn env_with_header( diff --git a/crates/storage/provider/src/providers/blockchain_provider.rs b/crates/storage/provider/src/providers/blockchain_provider.rs index 521e1d959b..68f1498ecc 100644 --- a/crates/storage/provider/src/providers/blockchain_provider.rs +++ b/crates/storage/provider/src/providers/blockchain_provider.rs @@ -493,19 +493,6 @@ impl StageCheckpointReader for BlockchainProvider2 { } impl EvmEnvProvider> for BlockchainProvider2 { - fn fill_env_at( - &self, - cfg: &mut CfgEnvWithHandlerCfg, - block_env: &mut BlockEnv, - at: BlockHashOrNumber, - evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
>, - { - self.consistent_provider()?.fill_env_at(cfg, block_env, at, evm_config) - } - fn fill_env_with_header( &self, cfg: &mut CfgEnvWithHandlerCfg, diff --git a/crates/storage/provider/src/providers/consistent.rs b/crates/storage/provider/src/providers/consistent.rs index 9c7973b14e..927a78fe19 100644 --- a/crates/storage/provider/src/providers/consistent.rs +++ b/crates/storage/provider/src/providers/consistent.rs @@ -1231,21 +1231,6 @@ impl StageCheckpointReader for ConsistentProvider { } impl EvmEnvProvider> for ConsistentProvider { - fn fill_env_at( - &self, - cfg: &mut CfgEnvWithHandlerCfg, - block_env: &mut BlockEnv, - at: BlockHashOrNumber, - evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
>, - { - let hash = self.convert_number(at)?.ok_or(ProviderError::HeaderNotFound(at))?; - let header = self.header(&hash)?.ok_or(ProviderError::HeaderNotFound(at))?; - self.fill_env_with_header(cfg, block_env, &header, evm_config) - } - fn fill_env_with_header( &self, cfg: &mut CfgEnvWithHandlerCfg, diff --git a/crates/storage/provider/src/providers/database/mod.rs b/crates/storage/provider/src/providers/database/mod.rs index 39230e253e..85b734ef66 100644 --- a/crates/storage/provider/src/providers/database/mod.rs +++ b/crates/storage/provider/src/providers/database/mod.rs @@ -590,19 +590,6 @@ impl StageCheckpointReader for ProviderFactory { } impl EvmEnvProvider> for ProviderFactory { - fn fill_env_at( - &self, - cfg: &mut CfgEnvWithHandlerCfg, - block_env: &mut BlockEnv, - at: BlockHashOrNumber, - evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
>, - { - self.provider()?.fill_env_at(cfg, block_env, at, evm_config) - } - fn fill_env_with_header( &self, cfg: &mut CfgEnvWithHandlerCfg, diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index 9dddbb9c0a..05e4ed4c0c 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -1638,21 +1638,6 @@ impl> Withdrawals impl EvmEnvProvider> for DatabaseProvider { - fn fill_env_at( - &self, - cfg: &mut CfgEnvWithHandlerCfg, - block_env: &mut BlockEnv, - at: BlockHashOrNumber, - evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
>, - { - let hash = self.convert_number(at)?.ok_or(ProviderError::HeaderNotFound(at))?; - let header = self.header(&hash)?.ok_or(ProviderError::HeaderNotFound(at))?; - self.fill_env_with_header(cfg, block_env, &header, evm_config) - } - fn fill_env_with_header( &self, cfg: &mut CfgEnvWithHandlerCfg, diff --git a/crates/storage/provider/src/providers/mod.rs b/crates/storage/provider/src/providers/mod.rs index 44cd5554be..b4a99541a8 100644 --- a/crates/storage/provider/src/providers/mod.rs +++ b/crates/storage/provider/src/providers/mod.rs @@ -591,19 +591,6 @@ impl StageCheckpointReader for BlockchainProvider { } impl EvmEnvProvider for BlockchainProvider { - fn fill_env_at( - &self, - cfg: &mut CfgEnvWithHandlerCfg, - block_env: &mut BlockEnv, - at: BlockHashOrNumber, - evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
, - { - self.database.provider()?.fill_env_at(cfg, block_env, at, evm_config) - } - fn fill_env_with_header( &self, cfg: &mut CfgEnvWithHandlerCfg, diff --git a/crates/storage/provider/src/test_utils/mock.rs b/crates/storage/provider/src/test_utils/mock.rs index 6815bbcb12..abe1096a1b 100644 --- a/crates/storage/provider/src/test_utils/mock.rs +++ b/crates/storage/provider/src/test_utils/mock.rs @@ -717,19 +717,6 @@ impl StateProvider for MockEthProvider { } impl EvmEnvProvider for MockEthProvider { - fn fill_env_at( - &self, - _cfg: &mut CfgEnvWithHandlerCfg, - _block_env: &mut BlockEnv, - _at: BlockHashOrNumber, - _evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
, - { - Ok(()) - } - fn fill_env_with_header( &self, _cfg: &mut CfgEnvWithHandlerCfg, diff --git a/crates/storage/provider/src/test_utils/noop.rs b/crates/storage/provider/src/test_utils/noop.rs index a33e4159be..3846313b9f 100644 --- a/crates/storage/provider/src/test_utils/noop.rs +++ b/crates/storage/provider/src/test_utils/noop.rs @@ -436,19 +436,6 @@ impl StateProvider for NoopProvider { } impl EvmEnvProvider for NoopProvider { - fn fill_env_at( - &self, - _cfg: &mut CfgEnvWithHandlerCfg, - _block_env: &mut BlockEnv, - _at: BlockHashOrNumber, - _evm_config: EvmConfig, - ) -> ProviderResult<()> - where - EvmConfig: ConfigureEvmEnv
, - { - Ok(()) - } - fn fill_env_with_header( &self, _cfg: &mut CfgEnvWithHandlerCfg,