feat: Enable ExecutionStage (#622)

This commit is contained in:
rakita
2022-12-26 23:09:04 +01:00
committed by GitHub
parent bfe2fd6221
commit d2b4081849
2 changed files with 9 additions and 3 deletions

View File

@ -17,6 +17,7 @@ use reth_db::{
transaction::{DbTx, DbTxMut},
};
use reth_downloaders::{bodies, headers};
use reth_executor::Config as ExecutorConfig;
use reth_interfaces::consensus::ForkchoiceState;
use reth_network::{
config::{mainnet_nodes, rng_secret_key},
@ -26,7 +27,10 @@ use reth_network::{
use reth_primitives::{Account, Header, H256};
use reth_provider::{db_provider::ProviderImpl, BlockProvider, HeaderProvider};
use reth_stages::{
stages::{bodies::BodyStage, headers::HeaderStage, sender_recovery::SenderRecoveryStage},
stages::{
bodies::BodyStage, execution::ExecutionStage, headers::HeaderStage,
sender_recovery::SenderRecoveryStage,
},
stages_metrics::HeaderMetrics,
stages_metrics_describer,
};
@ -136,7 +140,8 @@ impl Command {
.push(SenderRecoveryStage {
batch_size: config.stages.sender_recovery.batch_size,
commit_threshold: config.stages.sender_recovery.commit_threshold,
});
})
.push(ExecutionStage { config: ExecutorConfig::new_ethereum() });
if let Some(tip) = self.tip {
debug!("Tip manually set: {}", tip);

View File

@ -51,7 +51,8 @@ const EXECUTION: StageId = StageId("Execution");
/// to [tables::PlainStorageState]
#[derive(Debug)]
pub struct ExecutionStage {
config: Config,
/// Executor configuration.
pub config: Config,
}
impl Default for ExecutionStage {