Repository navigation
Softfork: Continue RDTS, with a rolling 40320-block (~280-day) coinbase maturity (builds on #467) - #469
Closed
ZERODAYKEK wants to merge 5 commits into
Closed
Softfork: Continue RDTS, with a rolling 40320-block (~280-day) coinbase maturity (builds on #467)#469ZERODAYKEK wants to merge 5 commits into
ZERODAYKEK wants to merge 5 commits into
Conversation
Reuse the RDTS parent-MTP expiry on mainnet, preserving testnet4 and existing policy. Bound revalidation by parent MTP while still rewinding unchecked pre-expiry history on upgrades after expiry. Add synthetic expiry parameters and boundary/marker units.
Adapt the permanent-series boundary, wallet, GBT, reorg, pruning and mixed-binary tests. Cover parent MTP below/at expiry, pre-expiry and post-expiry rewards at depth 100, policy and wallet conservatism, and an upgrade after expiry with a pre-expiry violation.
…base maturity Two mainnet changes on top of bitcoinknots#467: - RDTS (BIP110) continues: RdtsExpiryTime = INT64_MAX instead of 1819756800 (2027-09-01 00:00 UTC). Its rules stay in force at every height from the BLAKE2b fork. - The rolling coinbase maturity, which bitcoinknots#467 keeps in force for as long as RDTS is, is 40320 blocks (~280 days, about the length of a human pregnancy) instead of 6480 (~45 days). Every reward mined from height 973440 matures 40320 blocks after the block that mined it. Both only keep or deepen existing rules, so this is a soft fork relative to bitcoinknots#419 and to bitcoinknots#467. The rule matches bitcoinknots#419's valid-block set before height 979920 (no covered reward can reach 6480 confirmations sooner) and restricts it only from there on. Tests: the mainnet maturity schedule at parent median-time-pasts before, at and after the old RDTS expiry; input depths up to 40321; the soft-fork property against bitcoinknots#419 and bitcoinknots#467 at every height from 973000 to 990000; and mainnet RDTS active at every parent median-time-past from the fork (replacing the tripwire that tied the expiry to the fork height). Release note updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
no consensus reached |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds on #467 (thanks @alphaminetech). #467 keeps #419's rolling coinbase maturity in force for as long as
RDTS (BIP110) is. This PR changes two mainnet parameters on top of it:
RdtsExpiryTimebecomesINT64_MAX(it was 1819756800, 2027-09-01 00:00 UTC), soBIP110's rules stay in force at every height from the BLAKE2b fork.
RDTS, so it continues for as long as RDTS does: every reward mined from height 973440 matures 40320 blocks
after the block that mined it.
Why 40320
We posit 40320 blocks as a reasonable compromise between the 45 days in force today (#419, #467) and the one
year proposed in #429. It is also closer aligned with the gestation period of a human baby: 40 weeks, 280 days,
which is 40320 blocks at ten minutes each. A reward is conceived when its block is found and can be spent when
it is born.
Because nothing expires, rewards are no longer released early near a cut-off date, an effect #467's release
note describes for rewards mined shortly before RDTS expiry.
What this asks of reviewers
limit, 34-byte output scripts, the OP_RETURN data limit, and the input rules it gates.
every coinbase spend, including coinbases from before 973440 whose consensus maturity is 100. At 40320
blocks, such spends stay out of default mempools for longer; miners can still include them.
Soft-fork property
Both changes only keep or deepen existing rules. Against #419 the valid-block set is the same before height
979920, because no covered reward can reach 6480 confirmations sooner; from 979920 this rejects covered spends
younger than 40320 blocks, which #419 accepts at 100. Against #467 the same holds before 979920; after it, this
asks 40320 where #467 asks 6480, and after 2027-09-01 this keeps the rules where #467 lets them lapse. Unit
tests check that this is never looser than either at every height from 973000 to 990000. Testnet4, the other
public networks and default regtest are unchanged.
Testing
coinbase_maturity_testscovers the mainnet schedule at parent median-time-pasts before, at and afterthe old expiry, input depths up to 40321, and the soft-fork property against T.Softfork: Long coinbase maturity (part 1 of 3) #419 and T.Softfork: Keep the 6480-block (~45-day) rolling coinbase maturity until RDTS expiry #467.
rdts_params_testschecks that mainnet RDTS is active at every parent median-time-past from the fork,replacing the tripwire that tied the expiry to the fork height. The full
test_bitcoinsuite passes.feature_coinbase_maturity_rolling.py(all four modes),feature_coinbase_maturity_pruned.py,mempool_long_coinbase_maturity.py,feature_rdts.py,feature_reduced_data_temporary_deployment.py,feature_reduced_data_utxo_height.py,rpc_blockchain.pyand
mining_basic.py.feature_coinbase_maturity_upgrade.pywas skipped: it needs previous-releasebinaries.
Diff against #467
Four files:
src/kernel/chainparams.cpp(two mainnet lines and their comments),src/test/coinbase_maturity_tests.cpp,src/test/rdts_params_tests.cppanddoc/release-notes-coinbase-rolling.md.Yo yo yo embryo!
🤖 Generated with Claude Code