How does blockchain.info detect double spends?

8

1

http://blockchain.info/tx-index/242749/36080ed09eeb0fd66ad5dc8a909a49e364f55ff860c12327c2ff9fbe4a9dde77

Warning! this transaction is a double spend. You should be extremely careful when trusting any transactions to/from this sender.

ripper234

Posted 2012-03-02T08:38:33.320

Reputation: 25 192

Answers

5

All valid transactions are relayed through the network. A client does not know which transactions will be a part of a block, so it stores and relays both double-spent transactions. If you regularly poll your bitcoind, you can see every transaction before it is put in a block. Then it is just a matter of checking txin data for duplicate inputs.

ThePiachu

Posted 2012-03-02T08:38:33.320

Reputation: 41 594

3

The bitcoin network does NOT relay unconfirmed transactions that double spend other unconfirmed transactions, so neither blockchain.info not anyone else sees most unconfirmed double-spends. Nodes do not store two conflicting spends - they store only the first one they see.

This is becoming a bigger challenge for merchants because they need to connect to thousands of nodes in the hope of spotting double-spends.

The Bitcoin XT patch set is an early release of functions that are proposed for Bitcoin Core. It does relay double spends, and notifies the wallet of double-spend attempts that affect it.

Tom Harding

Posted 2012-03-02T08:38:33.320

Reputation: 336