0

It shouldn't be as simple to do a double spend. I think I am missing something here. I understand Consensus rules and P2P networking. But since a node is connected only to some limited number of other peers, So a subset of nodes will only know a limited reality of blocks among these peers at least at a given point of time. Wouldn't this allow easy possibility of double spend?

For example sake, let's assume there are only 6 nodes globally and they happen to get following pairing to peers.

**Set 1**
1<-->2      
2<-->3  
3<-->1
**Set 2**
4<-->5  
5<--6>  
6<-->4

It leads to kind of two sets of isolated groups of 3 each. Let's assume now Adam's wallet is connected to node 4 and does a transaction. How will this be relayed to nodes 1, 2 and 3? Adam in my example can leverage this to do a double spend by doing transaction by connected to nodes in set 1 now.

1

Staying well connected is important to bitcoin nodes and miners. Special relay networks such as the Bitcoin Fibre Network exist to ensure new blocks are communicated quickly, and to prevent network fragmentation.

In your example, some subset of nodes have become fragmented from the network. If you sent a tx to those nodes, they would not be aware if it was a double spend, so they may store it in their mempools.

However, transactions need to be confirmed by miners, so if no miners are in the fragmented network, then those nodes would simply wait endlessly to hear about a new block. If the rest of the network knows about the other tx in the double spend, and has confirmed it in a block, then the fragmented nodes would simpy drop the tx they heard about once they reconnect and get the updated blockchain. Any UTXO can only be spent once on the blockchain, a second attempt would be invalid.

It is unlikely a miner would be fragmented, due to the existence of things like the Fibre network I linked to above. Miners are heavily incentivized to ensure they have good connectivity to the network. Anything less than that means they could lose money by mining on the wrong chain.

So, I hope you can see that if a situation arose in which the network became fragmented, then it could be possible to get a double spent tx into the fragmented node's mempools undetected. However getting the doublespent tx confirmed is unlikely, due to good miner connectivity (very low chance of miner fragmentation). So as long as users wait for transaction confirmation (ie not a 0-conf tx), they will be at little risk of being double spent against. Usually 6 confirmations is the recommended waiting period for high value transaction.

  • Thnx chytrik! I see. :-) – Happy ITWala Apr 11 '18 at 1:31
  • I have been researching more on the topic. Though, miners are incentivised, it's technically possible to have double spend and network must ensure robustness. I am researching on lines of equivalent of 'Chargeback' in credit cards. I found that, with credit card, thought the amount is credited, it can still be taken back by bank within around 60 days from merchant in case the transaction is disputed. Though, the scenario is not exactly same for bitcoin, but I am researching the nitty gritty as to what event surely seals the transaction with no scope of reimbursement aka reversal. – Happy ITWala Apr 24 '18 at 17:32

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.