<p>Staying well connected is important to bitcoin nodes and miners. Special relay networks <a href="http://bitcoinfibre.org/public-network.html" rel="nofollow noreferrer">such as the Bitcoin Fibre Network</a> exist to ensure new blocks are communicated quickly, and to prevent network fragmentation.</p>

<p>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. </p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2018-04-11T01:31:45.590Z
Thnx chytrik! I see. :-)
Happy ITWala
CC BY-SA 3.0
2018-04-24T17:32:36.103Z
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
CC BY-SA 3.0
2018-04-10T18:10:11.337Z
2018-04-11T06:42:40.490Z
2018-04-11T06:42:40.490Z
chytrik
<p>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?</p>

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

<pre><code>**Set 1**
1&lt;--&gt;2      
2&lt;--&gt;3  
3&lt;--&gt;1
**Set 2**
4&lt;--&gt;5  
5&lt;--6&gt;  
6&lt;--&gt;4
</code></pre>

<p>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.</p>

<bitcoin-core><blockchain><doublespend>
Can there be double spend between propagation of block chains between 2 set of peers?
Happy ITWala
# Can there be double spend between propagation of block chains between 2 set of peers?

(Asked by: username_0 on 2018-04-10)

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.

**Tags:** bitcoin-core, blockchain, doublespend


---

## 1 answers

### Answer by username_1 on 2018-04-10. Score: 1

Staying well connected is important to bitcoin nodes and miners. Special relay networks [such as the Bitcoin Fibre Network](http://bitcoinfibre.org/public-network.html) 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.

> **Comments:**
> **username_0**: Thnx username_1! I see. :-)  
> **username_0**: 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.  

---

