<blockquote>
  <p><strong>how do we ascertain that the bitcoin network [...] is one connected graph</strong></p>
</blockquote>

<p>Problems paying people.</p>

<hr>

<p>The senders and recipients in transactions are people who make contact using non-bitcoin protocols - for example HTTP websites, SMTP email, chat, in-person, by phone. </p>

<p>Therefore if the Bitcoin network were fragmented we should expect that pretty soon a person whose wallet is in one fragment would experience difficulty paying someone whose wallet was in a different fragment.</p>

<p>This would occur because different fragments would have different head blocks in their blockchain and pretty soon miners in one fragment would not be able to process transactions whose inputs were from a block they don't have. </p>

<p>I would expect Bitcoin discussion fora would gradually become filled with the wailings and gnashings of a horde of frustrated, angry and bewildered Bitcoin users.</p>

<p>I mean, more than the fora normally are :-)</p>

<p>After this became known, I would expect at least one or two whales to succumb to the temptation to double-spend massively. If so it seems superficially it would be a huge crisis for Bitcoin.</p>

<p>In practice, since this has not happened yet, I guess it would take some massive splitting of the Internet (e.g. Putin turns on his Russian Internet isolation switch for sufficiently long).</p>

<p>When there is a hard-fork (e.g. BCH) something a little similar happens, people who own n BTC before the split now own n BTC + n BCH. In the case of Bitcoin network fragmentation, someone who owned n BTC before would now own n BTC in fragment A and n BTC in fragment B. Although this might make them happy, potential recipients would worry about the consequences in an eventual remerger of those fragments.</p>

CC BY-SA 4.0
2020-05-29T12:17:44.400Z
> In practice, since this has not happened yet
That is the part I wanted to be addressed. Why has it not happened yet (not purposefully but just out of randomness)? Is it impossible or improbable? Further how does the network maintain its connectivity when a few nodes leave?
sarthak-ag
CC BY-SA 4.0
2020-05-29T13:07:26.207Z
@Sarthak123: Your question's title is "**How are we sure** the Bitcoin network is connected". If you want to ask "**Why has** the Bitcoin network not fragmented" you should probably ask that as a [new question](https://bitcoin.stackexchange.com/questions/ask) - adding a link back to this question if you feel that would help people understand what you are asking. See also [Node/peer discovery](https://bitcoin.stackexchange.com/search?q=discovery)
RedGrittyBrick
CC BY-SA 4.0
2020-05-29T10:04:52.737Z
2020-05-29T10:25:15.667Z
2020-05-29T10:25:15.667Z
RedGrittyBrick
<p>I am only beginning to understand the bitcoin's p2p network protocol but so far I know (and correct me if I am wrong) that a new node in the network attempts to connect to a "few" other nodes that already in the network to become a part of the network. I suppose that this makes a bitcoin network a random graph of some sort where we can make no hard guarantees about the topology and structure of the network and the best we can do is calculate estimates. In such a scenario my question is that how do we ascertain that the bitcoin network obtained (by randomly linking nodes with each other) is one connected graph and not split up into multiple connected components? Is it guaranteed to be connected or is it probabilistically so? If it is probabilistic what role does the <code>maxconnections</code> limit (125) has here?</p>

<p>I understand that there are some hard-coded seeds in the bitcoin client (and DNS) to which a new node can connect to and be a part of the already connected network thus evading this problem. Even if this is correct that problem still remains that the entire network may end up splitting up into multiple components if a few of these nodes end up disconnecting from the network. How do we guarantee that the network always remains fully connected when nodes can randomly disconnect and re-connect into the network? </p>

<network><protocol><p2p>
How are we so sure that the bitcoin network is connected?
sarthak-ag
# How are we so sure that the bitcoin network is connected?

(Asked by: username_0 on 2020-05-29)

I am only beginning to understand the bitcoin's p2p network protocol but so far I know (and correct me if I am wrong) that a new node in the network attempts to connect to a "few" other nodes that already in the network to become a part of the network. I suppose that this makes a bitcoin network a random graph of some sort where we can make no hard guarantees about the topology and structure of the network and the best we can do is calculate estimates. In such a scenario my question is that how do we ascertain that the bitcoin network obtained (by randomly linking nodes with each other) is one connected graph and not split up into multiple connected components? Is it guaranteed to be connected or is it probabilistically so? If it is probabilistic what role does the `maxconnections` limit (125) has here?

I understand that there are some hard-coded seeds in the bitcoin client (and DNS) to which a new node can connect to and be a part of the already connected network thus evading this problem. Even if this is correct that problem still remains that the entire network may end up splitting up into multiple components if a few of these nodes end up disconnecting from the network. How do we guarantee that the network always remains fully connected when nodes can randomly disconnect and re-connect into the network?

**Tags:** network, protocol, p2p


---

## 1 answers

### Answer by username_1 on 2020-05-29. Score: 2

> **how do we ascertain that the bitcoin network [...] is one connected graph**

Problems paying people.

---

The senders and recipients in transactions are people who make contact using non-bitcoin protocols - for example HTTP websites, SMTP email, chat, in-person, by phone.

Therefore if the Bitcoin network were fragmented we should expect that pretty soon a person whose wallet is in one fragment would experience difficulty paying someone whose wallet was in a different fragment.

This would occur because different fragments would have different head blocks in their blockchain and pretty soon miners in one fragment would not be able to process transactions whose inputs were from a block they don't have.

I would expect Bitcoin discussion fora would gradually become filled with the wailings and gnashings of a horde of frustrated, angry and bewildered Bitcoin users.

I mean, more than the fora normally are :-)

After this became known, I would expect at least one or two whales to succumb to the temptation to double-spend massively. If so it seems superficially it would be a huge crisis for Bitcoin.

In practice, since this has not happened yet, I guess it would take some massive splitting of the Internet (e.g. Putin turns on his Russian Internet isolation switch for sufficiently long).

When there is a hard-fork (e.g. BCH) something a little similar happens, people who own n BTC before the split now own n BTC + n BCH. In the case of Bitcoin network fragmentation, someone who owned n BTC before would now own n BTC in fragment A and n BTC in fragment B. Although this might make them happy, potential recipients would worry about the consequences in an eventual remerger of those fragments.

> **Comments:**
> **username_0**: > In practice, since this has not happened yet That is the part I wanted to be addressed. Why has it not happened yet (not purposefully but just out of randomness)? Is it impossible or improbable? Further how does the network maintain its connectivity when a few nodes leave?  
> **username_1**: @Sarthak123: Your question's title is "**How are we sure** the Bitcoin network is connected". If you want to ask "**Why has** the Bitcoin network not fragmented" you should probably ask that as a [new question](https://bitcoin.stackexchange.com/questions/ask) - adding a link back to this question if you feel that would help people understand what you are asking. See also [Node/peer discovery](https://bitcoin.stackexchange.com/search?q=discovery)  

---

