pub trait BlockExecutorFactory {
type EvmFactory;
type EvmTypes: EvmTypes
where <Self::EvmTypes as EvmTypesHost>::TxResultExt: for<'a> Send + for<'a> Sync,
<Self::EvmTypes as EvmTypesHost>::SpecId: for<'a> Eq + for<'a> Hash + for<'a> Debug + for<'a> Send + for<'a> Sync + 'static;
type Transaction: Debug + Clone + Send + Sync + 'static;
type Receipt;
type Evm<'a>: Evm<EvmTypes = Self::EvmTypes, Transaction = <Self::EvmTypes as EvmTypesHost>::Tx>;
type EvmEnv: EvmEnv<EvmTypes = Self::EvmTypes>;
type ExecutionCtx<'a>: Debug + Clone + Send
where Self: 'a;
type Executor<'a>: BlockExecutor<Transaction = Self::Transaction, Receipt = Self::Receipt, Evm = Self::Evm<'a>, BlockAccessList = Bal>
where Self: 'a;
// Required methods
fn create_executor<'a>(
&'a self,
evm: Self::Evm<'a>,
ctx: Self::ExecutionCtx<'a>,
) -> Self::Executor<'a>
where Self: 'a;
fn evm_factory(&self) -> &Self::EvmFactory;
fn evm_with_env<'a, DB>(
&self,
db: DB,
evm_env: Self::EvmEnv,
) -> Self::Evm<'a>
where DB: DynDatabase + 'a;
// Provided method
fn evm_with_database<'a, DB>(
&self,
db: DB,
evm_env: Self::EvmEnv,
) -> Self::Evm<'a>
where DB: Database + 'a { ... }
}Available on crate feature
evm only.Expand description
A type that creates configured block executors.
Required Associated Types§
Sourcetype EvmFactory
type EvmFactory
Additional EVM factory configuration owned by this executor factory.
Sourcetype EvmTypes: EvmTypes
where
<Self::EvmTypes as EvmTypesHost>::TxResultExt: for<'a> Send + for<'a> Sync,
<Self::EvmTypes as EvmTypesHost>::SpecId: for<'a> Eq + for<'a> Hash + for<'a> Debug + for<'a> Send + for<'a> Sync + 'static
type EvmTypes: EvmTypes where <Self::EvmTypes as EvmTypesHost>::TxResultExt: for<'a> Send + for<'a> Sync, <Self::EvmTypes as EvmTypesHost>::SpecId: for<'a> Eq + for<'a> Hash + for<'a> Debug + for<'a> Send + for<'a> Sync + 'static
Runtime EVM type family.
Sourcetype Transaction: Debug + Clone + Send + Sync + 'static
type Transaction: Debug + Clone + Send + Sync + 'static
Consensus transaction type consumed by executors from this factory.
Sourcetype Evm<'a>: Evm<EvmTypes = Self::EvmTypes, Transaction = <Self::EvmTypes as EvmTypesHost>::Tx>
type Evm<'a>: Evm<EvmTypes = Self::EvmTypes, Transaction = <Self::EvmTypes as EvmTypesHost>::Tx>
EVM instance consumed by executors from this factory.
Sourcetype ExecutionCtx<'a>: Debug + Clone + Send
where
Self: 'a
type ExecutionCtx<'a>: Debug + Clone + Send where Self: 'a
Execution context for a block or payload.
Sourcetype Executor<'a>: BlockExecutor<Transaction = Self::Transaction, Receipt = Self::Receipt, Evm = Self::Evm<'a>, BlockAccessList = Bal>
where
Self: 'a
type Executor<'a>: BlockExecutor<Transaction = Self::Transaction, Receipt = Self::Receipt, Evm = Self::Evm<'a>, BlockAccessList = Bal> where Self: 'a
Block executor returned by this factory.
Required Methods§
Sourcefn create_executor<'a>(
&'a self,
evm: Self::Evm<'a>,
ctx: Self::ExecutionCtx<'a>,
) -> Self::Executor<'a>where
Self: 'a,
fn create_executor<'a>(
&'a self,
evm: Self::Evm<'a>,
ctx: Self::ExecutionCtx<'a>,
) -> Self::Executor<'a>where
Self: 'a,
Creates a configured block executor.
Sourcefn evm_factory(&self) -> &Self::EvmFactory
fn evm_factory(&self) -> &Self::EvmFactory
Returns the configured EVM factory state.
Sourcefn evm_with_env<'a, DB>(&self, db: DB, evm_env: Self::EvmEnv) -> Self::Evm<'a>where
DB: DynDatabase + 'a,
fn evm_with_env<'a, DB>(&self, db: DB, evm_env: Self::EvmEnv) -> Self::Evm<'a>where
DB: DynDatabase + 'a,
Creates an EVM instance with the configured execution environment.
Provided Methods§
Sourcefn evm_with_database<'a, DB>(
&self,
db: DB,
evm_env: Self::EvmEnv,
) -> Self::Evm<'a>where
DB: Database + 'a,
Available on crate feature std only.
fn evm_with_database<'a, DB>(
&self,
db: DB,
evm_env: Self::EvmEnv,
) -> Self::Evm<'a>where
DB: Database + 'a,
std only.Creates an EVM instance with the configured execution environment over a typed database.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".