chore: move EvmEnvProvider (#8420)

This commit is contained in:
Matthias Seitz
2024-05-27 19:47:09 +02:00
committed by GitHub
parent c8a18a2f26
commit 749d68b5e4
5 changed files with 11 additions and 5 deletions

1
Cargo.lock generated
View File

@ -6989,6 +6989,7 @@ dependencies = [
name = "reth-evm"
version = "0.2.0-beta.7"
dependencies = [
"auto_impl",
"futures-util",
"parking_lot 0.12.3",
"reth-execution-errors",

View File

@ -19,6 +19,7 @@ reth-storage-errors.workspace = true
revm.workspace = true
auto_impl.workspace = true
futures-util.workspace = true
parking_lot = { workspace = true, optional = true }

View File

@ -16,6 +16,7 @@ use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, SpecId,
pub mod either;
pub mod execute;
pub mod provider;
#[cfg(any(test, feature = "test-utils"))]
/// test helpers for mocking executor

View File

@ -1,12 +1,15 @@
use reth_evm::ConfigureEvmEnv;
//! Provider trait for populating the EVM environment.
use crate::ConfigureEvmEnv;
use reth_primitives::{BlockHashOrNumber, Header};
use reth_storage_errors::provider::ProviderResult;
use revm::primitives::{BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, SpecId};
/// A provider type that knows chain specific information required to configure an
/// A provider type that knows chain specific information required to configure a
/// [CfgEnvWithHandlerCfg].
///
/// This type is mainly used to provide required data to configure the EVM environment.
/// This type is mainly used to provide required data to configure the EVM environment that is
/// 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

View File

@ -18,8 +18,8 @@ pub use block_hash::BlockHashReader;
mod block_id;
pub use block_id::{BlockIdReader, BlockNumReader};
mod evm_env;
pub use evm_env::EvmEnvProvider;
// Re-export for convenience
pub use reth_evm::provider::EvmEnvProvider;
mod chain_info;
pub use chain_info::CanonChainTracker;