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:
@ -31,7 +31,7 @@ use reth_node_api::{
|
||||
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
|
||||
use reth_node_ethereum::{
|
||||
node::{EthereumAddOns, EthereumPayloadBuilder},
|
||||
EthExecutorProvider, EthereumNode,
|
||||
BasicBlockExecutorProvider, EthExecutionStrategyFactory, EthereumNode,
|
||||
};
|
||||
use reth_primitives::{
|
||||
revm_primitives::{CfgEnvWithHandlerCfg, TxEnv},
|
||||
@ -158,7 +158,7 @@ where
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
type EVM = MyEvmConfig;
|
||||
type Executor = EthExecutorProvider<Self::EVM>;
|
||||
type Executor = BasicBlockExecutorProvider<EthExecutionStrategyFactory<Self::EVM>>;
|
||||
|
||||
async fn build_evm(
|
||||
self,
|
||||
@ -166,7 +166,10 @@ where
|
||||
) -> eyre::Result<(Self::EVM, Self::Executor)> {
|
||||
Ok((
|
||||
MyEvmConfig::new(ctx.chain_spec()),
|
||||
EthExecutorProvider::new(ctx.chain_spec(), MyEvmConfig::new(ctx.chain_spec())),
|
||||
BasicBlockExecutorProvider::new(EthExecutionStrategyFactory::new(
|
||||
ctx.chain_spec(),
|
||||
MyEvmConfig::new(ctx.chain_spec()),
|
||||
)),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,10 @@ use reth::{
|
||||
use reth_chainspec::{Chain, ChainSpec};
|
||||
use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, FullNodeTypes, NodeTypes};
|
||||
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
|
||||
use reth_node_ethereum::{node::EthereumAddOns, EthEvmConfig, EthExecutorProvider, EthereumNode};
|
||||
use reth_node_ethereum::{
|
||||
node::EthereumAddOns, BasicBlockExecutorProvider, EthEvmConfig, EthExecutionStrategyFactory,
|
||||
EthereumNode,
|
||||
};
|
||||
use reth_primitives::{
|
||||
revm_primitives::{SpecId, StatefulPrecompileMut},
|
||||
Header, TransactionSigned,
|
||||
@ -224,7 +227,7 @@ where
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
type EVM = MyEvmConfig;
|
||||
type Executor = EthExecutorProvider<Self::EVM>;
|
||||
type Executor = BasicBlockExecutorProvider<EthExecutionStrategyFactory<Self::EVM>>;
|
||||
|
||||
async fn build_evm(
|
||||
self,
|
||||
@ -234,7 +237,13 @@ where
|
||||
inner: EthEvmConfig::new(ctx.chain_spec()),
|
||||
precompile_cache: self.precompile_cache.clone(),
|
||||
};
|
||||
Ok((evm_config.clone(), EthExecutorProvider::new(ctx.chain_spec(), evm_config)))
|
||||
Ok((
|
||||
evm_config.clone(),
|
||||
BasicBlockExecutorProvider::new(EthExecutionStrategyFactory::new(
|
||||
ctx.chain_spec(),
|
||||
evm_config,
|
||||
)),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user