Trait BlockExecutorProvider
pub trait BlockExecutorProvider:
Send
+ Sync
+ Clone
+ Unpin
+ 'static {
type Primitives: NodePrimitives;
type Executor<DB: Database>: Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError>;
// Required method
fn executor<DB>(&self, db: DB) -> Self::Executor<DB>
where DB: Database;
}
Available on crate feature
evm
only.Expand description
A type that can create a new executor for block execution.
Required Associated Types§
type Primitives: NodePrimitives
type Primitives: NodePrimitives
Receipt type.
type Executor<DB: Database>: Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError>
type Executor<DB: Database>: Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError>
An executor that can execute a single block given a database.
§Verification
The on Executor::execute
the executor is expected to validate the execution output of
the input, this includes:
- Cumulative gas used must match the input’s gas used.
- Receipts must match the input’s receipts root.
It is not expected to validate the state trie root, this must be done by the caller using the returned state.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.