From a1957eeb30203321aff1a4d752bc0f648d4c45d1 Mon Sep 17 00:00:00 2001 From: Allan Douglas Date: Fri, 18 Sep 2026 01:23:10 +0000 Subject: [PATCH] bip-0054: distinguish miner enforcement of the two timestamp restrictions 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. --- bip-0054.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/bip-0054.md b/bip-0054.md index eafef13dd8..00407d2f29 100644 --- a/bip-0054.md +++ b/bip-0054.md @@ -8,6 +8,7 @@ Type: Specification Assigned: 2025-04-11 License: CC0-1.0 + Version: 1.0.1 ``` ## Abstract @@ -136,11 +137,16 @@ strongly encourage node operators to upgrade in order to fully validate all cons ## Miner forward compatibility Bitcoin Core version [29.0][Core 29.0] and later will not generate a block template that violates -the timestamp restrictions introduced in this BIP. Although it would be extremely unlikely due to -the grace period used in this proposal, miners should use the `curtime` or `mintime` field from the -`getblocktemplate` result for their block's timestamp to make sure they always create blocks valid -according to this proposal. Note this is not a new requirement: using a timestamp lower than the -`mintime` field from the `getblocktemplate` result already leads to creating an invalid block. +the restriction on the timestamp of the first block of a difficulty adjustment period introduced in +this BIP. Bitcoin Core version [32.0][Core 32.0] and later will also not generate a block template +that violates the restriction on the timestamp of the last block of a difficulty adjustment period +introduced in this BIP. Although it would be extremely unlikely (for the first restriction due to +the grace period used in this proposal, and for the second because the duration of a difficulty +adjustment period should never be negative), miners should use the `curtime` or `mintime` field +from the `getblocktemplate` result of a version which accounts for both restrictions for their +block's timestamp to make sure they always create blocks valid according to this proposal. +Note this is not a new requirement: using a timestamp lower than the `mintime` field from the +`getblocktemplate` result already leads to creating an invalid block. Bitcoin Core version [30.0][Core 30.0] and later will not generate a block template including a transaction that violates the signature operations limit introduced in this BIP. @@ -178,6 +184,9 @@ This document is licensed under the Creative Commons CC0 1.0 Universal license. ## Changelog +* __1.0.1__ (2026-09-18): + * Clarify which Bitcoin Core versions account for each of the two timestamp restrictions when + generating a block template. * __1.0.0__ (2026-05-22): * Complete planned work on the BIP. @@ -262,6 +271,7 @@ MERKLEBLOCK] for a full description. [Core 29.0]: https://bitcoincore.org/en/releases/29.0 [Core BIP 54 implem]: https://github.com/bitcoin/bitcoin/pull/35793 [Core 30.0]: https://bitcoincore.org/en/releases/30.0 +[Core 32.0]: https://bitcoincore.org/en/releases/32.0 [Core validation.cpp BIP34]: https://github.com/bitcoin/bitcoin/blob/390e7d61bd531505bb3d13f38316c282b85ed1dd/src/validation.cpp#L2401-L2459 [miningdev nLockTime]: https://groups.google.com/g/bitcoinminingdev/c/jlqlNHHNSNk [ML remaining concerns]: https://gnusha.org/pi/bitcoindev/UsKuvCXXhSAnNVx5a0K2UfP3srAr3slW9mcOjtYk9LnolaOXfWrW9jpqbxsQQPkyQuZogkhz2Hbfwii2VsTm79vRDpgKduxk35hpBu_t7Do=@protonmail.com/