6

BIP34 requires coinbase transactions to begin with a data push of the block's height.

The coinbase transaction in block 164384 (3aa03753fc) happens to start with OP_PUSHBYTES_3 d6441e which is the value 1983702.

Is it possible for the miner of block 1983702 to use the exact same coinbase transaction from block 164384?

If so, would this be a supply inflation bug?

Or is this mitigated by BIP30?

Blocks are not allowed to contain a transaction whose identifier matches that of an earlier, not-fully-spent transaction in the same chain.

Currently that transaction is not yet fully spent, but that could change before block 1983702.

If this is still a possible issue, how could it be resolved before then?

3 Answers 3

7

It would be possible for block 1,983,702 to repeat the coinbase transaction of block 164,384 under these three conditions:

  • The block does not collect any segwit transactions, otherwise a witness commitment would need to be present on the coinbase transaction¹
  • The block collects at least 169.9153'4375 ₿ in fees, to pay 170.01300000 ₿ to outputs while the block subsidy is only 0.0976'5625 ₿ (but the miner could just include a transaction that pays that fee)
  • The miner is a complete dunce and is willing to hand a fortune to the recipients of block 164,384’s coinbase outputs, for the sake of repeating a coinbase transaction

Either way, there never was a supply inflation issue: when an unspent output gets overwritten, it is created twice but can only be spent once. Therefore, the supply is reduced not increased.² Since all seven outputs from the block 164,384’s coinbase already have been spent repeating the coinbase transaction would not lead to supply deflation or any other issues. If they were not spent yet, BIP30 would prevent repeating the coinbase transaction and cause the block to be invalid.²

Overall, I am pretty confident that this is a nothingburger.


¹ H/T @LeaBit, who made that point first
² H/T @PieterWuille, who suggested that I mention this in comments

1
  • 1
    thanks, that makes sense now. i mistakenly thought the previous block subsidy could be replayed, but obviously the subsidy depends solely on the block height.
    – delta1
    Dec 9, 2023 at 7:53
5

Yes, it is possible for block 1,983,702 to duplicate the coinbase of block 164,384 with the current consensus rules.

Starting with block 1,983,702 the explicit BIP30 check will be re-enabled (see this answer for details). However all outputs from 3aa03753fc238b38f4db9e5889362f3a6f0900d602baa8c9a7e789cb13ca1462 were spent. There is not any UTxO with txid 3aa03753fc238b38f4db9e5889362f3a6f0900d602baa8c9a7e789cb13ca1462 in the UTxO set anymore. Therefore a block at height 1,983,702 with the very same coinbase as block 164,384 would be valid.

If so, would this be a supply inflation bug?

No. If someone wanted to create a duplicate UTxO by duplicating one of the spenders of 3aa03753fc238b38f4db9e5889362f3a6f0900d602baa8c9a7e789cb13ca1462 (if at all possible, i haven't checked), this would still be prevented by BIP30.

1
  • 1
    Has anyone done the analysis on whether any of the descendants of 3aa037 can be duplicated? Would buy us a few more decades :-) Dec 19, 2023 at 20:14
2

If the block contains at least one segWit transaction, the coinbase transaction must have a witness commitment as one of its outputs. Therefore, a miner that wants to reuse the coinbase transaction would need to exclude all segwit transactions from their block. Since the vast majority of transactions use segwit today, this would severely limit the block’s mining reward potential.

So, even if the input of two coinbase transactions is the same, the outputs (due to witness commitment) cannot match.

Therefore, the supply deflation bug will not occur because it will be two completely different transactions with two completely different IDs.

1
  • You could for example edit your answer to say: "If the block contains at least one segWit transaction, the coinbase transaction must have a witness commitment as one of its outputs. Therefore, a miner that wants to reuse the coinbase transaction would need to exclude all segwit transactions from their block. Since the vast majority of transactions use segwit today, this would severely limit the block’s mining reward potential."
    – Murch
    Dec 8, 2023 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.