Skip to content

Cover the historical coinbase maturity window on regtest - #482

Open
kwsantiago wants to merge 3 commits into
bitcoinknots:29.x-knotsfrom
privkeyio:cbm-historical-regtest
Open

kwsantiago wants to merge 3 commits into
bitcoinknots:29.x-knotsfrom
privkeyio:cbm-historical-regtest

Conversation

@kwsantiago

@kwsantiago kwsantiago commented Oct 25, 2026 •

Copy link
Copy Markdown

Mainnet enforces two coinbase maturity schedules at once: the 6480-block window for rewards from 973440 (consensus until 979920; relay keeps holding them after that) and the rolling rule from 979919. Regtest could only configure the rolling rule, so no functional test covered the window or where the two overlap.

This adds -testcoinbasematurityhistorical=<start_height>:<release_height> (regtest only). It requires -testcoinbasematuritylong with -testcoinbasematuritylongexpiry, and a release height at most one above the rolling start, which is mainnet's layout. It sets the window through the same helper mainnet now uses, so the parameters and revalidation markers match mainnet's.

feature_historical_coinbase_maturity.py covers, at a mainnet-shaped scale:

  • consensus holding only rewards from the window start
  • both rules applying at the first rolling block
  • consensus freeing window rewards at the release height while relay keeps holding them
  • getdeploymentinfo before and after the switch
  • a node started with only the historical rule (as a 29.4.2 node runs) following a branch that breaks the rolling rule, then rewinding to the rolling start and rejecting that branch on upgrade, and not rewinding again on the next start
  • per-reward wallet maturity for a window reward and a rolling reward

No mainnet, testnet or signet parameters change.

@kwsantiago kwsantiago mentioned this pull request Oct 27, 2026
5 of 24 tasks
@kwsantiago
kwsantiago force-pushed the cbm-historical-regtest branch from 4fcc7ee to 182af72 Compare October 30, 2026 19:28
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