Post
Topic
Board Development & Technical Discussion
Re: Unspent outputs
by
piotr_n
on 03/06/2013, 08:05:06 UTC
There were two instances of broken miners which created the same coins twice. Because of the way the software was written, with an implicit assumption that txids were unique, the second coins overwrote the first. The creator of those coins destroyed them, not anyone else.
Are you sure?
My understanding was that the previous Berkeley DB could handle no-unique keys and up to that moment all those transactions were spendable.
Moreover it was a well known fact that coinbase transactions could have the same ID and it was just openly allowed by the protocol, though not used too often. I believe there was even an explicit comment in the source code saying that same TXID is allowed for coinbase transactions.
So that could had been a design or implementation flaw, but it definitely was not considered as a "broken miner", neither "the same coins twice" - at least like two years ago, but I understand that history books can adopt quickly to a new reality Wink

After switching to LevelDB the same keys (representing TXID) just merged into each other, became undistinguished in the DB, and only since that very moment coinbase with same ID have not been spendable anymore.
But before, with Berkeley DB you could spend them, as many times as they had been mined - at least that was my understanding, so please correct me if I'm wrong.