feat: switch to composable executor for Ethereum (#11838)

This commit is contained in:
Federico Gimenez
2024-10-19 19:59:32 +02:00
committed by GitHub
parent d0ac833946
commit cd828c06d9
13 changed files with 316 additions and 1648 deletions

View File

@ -9,7 +9,8 @@ use reth_chainspec::ChainSpec;
use reth_ethereum_engine_primitives::{
EthBuiltPayload, EthPayloadAttributes, EthPayloadBuilderAttributes, EthereumEngineValidator,
};
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_evm::execute::BasicBlockExecutorProvider;
use reth_evm_ethereum::execute::EthExecutionStrategyFactory;
use reth_network::NetworkHandle;
use reth_node_api::{
AddOnsContext, ConfigureEvm, EngineValidator, FullNodeComponents, NodePrimitives,
@ -136,7 +137,7 @@ where
Node: FullNodeTypes<Types = Types>,
{
type EVM = EthEvmConfig;
type Executor = EthExecutorProvider<Self::EVM>;
type Executor = BasicBlockExecutorProvider<EthExecutionStrategyFactory>;
async fn build_evm(
self,
@ -144,7 +145,8 @@ where
) -> eyre::Result<(Self::EVM, Self::Executor)> {
let chain_spec = ctx.chain_spec();
let evm_config = EthEvmConfig::new(ctx.chain_spec());
let executor = EthExecutorProvider::new(chain_spec, evm_config.clone());
let strategy_factory = EthExecutionStrategyFactory::new(chain_spec, evm_config.clone());
let executor = BasicBlockExecutorProvider::new(strategy_factory);
Ok((evm_config, executor))
}