From 7e02fbffdfd8fe78fcd26acdf4e5062365944531 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 11 Jan 2025 19:37:44 +0100 Subject: [PATCH] fix: apply legacy cleanup to opnode --- crates/optimism/bin/src/main.rs | 8 ++++++-- crates/optimism/node/src/args.rs | 14 -------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/crates/optimism/bin/src/main.rs b/crates/optimism/bin/src/main.rs index 55eb923470c4..bba31e250117 100644 --- a/crates/optimism/bin/src/main.rs +++ b/crates/optimism/bin/src/main.rs @@ -24,8 +24,12 @@ fn main() { if let Err(err) = Cli::::parse().run(|builder, rollup_args| async move { let engine_tree_config = TreeConfig::default() - .with_persistence_threshold(rollup_args.persistence_threshold) - .with_memory_block_buffer_target(rollup_args.memory_block_buffer_target); + .with_persistence_threshold(builder.config().engine.persistence_threshold) + .with_memory_block_buffer_target(builder.config().engine.memory_block_buffer_target) + .with_state_root_task(builder.config().engine.state_root_task_enabled) + .with_always_compare_trie_updates( + builder.config().engine.state_root_task_compare_updates, + ); let op_node = OpNode::new(rollup_args.clone()); let handle = builder diff --git a/crates/optimism/node/src/args.rs b/crates/optimism/node/src/args.rs index 658748c9c441..432ad4be4f9f 100644 --- a/crates/optimism/node/src/args.rs +++ b/crates/optimism/node/src/args.rs @@ -2,10 +2,6 @@ //! clap [Args](clap::Args) for optimism rollup configuration -use reth_node_builder::engine_tree_config::{ - DEFAULT_MEMORY_BLOCK_BUFFER_TARGET, DEFAULT_PERSISTENCE_THRESHOLD, -}; - /// Parameters for rollup configuration #[derive(Debug, Clone, PartialEq, Eq, clap::Args)] #[command(next_help_heading = "Rollup")] @@ -37,14 +33,6 @@ pub struct RollupArgs { /// enables discovery v4 if provided #[arg(long = "rollup.discovery.v4", default_value = "false")] pub discovery_v4: bool, - - /// Configure persistence threshold for engine experimental. - #[arg(long = "engine.persistence-threshold", default_value_t = DEFAULT_PERSISTENCE_THRESHOLD)] - pub persistence_threshold: u64, - - /// Configure the target number of blocks to keep in memory. - #[arg(long = "engine.memory-block-buffer-target", default_value_t = DEFAULT_MEMORY_BLOCK_BUFFER_TARGET)] - pub memory_block_buffer_target: u64, } impl Default for RollupArgs { @@ -55,8 +43,6 @@ impl Default for RollupArgs { enable_genesis_walkback: false, compute_pending_block: false, discovery_v4: false, - persistence_threshold: DEFAULT_PERSISTENCE_THRESHOLD, - memory_block_buffer_target: DEFAULT_MEMORY_BLOCK_BUFFER_TARGET, } } }