Skip to content

fix: calibrate block-count constants for Avian 30-second block time#236

Merged
cdonnachie merged 1 commit into5.xfrom
fix/avian-fee-calibration
Apr 6, 2026
Merged

fix: calibrate block-count constants for Avian 30-second block time#236
cdonnachie merged 1 commit into5.xfrom
fix/avian-fee-calibration

Conversation

@cdonnachie
Copy link
Copy Markdown
Member

Scale Bitcoin-era constants (calibrated for 10-minute blocks) to their wall-clock equivalents for Avian's 30-second block time (x20 factor):

  • policy/fees.h: rescale fee estimator decay half-lives and history window (SHORT_DECAY, MED_DECAY, LONG_DECAY, OLDEST_ESTIMATE_HISTORY)
  • wallet/wallet.cpp: wallet flush period 144 -> 2880 blocks (~1 day)
  • chain.h: MAX_BLOCK_TIME_GAP 5400s -> 270s (9 blocks at 30s each)
  • qt/bitcoingui.cpp: clarifying comment on MAX_BLOCK_TIME_GAP
  • net_processing.cpp: NODE_NETWORK_LIMITED thresholds 288/144 ->
    5760/2880 blocks (~2 days / ~1 day); safe since NODE_NETWORK_LIMITED is new in v5 and absent from v4.2 nodes entirely

Scale Bitcoin-era constants (calibrated for 10-minute blocks) to their
wall-clock equivalents for Avian's 30-second block time (x20 factor):

- policy/fees.h: rescale fee estimator decay half-lives and history
  window (SHORT_DECAY, MED_DECAY, LONG_DECAY, OLDEST_ESTIMATE_HISTORY)
- wallet/wallet.cpp: wallet flush period 144 -> 2880 blocks (~1 day)
- chain.h: MAX_BLOCK_TIME_GAP 5400s -> 270s (9 blocks at 30s each)
- qt/bitcoingui.cpp: clarifying comment on MAX_BLOCK_TIME_GAP
- net_processing.cpp: NODE_NETWORK_LIMITED thresholds 288/144 ->
  5760/2880 blocks (~2 days / ~1 day); safe since NODE_NETWORK_LIMITED
  is new in v5 and absent from v4.2 nodes entirely
@cdonnachie cdonnachie merged commit 021c90a into 5.x Apr 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant