bip54: exempt genesis from coinbase checks #2326

pull nervana21 wants to merge 1 commits into bitcoin:master from nervana21:bip54-skip-genesis changing 1 files +1 −2
  1. nervana21 commented at 1:11 PM on October 6, 2026: contributor

    The BIP54 reference implementation skips genesis when checking the new coinbase locktime and sequence rules. However this wasn't specified in the BIP.

    Update the BIP to reflect that genesis is exempt from these checks.

  2. bip54: exempt genesis from coinbase checks 9e6827efa4
  3. fametrano commented at 6:13 AM on October 9, 2026: contributor

    Concept ACK. All 7 cases in bip-0054/test_vectors/coinbases.json start from the mainnet genesis block. Its coinbase has nLockTime 0 and nSequence 0xffffffff, so the rule as written makes all of them invalid. bitcoin/bitcoin#35793 also skips the check at height 0.

    The timewarp rule has the same gap: at N=0 there is no T<sub>N−1</sub>, and timestamps.json also starts from genesis. One sentence could exempt genesis from both rules.

  4. in bip-0054.md:80 in 9e6827efa4
      75 | @@ -76,8 +76,7 @@ separately:
      76 |  
      77 |  Transactions whose witness-stripped serialized size is exactly 64 bytes are invalid.
      78 |  
      79 | -The coinbase transaction's `nLockTime` field must be set to the height of the block minus 1[^2]
      80 | -and its `nSequence` field must not be equal to 0xffffffff.
    


    murchandamus commented at 1:15 AM on October 16, 2026:

    This change seems incorrect and redundant to me. In technical writing, usually specific rules beat general rules. So, the proposed phrasing implies that all blocks except the Genesis block would have to follow this rule. However, such a rule would cause the entire blockchain after the Genesis block to be invalid.

    The specification section starts with “For all blocks after activation the following new rules apply” (emphasis added), which is the accurate range of blocks for which this rule applies. Obviously, the soft fork cannot activate before or on the Genesis block in mainnet, and testnet5, is also proposed to activate the rules on block 1 rather than applying it for the Genesis block.

    So, this rephrasing seems like a disimprovement to me.

  5. murchandamus added the label Proposed BIP modification on Oct 16, 2026
  6. murchandamus added the label Pending acceptance on Oct 16, 2026
  7. murchandamus commented at 4:09 AM on October 16, 2026: member

    cc: @darosior

  8. darosior commented at 7:32 AM on October 16, 2026: member

    I agree with @murchandamus. This is already covered (for all checks, not only the nLockTime one) by

    For all blocks after activation the following new rules apply.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-18 07:49 UTC