From f63cebbdb675a12da983e08611d8a6319a9a4085 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:37:05 -0400 Subject: [PATCH] fix: reduce merkle clean_threshold to 5000 (#7364) --- book/run/config.md | 2 +- crates/config/src/config.rs | 2 +- crates/stages/src/stages/merkle.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/book/run/config.md b/book/run/config.md index ec559e901..f2da90ea4 100644 --- a/book/run/config.md +++ b/book/run/config.md @@ -179,7 +179,7 @@ The merkle stage uses the indexes built in the hashing stages (storage and accou # The threshold in number of blocks before the stage starts from scratch # and re-computes the state root, discarding the trie that has already been built, # as opposed to incrementally updating the trie. -clean_threshold = 50000 +clean_threshold = 5000 ``` ### `transaction_lookup` diff --git a/crates/config/src/config.rs b/crates/config/src/config.rs index 7c43c2783..7ce947b50 100644 --- a/crates/config/src/config.rs +++ b/crates/config/src/config.rs @@ -222,7 +222,7 @@ pub struct MerkleConfig { impl Default for MerkleConfig { fn default() -> Self { - Self { clean_threshold: 50_000 } + Self { clean_threshold: 5_000 } } } diff --git a/crates/stages/src/stages/merkle.rs b/crates/stages/src/stages/merkle.rs index cb61e9931..e1d651169 100644 --- a/crates/stages/src/stages/merkle.rs +++ b/crates/stages/src/stages/merkle.rs @@ -21,7 +21,7 @@ use tracing::*; /// The default threshold (in number of blocks) for switching from incremental trie building /// of changes to whole rebuild. -pub const MERKLE_STAGE_DEFAULT_CLEAN_THRESHOLD: u64 = 50_000; +pub const MERKLE_STAGE_DEFAULT_CLEAN_THRESHOLD: u64 = 5_000; /// The merkle hashing stage uses input from /// [`AccountHashingStage`][crate::stages::AccountHashingStage] and