Repository navigation
Consensus: Extended coinbase maturity temporary softfork (expires with RDTS) #402
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
Closed
chrisguida
wants to merge
7
commits into
bitcoinknots:29.x-knots
from
chrisguida:extended-coinbase-maturity-29+knots
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5d91e6f
consensus/params: Define the extended coinbase maturity parameters, e…
chrisguida 53a81bd
validation: Enforce 6480-block coinbase maturity while the soft fork …
chrisguida cd62af6
rpc: Report the extended coinbase maturity deployment in getdeploymen…
chrisguida 9b63b7e
wallet: Account for the extended coinbase maturity when reporting imm…
chrisguida aba4402
chainparams: Add regtest scheduling for the extended coinbase maturit…
chrisguida ad248ef
test: Add functional coverage for the extended coinbase maturity soft…
chrisguida 547fe3e
doc: Add release notes for the extended coinbase maturity soft fork
chrisguida File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| ### Extended coinbase maturity (temporary softfork) | ||
|
|
||
| Coinbase outputs created while this deployment is active can only be spent | ||
| once buried under 6480 blocks (45 days of ten-minute blocks), | ||
| instead of the usual 100. The rule applies to every block from the first one | ||
| whose parent's median-time-past reaches the deployment's start time, and | ||
| expires together with RDTS: from the first block whose parent's | ||
| median-time-past reaches the RDTS expiry (2027-09-01 00:00 UTC on mainnet) | ||
| every coinbase output is again spendable after 100 confirmations, including | ||
| those created during the window that had not yet reached 6480. | ||
|
|
||
| Only outputs created inside the window are affected. A coinbase output created | ||
| before activation keeps the 100-block rule throughout, so activating the | ||
| deployment cannot lock an output that was already spendable. The 100-block | ||
| rule continues to apply to every coinbase output at all times. | ||
|
|
||
| The start time is not yet scheduled on mainnet or testnet4 in this release | ||
| (see `src/kernel/chainparams.cpp`); the deployment does nothing until it is. | ||
|
|
||
| Miners: block rewards mined inside the window cannot be spent for 6480 blocks | ||
| (or until the RDTS expiry, whichever comes first). Pools that pay their miners | ||
| directly from coinbase outputs pass this delay through to those miners. A | ||
| non-upgraded miner that spends its own reward at 100 confirmations produces a | ||
| block that upgraded nodes reject. | ||
|
|
||
| Wallet: rewards subject to the rule are reported as immature (in | ||
| `getbalances` `immature`, `listtransactions` category `immature` and the | ||
| GUI) until they can be spent, and are not selected for spending before then, | ||
| so the wallet never creates a transaction the network would reject. | ||
|
|
||
| `getdeploymentinfo` reports the deployment as `extended_coinbase_maturity`, a | ||
| `flagday` entry with `start_time`, `expiry_time` (the RDTS expiry), `active` | ||
| (for the next block) and, once the queried chain's median-time-past has reached | ||
| the start time, `height`, the activation height on that chain. It is omitted | ||
| on chains where the deployment is not scheduled. `getblocktemplate` lists | ||
| `extended_coinbase_maturity` in `rules` while the deployment is active; no | ||
| client-side support is required. | ||
|
|
||
| On regtest the deployment is scheduled with `-extendedcoinbasematurity=<time>`, | ||
| which requires `-rdtsexpiry` and must precede it. |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rule expires with RDTS and outputs revert to
COINBASE_MATURITYat that point, so the effective lock ismin(EXTENDED_COINBASE_MATURITY, blocks until expiry). The expiry is public in chainparams, so an opportunistic miner can mine the tail of the window and pay almost nothing, while miners present at activation absorb the full six months.Is the truncation deliberate? Attaching the maturity to when the output was created rather than when it is spent would make the cost uniform, at the price of outliving RDTS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was intentional, but it's certainly still open for discussion