Trait ConfigureEvm

pub trait ConfigureEvm:
    Clone
    + Debug
    + Send
    + Sync
    + Unpin {
    type Primitives: NodePrimitives;
    type Error: Error + Send + Sync + 'static;
    type NextBlockEnvCtx: Debug + Clone;
    type BlockExecutorFactory: BlockExecutorFactory<Transaction = <Self::Primitives as NodePrimitives>::SignedTx, Receipt = <Self::Primitives as NodePrimitives>::Receipt>
       where <Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory: EvmFactory<Precompiles = PrecompilesMap>,
             <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx: TransactionEnv + FromRecoveredTx<<Self::Primitives as NodePrimitives>::SignedTx> + FromTxWithEncoded<<Self::Primitives as NodePrimitives>::SignedTx>;
    type BlockAssembler: BlockAssembler<Self::BlockExecutorFactory, Block = <Self::Primitives as NodePrimitives>::Block>;

Show 17 methods // Required methods fn block_executor_factory(&self) -> &Self::BlockExecutorFactory; fn block_assembler(&self) -> &Self::BlockAssembler; fn evm_env( &self, header: &<Self::Primitives as NodePrimitives>::BlockHeader, ) -> EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>; fn next_evm_env( &self, parent: &<Self::Primitives as NodePrimitives>::BlockHeader, attributes: &Self::NextBlockEnvCtx, ) -> Result<EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, Self::Error>; fn context_for_block<'a>( &self, block: &'a SealedBlock<<Self::Primitives as NodePrimitives>::Block>, ) -> <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>; fn context_for_next_block( &self, parent: &SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, attributes: Self::NextBlockEnvCtx, ) -> <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_>; // Provided methods fn tx_env( &self, transaction: impl IntoTxEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx>, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx { ... } fn evm_factory( &self, ) -> &<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory { ... } fn evm_with_env<DB>( &self, db: DB, evm_env: EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector> where DB: Database { ... } fn evm_for_block<DB>( &self, db: DB, header: &<Self::Primitives as NodePrimitives>::BlockHeader, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector> where DB: Database { ... } fn evm_with_env_and_inspector<DB, I>( &self, db: DB, evm_env: EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, inspector: I, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, I> where DB: Database, I: InspectorFor<Self, DB> { ... } fn create_executor<'a, DB, I>( &'a self, evm: <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, ctx: <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockExecutorFor<'a, Self::BlockExecutorFactory, DB, I> where DB: Database, I: InspectorFor<Self, &'a mut State<DB>> + 'a { ... } fn executor_for_block<'a, DB>( &'a self, db: &'a mut State<DB>, block: &'a SealedBlock<<Self::Primitives as NodePrimitives>::Block>, ) -> impl BlockExecutorFor<'a, Self::BlockExecutorFactory, DB> where DB: Database { ... } fn create_block_builder<'a, DB, I>( &'a self, evm: <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, parent: &'a SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, ctx: <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockBuilder<Primitives = Self::Primitives> + BlockExecutorFor<'a, Self::BlockExecutorFactory, DB, I> where DB: Database, I: InspectorFor<Self, &'a mut State<DB>> + 'a { ... } fn builder_for_next_block<'a, DB>( &'a self, db: &'a mut State<DB>, parent: &'a SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, attributes: Self::NextBlockEnvCtx, ) -> Result<impl BlockBuilder<Primitives = Self::Primitives>, Self::Error> where DB: Database { ... } fn executor<DB>( &self, db: DB, ) -> impl Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError> where DB: Database { ... } fn batch_executor<DB>( &self, db: DB, ) -> impl Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError> where DB: Database { ... }
}
Expand description

A complete configuration of EVM for Reth.

This trait encapsulates complete configuration required for transaction execution and block execution/building, providing a unified interface for EVM operations.

§Architecture Overview

The EVM abstraction consists of the following layers:

  1. [Evm] (produced by [EvmFactory]): The core EVM implementation responsible for executing individual transactions and producing outputs including state changes, logs, gas usage, etc.

  2. BlockExecutor (produced by [BlockExecutorFactory]): A higher-level component that operates on top of [Evm] to execute entire blocks. This involves:

    • Executing all transactions in sequence
    • Building receipts from transaction outputs
    • Applying block rewards to the beneficiary
    • Executing system calls (e.g., EIP-4788 beacon root updates)
    • Managing state changes and bundle accumulation
  3. [BlockAssembler]: Responsible for assembling valid blocks from executed transactions. It takes the output from BlockExecutor along with execution context and produces a complete block ready for inclusion in the chain.

§Usage Patterns

The abstraction supports two primary use cases:

§1. Executing Externally Provided Blocks (e.g., during sync)

use reth_evm::ConfigureEvm;

// Execute a received block
let mut executor = evm_config.executor(state_db);
let output = executor.execute(&block)?;

// Access the execution results
println!("Gas used: {}", output.result.gas_used);
println!("Receipts: {:?}", output.result.receipts);

§2. Building New Blocks (e.g., payload building)

Payload building is slightly different as it doesn’t have the block’s header yet, but rather attributes for the block’s environment, such as timestamp, fee recipient, and randomness value. The block’s header will be the outcome of the block building process.

use reth_evm::{ConfigureEvm, NextBlockEnvAttributes};

// Create attributes for the next block
let attributes = NextBlockEnvAttributes {
    timestamp: current_time + 12,
    suggested_fee_recipient: beneficiary_address,
    prev_randao: randomness_value,
    gas_limit: 30_000_000,
    withdrawals: Some(withdrawals),
    parent_beacon_block_root: Some(beacon_root),
};

// Build a new block on top of parent
let mut builder = evm_config.builder_for_next_block(
    &mut state_db,
    &parent_header,
    attributes
)?;

// Apply pre-execution changes (e.g., beacon root update)
builder.apply_pre_execution_changes()?;

// Execute transactions
for tx in pending_transactions {
    match builder.execute_transaction(tx) {
        Ok(gas_used) => {
            println!("Transaction executed, gas used: {}", gas_used);
        }
        Err(e) => {
            println!("Transaction failed: {:?}", e);
        }
    }
}

// Finish block building and get the outcome (block)
let outcome = builder.finish(state_provider)?;
let block = outcome.block;

§Key Components

§NextBlockEnvCtx

Contains attributes needed to configure the next block that cannot be derived from the parent block alone. This includes data typically provided by the consensus layer:

  • timestamp: Block timestamp
  • suggested_fee_recipient: Beneficiary address
  • prev_randao: Randomness value
  • gas_limit: Block gas limit
  • withdrawals: Consensus layer withdrawals
  • parent_beacon_block_root: EIP-4788 beacon root

§[BlockAssembler]

Takes the execution output and produces a complete block. It receives:

  • Transaction execution results (receipts, gas used)
  • Final state root after all executions
  • Bundle state with all changes
  • Execution context and environment

The assembler is responsible for:

  • Setting the correct block header fields
  • Including executed transactions
  • Setting gas used and receipts root
  • Applying any chain-specific rules

Required Associated Types§

type Primitives: NodePrimitives

The primitives type used by the EVM.

type Error: Error + Send + Sync + 'static

The error type that is returned by Self::next_evm_env.

type NextBlockEnvCtx: Debug + Clone

Context required for configuring next block environment.

Contains values that can’t be derived from the parent block.

type BlockExecutorFactory: BlockExecutorFactory<Transaction = <Self::Primitives as NodePrimitives>::SignedTx, Receipt = <Self::Primitives as NodePrimitives>::Receipt> where <Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory: EvmFactory<Precompiles = PrecompilesMap>, <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx: TransactionEnv + FromRecoveredTx<<Self::Primitives as NodePrimitives>::SignedTx> + FromTxWithEncoded<<Self::Primitives as NodePrimitives>::SignedTx>

Configured [BlockExecutorFactory], contains [EvmFactory] internally.

type BlockAssembler: BlockAssembler<Self::BlockExecutorFactory, Block = <Self::Primitives as NodePrimitives>::Block>

A type that knows how to build a block.

Required Methods§

fn block_executor_factory(&self) -> &Self::BlockExecutorFactory

Returns reference to the configured [BlockExecutorFactory].

fn block_assembler(&self) -> &Self::BlockAssembler

Returns reference to the configured [BlockAssembler].

fn evm_env( &self, header: &<Self::Primitives as NodePrimitives>::BlockHeader, ) -> EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>

Creates a new [EvmEnv] for the given header.

fn next_evm_env( &self, parent: &<Self::Primitives as NodePrimitives>::BlockHeader, attributes: &Self::NextBlockEnvCtx, ) -> Result<EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, Self::Error>

Returns the configured [EvmEnv] for parent + 1 block.

This is intended for usage in block building after the merge and requires additional attributes that can’t be derived from the parent block: attributes that are determined by the CL, such as the timestamp, suggested fee recipient, and randomness value.

§Example
let evm_env = evm_config.next_evm_env(&parent_header, &attributes)?;
// evm_env now contains:
// - Correct spec ID based on timestamp and block number
// - Block environment with next block's parameters
// - Configuration like chain ID and blob parameters

fn context_for_block<'a>( &self, block: &'a SealedBlock<<Self::Primitives as NodePrimitives>::Block>, ) -> <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>

Returns the configured [BlockExecutorFactory::ExecutionCtx] for a given block.

fn context_for_next_block( &self, parent: &SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, attributes: Self::NextBlockEnvCtx, ) -> <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_>

Returns the configured [BlockExecutorFactory::ExecutionCtx] for parent + 1 block.

Provided Methods§

fn tx_env( &self, transaction: impl IntoTxEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx>, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx

Returns a TxEnv from a transaction and Address.

fn evm_factory( &self, ) -> &<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory

Provides a reference to [EvmFactory] implementation.

fn evm_with_env<DB>( &self, db: DB, evm_env: EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector>
where DB: Database,

Returns a new EVM with the given database configured with the given environment settings, including the spec id and transaction environment.

This will preserve any handler modifications

fn evm_for_block<DB>( &self, db: DB, header: &<Self::Primitives as NodePrimitives>::BlockHeader, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector>
where DB: Database,

Returns a new EVM with the given database configured with cfg and block_env configuration derived from the given header. Relies on ConfigureEvm::evm_env.

§Caution

This does not initialize the tx environment.

fn evm_with_env_and_inspector<DB, I>( &self, db: DB, evm_env: EvmEnv<<<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, inspector: I, ) -> <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, I>
where DB: Database, I: InspectorFor<Self, DB>,

Returns a new EVM with the given database configured with the given environment settings, including the spec id.

This will use the given external inspector as the EVM external context.

This will preserve any handler modifications

fn create_executor<'a, DB, I>( &'a self, evm: <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, ctx: <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockExecutorFor<'a, Self::BlockExecutorFactory, DB, I>
where DB: Database, I: InspectorFor<Self, &'a mut State<DB>> + 'a,

Creates a strategy with given EVM and execution context.

fn executor_for_block<'a, DB>( &'a self, db: &'a mut State<DB>, block: &'a SealedBlock<<Self::Primitives as NodePrimitives>::Block>, ) -> impl BlockExecutorFor<'a, Self::BlockExecutorFactory, DB>
where DB: Database,

Creates a strategy for execution of a given block.

fn create_block_builder<'a, DB, I>( &'a self, evm: <<Self::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, parent: &'a SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, ctx: <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockBuilder<Primitives = Self::Primitives> + BlockExecutorFor<'a, Self::BlockExecutorFactory, DB, I>
where DB: Database, I: InspectorFor<Self, &'a mut State<DB>> + 'a,

Creates a [BlockBuilder]. Should be used when building a new block.

Block builder wraps an inner [alloy_evm::block::BlockExecutor] and has a similar interface. Builder collects all of the executed transactions, and once [BlockBuilder::finish] is called, it invokes the configured [BlockAssembler] to create a block.

§Example
// Create a builder with specific EVM configuration
let evm = evm_config.evm_with_env(&mut state_db, evm_env);
let ctx = evm_config.context_for_next_block(&parent, attributes);
let builder = evm_config.create_block_builder(evm, &parent, ctx);

fn builder_for_next_block<'a, DB>( &'a self, db: &'a mut State<DB>, parent: &'a SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, attributes: Self::NextBlockEnvCtx, ) -> Result<impl BlockBuilder<Primitives = Self::Primitives>, Self::Error>
where DB: Database,

Creates a [BlockBuilder] for building of a new block. This is a helper to invoke ConfigureEvm::create_block_builder.

This is the primary method for building new blocks. It combines:

  1. Creating the EVM environment for the next block
  2. Setting up the execution context from attributes
  3. Initializing the block builder with proper configuration
§Example
// Build a block with specific attributes
let mut builder = evm_config.builder_for_next_block(
    &mut state_db,
    &parent_header,
    attributes
)?;

// Execute system calls (e.g., beacon root update)
builder.apply_pre_execution_changes()?;

// Execute transactions
for tx in transactions {
    builder.execute_transaction(tx)?;
}

// Complete block building
let outcome = builder.finish(state_provider)?;

fn executor<DB>( &self, db: DB, ) -> impl Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError>
where DB: Database,

Returns a new [Executor] for executing blocks.

The executor processes complete blocks including:

  • All transactions in order
  • Block rewards and fees
  • Block level system calls
  • State transitions
§Example
// Create an executor
let mut executor = evm_config.executor(state_db);

// Execute a single block
let output = executor.execute(&block)?;

// Execute multiple blocks
let batch_output = executor.execute_batch(&blocks)?;

fn batch_executor<DB>( &self, db: DB, ) -> impl Executor<DB, Primitives = Self::Primitives, Error = BlockExecutionError>
where DB: Database,

Returns a new [BasicBlockExecutor].

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.

Implementations on Foreign Types§

§

impl ConfigureEvm for MockEvmConfig

§

type BlockAssembler = <EthEvmConfig as ConfigureEvm>::BlockAssembler

§

type BlockExecutorFactory = MockEvmConfig

§

type Error = <EthEvmConfig as ConfigureEvm>::Error

§

type NextBlockEnvCtx = <EthEvmConfig as ConfigureEvm>::NextBlockEnvCtx

§

type Primitives = <EthEvmConfig as ConfigureEvm>::Primitives

§

fn block_executor_factory( &self, ) -> &<MockEvmConfig as ConfigureEvm>::BlockExecutorFactory

§

fn block_assembler(&self) -> &<MockEvmConfig as ConfigureEvm>::BlockAssembler

§

fn evm_env( &self, header: &Header, ) -> EvmEnv<<<<MockEvmConfig as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>

§

fn next_evm_env( &self, parent: &Header, attributes: &<MockEvmConfig as ConfigureEvm>::NextBlockEnvCtx, ) -> Result<EvmEnv<<<<MockEvmConfig as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, <MockEvmConfig as ConfigureEvm>::Error>

§

fn context_for_block<'a>( &self, block: &'a SealedBlock<<<MockEvmConfig as ConfigureEvm>::Primitives as NodePrimitives>::Block>, ) -> <<MockEvmConfig as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>

§

fn context_for_next_block( &self, parent: &SealedHeader, attributes: <MockEvmConfig as ConfigureEvm>::NextBlockEnvCtx, ) -> <<MockEvmConfig as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_>

§

impl<'b, T> ConfigureEvm for &'b T
where T: 'b + ConfigureEvm + ?Sized, &'b T: Clone + Debug + Send + Sync + Unpin,

§

type Primitives = <T as ConfigureEvm>::Primitives

§

type Error = <T as ConfigureEvm>::Error

§

type NextBlockEnvCtx = <T as ConfigureEvm>::NextBlockEnvCtx

§

type BlockExecutorFactory = <T as ConfigureEvm>::BlockExecutorFactory

§

type BlockAssembler = <T as ConfigureEvm>::BlockAssembler

§

fn block_executor_factory( &self, ) -> &<&'b T as ConfigureEvm>::BlockExecutorFactory

§

fn block_assembler(&self) -> &<&'b T as ConfigureEvm>::BlockAssembler

§

fn evm_env( &self, header: &<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, ) -> EvmEnv<<<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>

§

fn next_evm_env( &self, parent: &<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, attributes: &<&'b T as ConfigureEvm>::NextBlockEnvCtx, ) -> Result<EvmEnv<<<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, <&'b T as ConfigureEvm>::Error>

§

fn context_for_block<'a>( &self, block: &'a SealedBlock<<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::Block>, ) -> <<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>

§

fn context_for_next_block( &self, parent: &SealedHeader<<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, attributes: <&'b T as ConfigureEvm>::NextBlockEnvCtx, ) -> <<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_>

§

fn tx_env( &self, transaction: impl IntoTxEnv<<<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx>, ) -> <<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx

§

fn evm_factory( &self, ) -> &<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory

§

fn evm_with_env<DB>( &self, db: DB, evm_env: EvmEnv<<<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, ) -> <<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector>
where DB: Database,

§

fn evm_for_block<DB>( &self, db: DB, header: &<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, ) -> <<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector>
where DB: Database,

§

fn evm_with_env_and_inspector<DB, I>( &self, db: DB, evm_env: EvmEnv<<<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, inspector: I, ) -> <<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, I>
where DB: Database, I: InspectorFor<&'b T, DB>,

§

fn create_executor<'a, DB, I>( &'a self, evm: <<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, ctx: <<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockExecutorFor<'a, <&'b T as ConfigureEvm>::BlockExecutorFactory, DB, I>
where DB: Database, I: InspectorFor<&'b T, &'a mut State<DB>> + 'a,

§

fn executor_for_block<'a, DB>( &'a self, db: &'a mut State<DB>, block: &'a SealedBlock<<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::Block>, ) -> impl BlockExecutorFor<'a, <&'b T as ConfigureEvm>::BlockExecutorFactory, DB>
where DB: Database,

§

fn create_block_builder<'a, DB, I>( &'a self, evm: <<<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, parent: &'a SealedHeader<<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, ctx: <<&'b T as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockBuilder<Primitives = <&'b T as ConfigureEvm>::Primitives> + BlockExecutorFor<'a, <&'b T as ConfigureEvm>::BlockExecutorFactory, DB, I>
where DB: Database, I: InspectorFor<&'b T, &'a mut State<DB>> + 'a,

§

fn builder_for_next_block<'a, DB>( &'a self, db: &'a mut State<DB>, parent: &'a SealedHeader<<<&'b T as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, attributes: <&'b T as ConfigureEvm>::NextBlockEnvCtx, ) -> Result<impl BlockBuilder<Primitives = <&'b T as ConfigureEvm>::Primitives>, <&'b T as ConfigureEvm>::Error>
where DB: Database,

§

impl<ChainSpec, EvmF> ConfigureEvm for EthEvmConfig<ChainSpec, EvmF>
where ChainSpec: EthExecutorSpec + EthChainSpec + Hardforks + 'static, EvmF: EvmFactory<Spec = SpecId, Precompiles = PrecompilesMap> + Clone + Debug + Send + Sync + Unpin + 'static, <EvmF as EvmFactory>::Tx: TransactionEnv + FromRecoveredTx<EthereumTxEnvelope<TxEip4844>> + FromTxWithEncoded<EthereumTxEnvelope<TxEip4844>>,

§

type Primitives = EthPrimitives

§

type Error = Infallible

§

type NextBlockEnvCtx = NextBlockEnvAttributes

§

type BlockExecutorFactory = EthBlockExecutorFactory<RethReceiptBuilder, Arc<ChainSpec>, EvmF>

§

type BlockAssembler = EthBlockAssembler<ChainSpec>

§

fn block_executor_factory( &self, ) -> &<EthEvmConfig<ChainSpec, EvmF> as ConfigureEvm>::BlockExecutorFactory

§

fn block_assembler( &self, ) -> &<EthEvmConfig<ChainSpec, EvmF> as ConfigureEvm>::BlockAssembler

§

fn evm_env(&self, header: &Header) -> EvmEnv

§

fn next_evm_env( &self, parent: &Header, attributes: &NextBlockEnvAttributes, ) -> Result<EvmEnv, <EthEvmConfig<ChainSpec, EvmF> as ConfigureEvm>::Error>

§

fn context_for_block<'a>( &self, block: &'a SealedBlock<Block<EthereumTxEnvelope<TxEip4844>>>, ) -> EthBlockExecutionCtx<'a>

§

fn context_for_next_block( &self, parent: &SealedHeader, attributes: <EthEvmConfig<ChainSpec, EvmF> as ConfigureEvm>::NextBlockEnvCtx, ) -> EthBlockExecutionCtx<'_>

§

impl<T> ConfigureEvm for Arc<T>
where T: ConfigureEvm + ?Sized, Arc<T>: Clone + Debug + Send + Sync + Unpin,

§

type Primitives = <T as ConfigureEvm>::Primitives

§

type Error = <T as ConfigureEvm>::Error

§

type NextBlockEnvCtx = <T as ConfigureEvm>::NextBlockEnvCtx

§

type BlockExecutorFactory = <T as ConfigureEvm>::BlockExecutorFactory

§

type BlockAssembler = <T as ConfigureEvm>::BlockAssembler

§

fn block_executor_factory( &self, ) -> &<Arc<T> as ConfigureEvm>::BlockExecutorFactory

§

fn block_assembler(&self) -> &<Arc<T> as ConfigureEvm>::BlockAssembler

§

fn evm_env( &self, header: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, ) -> EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>

§

fn next_evm_env( &self, parent: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, attributes: &<Arc<T> as ConfigureEvm>::NextBlockEnvCtx, ) -> Result<EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, <Arc<T> as ConfigureEvm>::Error>

§

fn context_for_block<'a>( &self, block: &'a SealedBlock<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::Block>, ) -> <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>

§

fn context_for_next_block( &self, parent: &SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, attributes: <Arc<T> as ConfigureEvm>::NextBlockEnvCtx, ) -> <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_>

§

fn tx_env( &self, transaction: impl IntoTxEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx>, ) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx

§

fn evm_factory( &self, ) -> &<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory

§

fn evm_with_env<DB>( &self, db: DB, evm_env: EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, ) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector>
where DB: Database,

§

fn evm_for_block<DB>( &self, db: DB, header: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, ) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector>
where DB: Database,

§

fn evm_with_env_and_inspector<DB, I>( &self, db: DB, evm_env: EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, inspector: I, ) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, I>
where DB: Database, I: InspectorFor<Arc<T>, DB>,

§

fn create_executor<'a, DB, I>( &'a self, evm: <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, ctx: <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB, I>
where DB: Database, I: InspectorFor<Arc<T>, &'a mut State<DB>> + 'a,

§

fn executor_for_block<'a, DB>( &'a self, db: &'a mut State<DB>, block: &'a SealedBlock<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::Block>, ) -> impl BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB>
where DB: Database,

§

fn create_block_builder<'a, DB, I>( &'a self, evm: <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>, parent: &'a SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, ctx: <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>, ) -> impl BlockBuilder<Primitives = <Arc<T> as ConfigureEvm>::Primitives> + BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB, I>
where DB: Database, I: InspectorFor<Arc<T>, &'a mut State<DB>> + 'a,

§

fn builder_for_next_block<'a, DB>( &'a self, db: &'a mut State<DB>, parent: &'a SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, attributes: <Arc<T> as ConfigureEvm>::NextBlockEnvCtx, ) -> Result<impl BlockBuilder<Primitives = <Arc<T> as ConfigureEvm>::Primitives>, <Arc<T> as ConfigureEvm>::Error>
where DB: Database,

Implementors§

§

impl<Inner> ConfigureEvm for NoopEvmConfig<Inner>
where Inner: ConfigureEvm,