Conversation
…ions The "Miner forward compatibility" section stated that Bitcoin Core 29.0 and later will not generate a block template violating "the timestamp restrictions introduced in this BIP", but this BIP introduces two of them. Bitcoin Core 29.0 only accounts for the restriction on the timestamp of the first block of a difficulty adjustment period. The restriction on the timestamp of the last block of a period is only accounted for by the block template code as of Bitcoin Core 32.0 (bitcoin/bitcoin#35949), so versions 29.x through 31.x do not satisfy the blanket wording. Since the two restrictions no longer share a sentence, also scope the grace-period explanation to the first one (the last-block restriction has no grace period) and qualify the `curtime`/`mintime` advice, which only guarantees a valid timestamp on a version accounting for both restrictions.
70fd27d to
a1957ee
Compare
There was a problem hiding this comment.
ACK modulo open questions by the PR author for BIP author feedback cc @darosior. Thank you for adding the Version header. Note that this PR presumes that recently merged bitcoin/bitcoin#35949 is not backported.
|
Thanks for the review. Right, the wording presumes bitcoin/bitcoin#35949 is not backported. Nothing appears to be in flight: it was merged to master under the 32.0 milestone with the The two open questions for @darosior are the |
Summary
The "Miner forward compatibility" section currently says:
This BIP introduces two timestamp restrictions (Specification, given a block at height
N):N % 2016 == 0: TN ≥ TN−1 − 7200N % 2016 == 2015: TN ≥ TN−2015Bitcoin Core 29.0 only accounts for the first one. It gained that in bitcoin/bitcoin#31376 (
miner: never create a template which exploits the timewarp bug), withgetblocktemplate'smintimefollowing in bitcoin/bitcoin#31600; both are first contained inv29.0. (28.0 already had the template-side adjustment, but gated onenforce_BIP94, so it applied to testnet4/regtest only — 29.0 is the first release where it is unconditional andmintimeagrees with it.)The second restriction was only added to the block template code in bitcoin/bitcoin#35949 (
miner: Enforce Murch-Zawy rule (BIP54)), merged 2026-09-07 and so far contained only inv32.0rc1. I checked the 29.x, 30.x and 31.x stable tags for a backport; there is none.Both rules live in the same
GetMinimumTime()helper, which feeds the template header viaUpdateTime()andgetblocktemplate'smintime/curtimealike, so templates and the RPC fields gain each restriction at the same time.So versions 29.x through 31.x do not satisfy the blanket wording, which this PR corrects.
Changes
curtime/mintimeadvice. It previously promised blocks "valid according to this proposal", which is not true on 29.x–31.x at the last block of a period — exactly the gap the version split makes explicit.[Core 32.0]link definition, and a1.0.1changelog entry with the matchingVersionheader.No normative change; this only makes the implementation timeline and the miner guidance accurate.
Open questions for the author/editors
v32.0rc1), sohttps://bitcoincore.org/en/releases/32.0404s until it ships. I used the release-page URL for consistency with the[Core 0.16.1],[Core 29.0]and[Core 30.0]definitions —[Core 30.0]was likewise added after 30.0 shipped. Happy to point it at miner: Enforce Murch-Zawy rule (BIP54) bitcoin#35949 instead (there is in-file precedent in[Core BIP 54 implem]), or to hold this until 32.0 is out. Your call.1.0.1and theVersionheader that BIP3 also requires once a changelog exists. The three previous post-Complete edits to this file did not bump it, so if you consider this too minor to record, I will drop that part.mintime"already leads to creating an invalid block". That is not categorically true: Core's template floor usesMAX_TIMEWARP = 600while this BIP permitsTN−1− 7200, so a timestamp in between is belowmintimeyet valid. Left alone as out of scope — let me know if you want it corrected in the same PR.