Author

Topic: Handling of a duplicate transaction across 2 blocks (Read 785 times)

administrator
Activity: 5222
Merit: 13032
Is it legal for the second transaction to have different vins and vouts?

i.e. When you say "a single transaction can still exist in more...", is it basically legal for a new transaction to just re-use any old (spent) transaction ids, or must the second transaction be identical to the first?

Now that I think about it more, I don't think that duplicate transactions are possible anymore. Non-coinbase transactions can't be duplicated because their inputs will be double-spends, and a rule was added a while ago that coinbase transactions must include the block height in their inputs, which prevents them from being duplicated.
sr. member
Activity: 322
Merit: 250
It's not a duplicate transaction, the miner just assigned the outputs of the each of the mined blocks to the same address.

No, it really is a duplicate transaction.

Allowing this was a bug in the Bitcoin protocol. It's no longer possible for one transaction in the block chain to make another transaction in the same chain unspendable. However, a single transaction can still exist in more than one block if the older copy is completely spent before the newer transaction is added.

Thanks for the answer!

Is it legal for the second transaction to have different vins and vouts?

i.e. When you say "a single transaction can still exist in more...", is it basically legal for a new transaction to just re-use any old (spent) transaction ids, or must the second transaction be identical to the first?
member
Activity: 112
Merit: 10
I stand corrected.
administrator
Activity: 5222
Merit: 13032
It's not a duplicate transaction, the miner just assigned the outputs of the each of the mined blocks to the same address.

No, it really is a duplicate transaction.

Allowing this was a bug in the Bitcoin protocol. It's no longer possible for one transaction in the block chain to make another transaction in the same chain unspendable. However, a single transaction can still exist in more than one block if the older copy is completely spent before the newer transaction is added.
member
Activity: 112
Merit: 10
It's not a duplicate transaction, the miner just assigned the outputs of the each of the mined blocks to the same address.  The reward from each block was 25 btc, the address now contains 50 btc.  It looks strange because blockchain doesn't indicate multiple mined blocks as the input.
sr. member
Activity: 322
Merit: 250
How does the following happen?
https://blockchain.info/tx/d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599

This same transaction occurs as the coinbase transaction for both block 91812 and 91842.


It hasn't been spent, but it's obviously not spendable from both blocks. So one of the mined blocks actually did not get any reward.


I can imagine 1 miner screwing that up but I would have thought additional confirming miners would have thrown out the duplicate transaction, no?


Is this a common occurrence that we need to take into account, or is it a weird anomaly?

Obviously blockchain.info coded around that, by allowing the same transaction to be displayed in 2 blocks.
Jump to: