Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ondrere on April 04, 2020, 08:54:28 AM



Title: Two identical coinbase transactions?
Post by: ondrere on April 04, 2020, 08:54:28 AM
Any non-coinbase transaction has some inputs. They contain previous transaction hashes, so as long as hash function is not broken, they are always unique. But what about coinbase transactions? In this case all inputs are ignored, so it is possible to create two identical coinbase transactions and place them in two different blocks. What happens when someone wants to spend these coins?


Title: Re: Two identical coinbase transactions?
Post by: Last of the V8s on April 04, 2020, 09:06:07 AM
https://bitcoin.stackexchange.com/questions/80644/identical-coinbase-transactions
I'd like to say it was possible, it happened once and was dealt with, but let's wait for someone more with-it to confirm/refute.

Anyway, in general, consult that stackexchange. Most questions have been asked and most of them answered satisfactorily.


Title: Re: Two identical coinbase transactions?
Post by: baro77 on April 04, 2020, 09:51:54 AM
Referring to this thread: https://bitcointalk.org/index.php?topic=5237590 (https://bitcointalk.org/index.php?topic=5237590)

BIP34 states the block height has to be written in coinbase transaction, so I guess duplicate coinbase transactions could exist only during a temporary chain split due to simultaneous mining of two blocks with coinbase recipient ODDLY being the same for both of them... anyway eventually disappearing during reorg

That said, I didn't know @Last of the V8s's more general answer, so thanks to both of you!

baro


Title: Re: Two identical coinbase transactions?
Post by: domob on April 04, 2020, 10:59:52 AM
That was possible and actually happened, which is why BIP30 and then BIP34 were introduced as far as I remember.