4

Is there a quick and dirty way to detect all transactions whose tx-id can be found in more than one transaction since the genesis block?

I would also like to see mutated transactions as well although I am not sure if the blockchain keeps a historical track of the mutated transactions.

  • Are you asking for duplicate transactions, that is 2 transactions with the same id? If so there aren't any. – ike Dec 26 '14 at 18:39
  • @ike how did you come up to this conclusion? Tx-ids are not supposed to be unique bitcointalk.org/index.php?topic=28387.0 – Doug Peters Dec 26 '14 at 18:47
  • They are sha-256 hashes, and it would take more computing power than exists in the world to create one deliberately. You want to look for an improbable scenario to make sure it didn't happen? I'm sure there are people who've searched and found none; if there was, we'd hear about it. – ike Dec 26 '14 at 18:49
  • In the same way that I didn't just generate your private key on my computer. – ike Dec 26 '14 at 18:50
  • @ike I understand that the propabilty for this to happen is close to zero but not zero and that the 55 million txs that took place since genesis in total is not even close to what it would normally take to brute-force the sha256 algo, all I am asking is if there is a handy way to query the bitcoin network for such scenarios. – Doug Peters Dec 26 '14 at 19:03
5

Is there a quick and dirty way to detect all transactions whose tx-id can be found in more than one transaction since the genesis block?

There are multiple ways to read your question.

Are there cases where the same transaction has been included into the blockchain multiple times?

Yes. There is one recorded instance of the same coinbase appearing twice. The problem this causes is that only one of these can be redeemed. It also makes it possible to reduce a fully-confirmed transaction to one confirmation, though I don't understand the details. BIP34 fixed this.

Are there cases where the same input hash appears in multiple transactions?

Yes. It happens all the time. For example, transaction 9fa3... has two outputs. Those two outputs were spent by two different transactions. Each transaction needed to include the same input hash (though the vout field was different.)

Are there are any known collisions in SHA256?

No.

I would also like to see mutated transactions as well although I am not sure if the blockchain keeps a historical track of the mutated transactions.

It doesn't.

  • Thanks, Nick. "There are multiple ways to read your question." What I need is a fast way to query the blockchain: SELECT TxId, COUNT(*) c FROM blockchain GROUP BY TxId HAVING c > 1; – Doug Peters Dec 26 '14 at 22:28
  • @DougPeters Is that different from the first interpretation of your question? – Nick ODell Dec 26 '14 at 22:31
  • Not really, I was just wondering if you are aware of a neat way to achieve this without having to look it up on blockchain.info or any other third-party service. – Doug Peters Dec 26 '14 at 23:52
0

The coinbase transactions e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468 and d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599 both exist in two blocks.

This problem was solved in BIP30 so this cannot happen again.

BIP30 also dictates that it is the newest version of these transactions that is spendable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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