BIP 30 is the Bitcoin consensus rule that prevents a new transaction from overwriting an earlier transaction with the same transaction identifier while the earlier transaction still has unspent outputs. It was assigned on 22 February 2012 after a long-known duplicate-coinbase quirk was shown to have sharper consequences during chain reorganisations.
The duplicates were already in the chain
Bitcoin's historical main chain contains two pairs of duplicate coinbase transactions:
- blocks 91,812 and 91,842 share coinbase txid
d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599; - blocks 91,722 and 91,880 share coinbase txid
e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468.
Russell O'Connor documented both duplicate coinbases on 6 February 2012 while explaining why they mattered. Russell O'Connor, “Mirco… Mezzo… Macroflation—Overheated Economy”, 6 February 2012 — contemporary technical account
Chain artifacts: the duplicates are byte-for-byte real
The four occurrences can now be pinned to exact block hashes rather than only to heights:
- 91,722 —
00000000000271a2dc26e7667f8419f2e15416dc6955e5a6c6cdf3f2574dd08e— first occurrence ofe3bf3d07…5fb468; - 91,812 —
00000000000af0aed4792b1acee3d966af36cf5def14935db8de83d6f9306f2f— first occurrence ofd5d27987…d88599; - 91,842 —
00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec— repeat ofd5d27987…d88599; - 91,880 —
00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721— repeat ofe3bf3d07…5fb468.
Bitcoin Core's current consensus code hard-codes the same four chain artifacts in two different roles: IsBIP30Unspendable identifies the earlier blocks 91,722 and 91,812 whose coinbase outputs were subsequently overwritten, while IsBIP30Repeat identifies the later repeat blocks 91,842 and 91,880. Bitcoin Core validation at commit 4b612c6 — direct implementation record
The transaction bytes remove one last ambiguity. Each duplicated coinbase is a 133-byte legacy transaction. Hashing the following serializations with Bitcoin's double-SHA-256 txid rule reproduces the two historical txids:
d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff060456720e1b00ffffffff0100f2052a010000004341046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac00000000 e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff060456720e1b00ffffffff0100f2052a01000000434104124b212f5416598a92ccec88819105179dcb2550d571842601492718273fe0f2179a9695096bff94cd99dcccdea7cd9bd943bfca8fea649cac963411979a33e9ac00000000
Within each pair the transaction serialization is identical; this is not a SHA-256 collision. Both coinbases use the same six-byte scriptSig, 0456720e1b00, and each creates one 50 BTC pay-to-pubkey output. The two pair serializations differ in the public key used by that output. The decoded transaction records expose the raw bytes and identify both containing blocks; the 91,722 block record independently shows the older e3bf… transaction as its sole transaction and Merkle root. Decoded d5d279… chain record · Decoded e3bf3d… chain record · Block 91,722 chain record
The UTXO consequence is therefore more precise than saying that “two rewards share a txid.” The first occurrence in each pair initially created an ordinary output at txid:0. When the byte-identical coinbase appeared again, the database entry for that same outpoint was replaced by the later occurrence. Bitcoin Core now explicitly accounts for the earlier two outputs as BIP 30 unspendables.
Coinbases were unusually easy to duplicate because they do not spend an ordinary previous output. Before BIP 34 made the current height a required prefix in later coinbase scriptSigs, nothing in Bitcoin consensus guaranteed that two coinbase serializations mined at different heights would differ.
February 2012: a database quirk becomes a consensus problem
O'Connor's 6 February post makes the key distinction plainly: a transaction hash identifies the transaction's contents, not a unique historical occurrence of those contents. The reference client nevertheless used that hash as the database key.
When a later transaction with the same txid arrived, it could overwrite the earlier database entry. A chain reorganisation could then disconnect the later copy without correctly restoring the earlier one. O'Connor showed that this could make previously confirmed transaction state much less secure than users assumed. Contemporary demonstration and technical account
This was not a claim that SHA-256 had been broken. The two transactions had the same identifier because their serialized contents were the same.
The BIP 30 rule
BIP 30, authored by Pieter Wuille and assigned on 22 February 2012, chose a deliberately narrower rule than “a txid may never repeat”:
Blocks are not allowed to contain a transaction whose identifier matches that of an earlier, not-fully-spent transaction in the same chain.
That “not-fully-spent” condition matters. The BIP explicitly allows a fully spent transaction to be duplicated so a validating node does not need to retain permanent evidence for every transaction ever seen merely to prove that its txid never reappears. The rule protects live UTXO state rather than turning the complete historical set of txids into an eternal consensus index.
Wuille's implementation commit landed on 3 March 2012. Its commit message calls the change a network rule and records the trade-off directly: changing consensus risked a split, but leaving the overwrite behaviour unresolved carried related reorganisation risk. “Do not allow overwriting unspent transactions (BIP 30)” — direct implementation record
The first implementation applied the rule to mainnet blocks whose timestamp was after 15 March 2012 00:00 UTC. On 10 September 2012, Gregory Maxwell changed the implementation to apply BIP 30 to the whole historical chain except the two blocks that already violated it, 91,842 and 91,880. His commit explains that the wider check also closed an initial-block-download denial-of-service path involving old forks. “Apply BIP30 checks to all blocks except the two historic violations” — direct implementation record
BIP 34 reduced the problem, but did not erase BIP 30
BIP 34 required later coinbase transactions to begin their scriptSig with the current block height. That makes two ordinary post-BIP-34 coinbases at different heights naturally different at the serialization level.
In 2015, Bitcoin Core PR #6931 used that relationship as an optimization: once the known chain was past BIP 34 activation and clear of the two historical duplicate chains, Core could skip the more expensive BIP 30 UTXO-overwrite check. Bitcoin Core PR #6931 — “Skip BIP 30 verification where not necessary”
The shortcut turned out to need a boundary. In 2018, PR #12204 documented that some pre-BIP-34 coinbase scripts happen to begin with bytes that can be interpreted as a valid future BIP-34 height. A future coinbase at that height could therefore reproduce an old coinbase serialization despite obeying BIP 34.
The review's exhaustive search found the earliest relevant indicated heights as 209,921, 490,897 and 1,983,702. The first was still inside explicit BIP 30 enforcement; the second was analysed and passed with a different coinbase. The merged fix made Bitcoin Core resume explicit BIP 30 checking from height 1,983,702 onward. Bitcoin Core PR #12204 — direct 2018 correction · Current enforcement code
So the durable version is a little less tidy than the usual summary. BIP 34 makes duplicate coinbases structurally avoidable across the normal post-activation chain, but historical pre-BIP-34 script bytes mean BIP 30 still has a future consensus role in current Bitcoin Core.
A proposed way to retire the check
The later BIP 54 Consensus Cleanup specification proposes preventing future duplicate coinbases by constraining the coinbase transaction's nLockTime to the previous block height (along with an nSequence requirement). If adopted on Bitcoin mainnet, this would make continued BIP 30 checking unnecessary beyond activation, rather than simply assuming BIP 34 solved every historical edge case. BIP 54 also addresses a separate Merkle-tree ambiguity involving 64-byte transactions. BIP 54, specification and rationale
The BIP was marked Complete as a specification on 22 May 2026; that does not mean these rules have activated on Bitcoin mainnet. Experimental activation on the Bitcoin Inquisition signet was reported at block 291,168 in February 2026. Do not project a test-network rule onto the historical main chain. Antoine Poinsot's first-party test-network status · BIP changelog
Why Ordinal theory inherits this scar
Ordinal theory tracks satoshis through Bitcoin transaction inputs and outputs. To reproduce Bitcoin's historical UTXO behaviour, it cannot pretend the duplicate-txid blocks never happened.
The Ordinal Numbers draft therefore carries an explicit displacement rule: if a transaction is mined with the same txid as outputs currently present in the UTXO set, the newer outputs displace the older entries, and sats contained in any still-unspent outputs of the first occurrence are treated as destroyed. The draft names the same two mainnet pairs: 91,812/91,842 and 91,722/91,880. Ordinal Numbers draft — application-layer rule
This is a useful boundary between Bitcoin and Ordinals. Bitcoin consensus determines which outpoints survive. Ordinal theory then has to decide what that consensus history means for the serial identities it assigns to sats. The exception is not an Ordinals invention; it is inherited from an early Bitcoin identity collision.
Related pages
Open research
Recover the February–March 2012 developer discussion around BIP 30 and distinguish O'Connor's demonstrated technical result, the BIP's stated rationale, and any additional concerns considered during review.