[Bitcoin-development] Duplicate transactions vulnerability

Pieter Wuille pieter.wuille at gmail.com
Tue Feb 28 17:18:12 UTC 2012


On Tue, Feb 28, 2012 at 18:12, Brautigam Róbert
<robert.brautigam at netmind.hu> wrote:
>> A simple way to fix this, is adding an extra protocol rule[1]:
>>
>>    Do not allow blocks to contain a transaction whose hash is equal to
>> that of a former transaction which has not yet been completely spent.
>
> I don't know whether I understand this correctly, but there should be no
> duplicate transaction hashes at all. So the rule should be: Do not allow
> blocks to contain transaction hashes which are already present in that
> branch.

As explained in the BIP, that would prevent pruning, as it would
require each full node to keep a database with all transaction hashes
ever.

> If by a freak accident a transaction has the same hash as another
> transaction in the chain, shouldn't the transaction be "tweaked" in some
> way to avoid collision (generate a new target address for it or
> something)? In any case this seams very-very unlikely to happen, or am I
> missing something?

It won't happen by accident. Duplicate coinbase transactions are
possible however (by badly written software, or malicious intent).
Transactions that spend duplcate coinbases can be made to have the
same hash as well.

-- 
Pieter




More information about the bitcoin-dev mailing list