Repository navigation
Consensus: Extended coinbase maturity temporary softfork (expires with RDTS) - #402
chrisguida wants to merge 7 commits into
Conversation
| } | ||
|
|
||
| /** Whether the extended coinbase maturity rule applies to a block whose | ||
| * parent has the given median-time-past. It expires with RDTS, so it is |
There was a problem hiding this comment.
The rule expires with RDTS and outputs revert to COINBASE_MATURITY at that point, so the effective lock is min(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.
It was intentional, but it's certainly still open for discussion
| static const int COINBASE_MATURITY = 100; | ||
| /** Coinbase maturity applied by the temporary extended-maturity soft fork to coinbase outputs created | ||
| * while it is active: about six months of ten-minute blocks (see Consensus::Params::ExtendedCoinbaseMaturityActiveAt) */ | ||
| static const int EXTENDED_COINBASE_MATURITY = 26280; |
There was a problem hiding this comment.
Duration is a block count while activation and expiry are median-time-past. 26280 is six months only at 600s, so the realized delay drifts with difficulty while the boundaries don't.
There was a problem hiding this comment.
yeah maybe this is a bad design, i'll make a new branch that uses mtp and we can have both on the table
|
Tested f7b36e2 on Ubuntu 24.04, gcc 13.3, wallet on, no GUI. Unit I also ran a case this branch's test does not cover: a peer that does not enforce the rule mines a block spending an in-window coinbase at 100 confirmations, and the enforcing node has to refuse that block, hold its own tip against the longer chain, and take the other node back once its own chain has more work. It does, the rejected block shows as On the block count, you already say it could be as little as two months depending on hashrate. On this chain that is the current case rather than the corner. Mean spacing measured from the node here, 2026-09-11 at height 970821:
So the rule buys somewhere between 33 and 68 days depending on which window you measure, not 182.5. The spread across those windows is the other half of it: the realized lock is not only short, it is not predictable, because the hashrate here is still moving. The script is in the same gist. The release note is where that matters most. "Block rewards mined inside the window cannot be spent for six months" is the claim that does not hold; the first paragraph's "26280 blocks (about six months of ten-minute blocks)" is accurate and the Miners paragraph should read the same way. nit: |
…xpiring with RDTS
…tinfo and getblocktemplate
f7b36e2 to
547fe3e
Compare
Temporarily extend coinbase maturity to 26280 blocks (~6 months, could be as little as 2 months depending on hashrate), to deter opportunistic mining and give honest miners an edge. Expires with RDTS. Mainnet/testnet params unset for now, activates with a flag day as soon as the community agrees.
Edit: Changed 6 months to 45 days based on community polls