execution: make ConfigureEvm independent of chainspec argument (#10748)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
Thomas Coratger
2024-09-11 06:50:42 -07:00
committed by GitHub
parent 7abf49995f
commit 2b75415a00
26 changed files with 292 additions and 207 deletions

View File

@ -19,7 +19,7 @@ use reth_evm::execute::{BlockExecutorProvider, Executor};
use reth_execution_types::ExecutionOutcome;
use reth_fs_util as fs;
use reth_node_api::{NodeTypesWithDB, NodeTypesWithEngine, PayloadBuilderAttributes};
use reth_node_ethereum::EthExecutorProvider;
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
use reth_payload_builder::database::CachedReads;
use reth_primitives::{
revm_primitives::KzgSettings, Address, BlobTransaction, BlobTransactionSidecar, Bytes,
@ -243,7 +243,9 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
None,
);
let payload_builder = reth_ethereum_payload_builder::EthereumPayloadBuilder::default();
let payload_builder = reth_ethereum_payload_builder::EthereumPayloadBuilder::new(
EthEvmConfig::new(provider_factory.chain_spec()),
);
match payload_builder.try_build(args)? {
BuildOutcome::Better { payload, .. } => {

View File

@ -19,7 +19,7 @@ use reth_fs_util as fs;
use reth_network::{BlockDownloaderProvider, NetworkHandle};
use reth_network_api::NetworkInfo;
use reth_node_api::{NodeTypesWithDB, NodeTypesWithDBAdapter, NodeTypesWithEngine};
use reth_node_ethereum::{EthEngineTypes, EthExecutorProvider};
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig, EthExecutorProvider};
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_provider::{
providers::BlockchainProvider, CanonStateSubscriptions, ChainSpecProvider, ProviderFactory,
@ -117,7 +117,9 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
.await?;
// Set up payload builder
let payload_builder = reth_ethereum_payload_builder::EthereumPayloadBuilder::default();
let payload_builder = reth_ethereum_payload_builder::EthereumPayloadBuilder::new(
EthEvmConfig::new(provider_factory.chain_spec()),
);
let payload_generator = BasicPayloadJobGenerator::with_builder(
blockchain_db.clone(),