feat(stages): duration threshold for Execution stage (#6073)

This commit is contained in:
Alexey Shekhirin
2024-01-17 16:45:40 +00:00
committed by GitHub
parent f23250d88c
commit 43167eabda
11 changed files with 45 additions and 25 deletions

View File

@ -912,6 +912,7 @@ impl NodeConfig {
max_blocks: stage_config.execution.max_blocks,
max_changes: stage_config.execution.max_changes,
max_cumulative_gas: stage_config.execution.max_cumulative_gas,
max_duration: stage_config.execution.max_duration,
},
stage_config
.merkle

View File

@ -136,6 +136,7 @@ impl Command {
max_blocks: None,
max_changes: None,
max_cumulative_gas: None,
max_duration: None,
},
stage_conf
.merkle

View File

@ -205,6 +205,7 @@ impl Command {
max_blocks: Some(1),
max_changes: None,
max_cumulative_gas: None,
max_duration: None,
},
MERKLE_STAGE_DEFAULT_CLEAN_THRESHOLD,
PruneModes::all(),

View File

@ -183,6 +183,7 @@ impl ImportCommand {
max_blocks: config.stages.execution.max_blocks,
max_changes: config.stages.execution.max_changes,
max_cumulative_gas: config.stages.execution.max_cumulative_gas,
max_duration: config.stages.execution.max_duration,
},
config
.stages

View File

@ -122,7 +122,7 @@ impl<DB> NodeState<DB> {
%target,
%stage_progress,
%stage_eta,
message,
"{message}",
)
} else {
info!(
@ -131,7 +131,7 @@ impl<DB> NodeState<DB> {
checkpoint = %checkpoint.block_number,
%target,
%stage_progress,
message,
"{message}",
)
}
}

View File

@ -73,6 +73,7 @@ async fn unwind_and_copy<DB: Database>(
max_blocks: Some(u64::MAX),
max_changes: None,
max_cumulative_gas: None,
max_duration: None,
},
MERKLE_STAGE_DEFAULT_CLEAN_THRESHOLD,
PruneModes::all(),

View File

@ -204,6 +204,7 @@ impl Command {
max_blocks: Some(batch_size),
max_changes: None,
max_cumulative_gas: None,
max_duration: None,
},
config.stages.merkle.clean_threshold,
config.prune.map(|prune| prune.segments).unwrap_or_default(),