From 49d89743a079730d716146340c4f554c2ec568bf Mon Sep 17 00:00:00 2001 From: Brice Dobry Date: Wed, 30 Apr 2025 16:47:37 -0400 Subject: [PATCH] chore: update default mempool walk strategy I think we have mined long enough with this setting to be confident to make it the default in the next release. --- CHANGELOG.md | 1 + stackslib/src/config/mod.rs | 4 ++-- stackslib/src/core/mempool.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2088a70ca1..7e6feb0607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE - Reduce the default `block_rejection_timeout_steps` configuration so that miners will retry faster when blocks fail to reach 70% approved or 30% rejected. - Added index for `next_ready_nakamoto_block()` which improves block processing performance. - Added a new field, `parent_burn_block_hash`, to the payload that is included in the `/new_burn_block` event observer payload. +- Changed default mempool walk strategy to `NextNonceWithHighestFeeRate` ## [3.1.0.0.8] diff --git a/stackslib/src/config/mod.rs b/stackslib/src/config/mod.rs index e8aae36950..9b53e73f5f 100644 --- a/stackslib/src/config/mod.rs +++ b/stackslib/src/config/mod.rs @@ -2224,7 +2224,7 @@ impl Default for MinerConfig { activated_vrf_key_path: None, fast_rampup: false, underperform_stop_threshold: None, - mempool_walk_strategy: MemPoolWalkStrategy::GlobalFeeRate, + mempool_walk_strategy: MemPoolWalkStrategy::NextNonceWithHighestFeeRate, txs_to_consider: MemPoolWalkTxTypes::all(), filter_origins: HashSet::new(), max_reorg_depth: 3, @@ -2758,7 +2758,7 @@ impl MinerConfigFile { underperform_stop_threshold: self.underperform_stop_threshold, mempool_walk_strategy: self.mempool_walk_strategy .map(|s| str::parse(&s).unwrap_or_else(|e| panic!("Could not parse '{s}': {e}"))) - .unwrap_or(MemPoolWalkStrategy::GlobalFeeRate), + .unwrap_or(MemPoolWalkStrategy::NextNonceWithHighestFeeRate), txs_to_consider: { if let Some(txs_to_consider) = &self.txs_to_consider { txs_to_consider diff --git a/stackslib/src/core/mempool.rs b/stackslib/src/core/mempool.rs index bdab57124b..59577a20f9 100644 --- a/stackslib/src/core/mempool.rs +++ b/stackslib/src/core/mempool.rs @@ -575,7 +575,7 @@ pub struct MemPoolWalkSettings { impl Default for MemPoolWalkSettings { fn default() -> Self { MemPoolWalkSettings { - strategy: MemPoolWalkStrategy::GlobalFeeRate, + strategy: MemPoolWalkStrategy::NextNonceWithHighestFeeRate, max_walk_time_ms: u64::MAX, consider_no_estimate_tx_prob: 5, nonce_cache_size: 1024 * 1024, @@ -589,7 +589,7 @@ impl Default for MemPoolWalkSettings { impl MemPoolWalkSettings { pub fn zero() -> MemPoolWalkSettings { MemPoolWalkSettings { - strategy: MemPoolWalkStrategy::GlobalFeeRate, + strategy: MemPoolWalkStrategy::NextNonceWithHighestFeeRate, max_walk_time_ms: u64::MAX, consider_no_estimate_tx_prob: 5, nonce_cache_size: 1024 * 1024,