feat(tree): --engine.state-root-task-compare-updates (#13763)

This commit is contained in:
Alexey Shekhirin
2025-01-10 12:30:50 +00:00
committed by GitHub
parent 69f9e1628a
commit c601712147
4 changed files with 40 additions and 3 deletions

View File

@ -43,6 +43,11 @@ pub struct EngineArgs {
/// Enable state root task
#[arg(long = "engine.state-root-task", conflicts_with = "legacy")]
pub state_root_task_enabled: bool,
/// Enable comparing trie updates from the state root task to the trie updates from the regular
/// state root calculation.
#[arg(long = "engine.state-root-task-compare-updates", conflicts_with = "legacy")]
pub state_root_task_compare_updates: bool,
}
impl Default for EngineArgs {
@ -53,6 +58,7 @@ impl Default for EngineArgs {
persistence_threshold: DEFAULT_PERSISTENCE_THRESHOLD,
memory_block_buffer_target: DEFAULT_MEMORY_BLOCK_BUFFER_TARGET,
state_root_task_enabled: false,
state_root_task_compare_updates: false,
}
}
}
@ -77,7 +83,8 @@ fn main() {
let engine_tree_config = TreeConfig::default()
.with_persistence_threshold(engine_args.persistence_threshold)
.with_memory_block_buffer_target(engine_args.memory_block_buffer_target)
.with_state_root_task(engine_args.state_root_task_enabled);
.with_state_root_task(engine_args.state_root_task_enabled)
.with_always_compare_trie_updates(engine_args.state_root_task_compare_updates);
let handle = builder
.with_types_and_provider::<EthereumNode, BlockchainProvider<_>>()
.with_components(EthereumNode::components())