2

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?

1 Answer 1

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.

2
  • > 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
    Commented May 29, 2020 at 12:17
  • 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 - adding a link back to this question if you feel that would help people understand what you are asking. See also Node/peer discovery Commented May 29, 2020 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.