Bitcoin Forum
May 10, 2024, 01:40:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Handling of a duplicate transaction across 2 blocks  (Read 795 times)
dbbit (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
March 16, 2014, 05:25:32 AM
 #1

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.
1715305254
Hero Member
*
Offline Offline

Posts: 1715305254

View Profile Personal Message (Offline)

Ignore
1715305254
Reply with quote  #2

1715305254
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715305254
Hero Member
*
Offline Offline

Posts: 1715305254

View Profile Personal Message (Offline)

Ignore
1715305254
Reply with quote  #2

1715305254
Report to moderator
1715305254
Hero Member
*
Offline Offline

Posts: 1715305254

View Profile Personal Message (Offline)

Ignore
1715305254
Reply with quote  #2

1715305254
Report to moderator
amspir
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
March 16, 2014, 06:29:43 AM
 #2

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.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12982


View Profile
March 16, 2014, 06:35:30 AM
Last edit: March 16, 2014, 06:45:46 AM by theymos
 #3

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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
amspir
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
March 16, 2014, 06:43:11 AM
 #4

I stand corrected.
dbbit (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
March 16, 2014, 09:25:51 AM
 #5

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?
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12982


View Profile
March 16, 2014, 04:44:12 PM
 #6

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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!