Take the 2-minute tour ×
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

I'm having trouble understanding the bug that was fixed in BIP030, and how it would be exploited.

Is the premise of this attack that there would have to be a netsplit and the chain was forked, then subsequently rolled back the old transactions?

What would the validation psuedo-logic of the following look like?

There are several potential solutions to this problem:

  • Guarantee that all coinbases are unique, making duplicate transactions very hard to create.
  • Remember previous remaining outputs of a given transaction identifier, in case a new transaction with the same identifier is added.
  • Only allow duplicate transactions in case the previous instance of the transaction had no spendable outputs left. Removing a block from the chain can then safely reset the removed transaction's outputs to nothing.

The reason I'm asking is so I can develop additional validation rules that work in parallel with the existing client.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The problem was that in case a duplicate transaction was created in a side branch that is afterwards reverted, and is only seen by a certain portion of the network, a fork risk exists. The nodes A that have seen the duplicate transactions and its reversal, will consider the original transaction unspendable (as it was overwritten and subsequently removed from their transaction database in the reorganisation), while nodes B that did not see the duplicate would consider the original spendable. When the original transaction is spent afterwards, and a majority of the network is in B, the network will split, as the A nodes will consider the chain created by B as invalid.

The third solution presented is implemented by BIP30 - this was a stopgap solution to prevent the worst from happening. A more complete solution (the first one) being deployed as BIP 34

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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