Repository navigation
Consensus: Extended coinbase maturity temporary softfork (expires with RDTS) (MTP variant) - #403
chrisguida wants to merge 7 commits into
Conversation
|
Concept ACK |
|
Can we add in the code an automatic extension of original amount of days if the threat still exists? |
|
Tested 9cdd536, same build and the same set of tests as #402, all pass, including the non-enforcing-peer case I described there. Worth saying that this branch's own test runs in 2 seconds against 166 for #402, because it does not have to mine 26280 blocks to reach the boundary, and it covers two things #402's cannot reach cheaply: a reorg that drops the median back below the maturity time, and the wallet going from immature to trusted. Median-time-past answers the units point, and the spacing I measured on #402 says that was the substantive one on this chain. But it moves the other finding rather than leaving it where it was. The lock is still the smaller of the rule and the time left before the RDTS expiry, so an output created a day before expiry still serves a day. Raising the nominal term from what 26280 blocks currently buys, about 51 days, to a real 182.5 days raises the longest lock without moving the shortest. Every individual lock is at least as long as it would be under #402, so this is not a regression, but the gap between a miner present at activation and one starting at the tail of the window goes from roughly 51 days to roughly 182.5. That gap is the thing Kyle was pointing at, and this branch widens it by three and a half times. It also puts a date on the flag day. RDTS expires 2027-09-01, so activation has to fall before 2027-03-02 for any output at all to serve a full six months, which is 172 days from today. After that the expiry, not this rule, sets every lock. Kyle's suggestion on #402, fixing the requirement when the output is created and letting it outlive RDTS, is the shape that closes this, and neither branch does it. If the truncation stays deliberate, I would put it in the release note in those words: outputs created late in the window are locked until the expiry and no longer. That is the sentence a miner deciding when to start will look for, and right now it is only derivable from the "including those created during the window that had not yet served their six months" clause. Three small things:
|
…xpiring with RDTS
… the soft fork is active
…tinfo and getblocktemplate
9cdd536 to
0aaaccb
Compare
|
Concept ACK |
2 similar comments
|
Concept ACK |
|
Concept ACK |
|
Built this branch and ran it on regtest. Three things, one with a patch. Everything covered unlocks in one block at expiry ( The release notes call this out, but the size of it is worth seeing. Three covered coinbases, expiry scheduled 10 days after the start, all well past 100 confirmations: They unlock at 22% of the required maturity, together, so whatever the tail of the window was buying is handed back in a single block. Dropping the early return at 299 leaves the creating-block test at 303 to establish coverage on its own: each coin then serves its own 45 days from its own block, and the release is spread over 45 days instead of landing at once. #404 and #409 both make the schedule stick to the coin for this reason. The window cannot end before the RDTS expiry (
Patch on top of your head commit, if it is useful: https://github.com/privkeyio/bitcoin/tree/extended-coinbase-maturity-end-time It adds This only moves when the window ends, so it is orthogonal to the first point: with a 30-day window the batch unlock lands 30 days in rather than a year in. Minor ( Coverage anchors on |
MTP variant of #402