Is it possible to recognize conflicting 0-confirmation transactions with the Bitcoin client or other available software?


Is there already a way to detect conflicting 0-confirmation transactions? I'm assuming at least one transaction goes to my wallet.

I would expect the client to list the transaction as conflicting but from what I understand from What does the Bitcoin client do when it receives conflicting transactions? it currently does not do so? Is there any other way available?


Posted 2012-01-18T10:09:21.860

Reputation: 1 909

How about conflicting n-confirmation transactions? What does the client do when it finds two heads for the block chain? Any alerts to the user? – Thilo – 2012-03-20T05:39:47.260

@Thilo: the longest chain always wins. I would expect a block with conflicting transactions to be invalid. Currently there are no user alerts, conflicting transactions will simply not be relayed. – kermit – 2012-03-29T07:50:09.817



A merchant can lessen the risk of being defrauded in a race attack (on 0/unconfirmed) by:

  • Using an explicit list of peers to connect to (with most of the known IP addresses of miners)
  • Not allowing incoming connections (turn off uPnP)

this still leaves the merchant vulnerable to a 51% attack that all transactions below 6 confirmations are subject to but also to the Finney attack and another type of attack even where 2 confirmations is required (as described by vector76 here: )

What you are asking for is a solution that would be useful for merchants who can absorb some risk that comes with accepting a bitcoin transaction at 0/unconfirmed. Currently there is only a trivial number of merchants that accept bitcoin at a retail establishment. And thus, no solution provider -- yet.

There is an API to the service which might make it possible to monitor for double spend attempts.

Some useful conversations related to this topic:

Stephen Gornick

Posted 2012-01-18T10:09:21.860

Reputation: 26 454

Thanks for the info and the links. From what I learned it is not possible with the bitcoin client as such because conflicting transactions will not be relayed. Listening to lots of nodes and analyzing their stand like does seems to be what comes closest to detecting conflicting transactions.

– kermit – 2012-01-19T12:28:18.517