mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: switch to composable executor for Ethereum (#11838)
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user