Skip to content

chore: update default mempool walk strategy #6059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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]

Expand Down
4 changes: 2 additions & 2 deletions stackslib/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions stackslib/src/core/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Loading