How does a new node launch on the Bitcoin network?

Disponible en podcast
Share article:

Bitcoin is based on a network composed of tens of thousands of nodes scattered around the world. Each user can freely launch their own node to participate, as Bitcoin is a permissionless system. But how does a computer actually connect to the rest of the network and synchronize itself on the blockchain? That is the question we are answering in this article.

What is a node on Bitcoin?

A Bitcoin node, or” Node ” in English, is simply a computer that runs client software for the Bitcoin protocol. The best known and most used software is Bitcoin Core, which makes up around 99% of the network.

A Bitcoin node participates in the network by maintaining a copy of the blockchain, which is the complete history of all Bitcoin transactions. Its functions are to verify and relay new transactions as well as new blocks. Although it is possible for a node to participate in mining, this activity is now mostly distinct from the operation of a node itself, because specialized computers called ASICs are used.

There are various types of nodes on Bitcoin. Full nodes maintain a full copy of the blockchain and verify each block and transaction. There are also light knots, or” SPV ”, which only store block headers. Finally, there are the pruned nodes, which check all the blocks on the blockchain, but only keep the most recent blocks in memory.

How do I connect a new node to the Bitcoin network?

To connect a new node to the Bitcoin network, the first step is to download and install Bitcoin Core or other client software on a computer. Once installed, the node should be able to access blockchain information. However, when it first launched, it had no information about its peers. So how do you establish this first connection to the Bitcoin network?

The discovery process for a node uses different mechanisms to connect to other nodes, in a specific order of priority.

The first action that the node will take is to consult a file called” peers.dat ” in Bitcoin Core. This file stores login information for peers that the node has already interacted with in the past. Each time the node is restarted, the software attempts to connect with the IP addresses stored in this file. Obviously, for a new node, this file is empty since it has not yet had any interactions with the network. However, it is possible to manually add IP addresses to this file.

If the file peer.dat is empty, the node then goes to the second connection mechanism, which consists in contacting the” DNS Seeds ”. These servers, maintained by developers recognized in the Bitcoin community, serve as initial connection points. When a new node launches, it asks these servers to obtain a random list of IP addresses of Bitcoin nodes that are presumed to be active, which allows it to establish connections and join the network. Currently, there are 10 servers DNS Seeds :

  • seed.bitcoin.sipa.be maintained by Pieter Wuille;
  • dnsseed.bluematt.me maintained by Matt Corallo;
  • dnsseed.bitcoin.dashjr-list-of-p2p-nodes.us maintained by Luke Dashjr;
  • seed.bitcoinstats.com maintained by Christian Decker;
  • seed.bitcoin.jonasschnelli.ch maintained by Jonas Schnelli;
  • seed.btc.petertodd.net maintained by Peter Todd;
  • seed.bitcoin.sprovoost.nl maintained by Sjors Provoost;
  • dnsseed.emzy.de maintained by Stephan Oeste;
  • seed.bitcoin.wiz.biz maintained by Jason Maurice;
  • seed.mainnet.achownodes.xyz maintained by Ava Chow.

You can find this updated list on The Bitcoin Core GitHub.

Normally, at this point, the node should be successful in establishing connections. However, if the DNS Seeds do not respond within 60 seconds, a third mechanism can be used as a last resort: the” Seed Nodes ”.

In the source code of the Bitcoin Core software, there is A list of IP addresses more than 1,000 nodes that are presumably active. This list is hard-coded into the software. If the first two mechanisms fail, the node will attempt to connect using this list to establish an initial connection and obtain additional IP addresses from Bitcoin nodes.

Thanks to these mechanisms, it is extremely unlikely that a Bitcoin node will fail to connect to the network.

➤ Discover 6 reasons to run your own Bitcoin node.

What are the different types of connections for a Bitcoin node?

On a Bitcoin node, there are two types of connections with other nodes: incoming connections and outgoing connections. Outbound connections happen when our node initiates the connection to another node. By default, a Bitcoin Core node attempts to establish connections with 8 outgoing peers. These connections are generally considered to be more reliable because it was the user who chose to connect to these specific nodes.

Conversely, inbound connections happen when another node establishes a connection with our node. Bitcoin Core allows up to 125 incoming connections (this number can be adjusted). Inbound connections are perceived to be less reliable than outgoing ones because they are initiated from outside and could therefore potentially come from malicious entities.

However, the information exchanged between outgoing and incoming peers is the same. For example, if my node becomes aware of a new transaction, it will send it to both its outgoing and incoming peers.

➤ Tutorial: How do I set up a Bitcoin Core node?

Conclusion

When a node seeks to connect to the Bitcoin network, it has three mechanisms for finding other computers with which to exchange blockchain information and transactions. In order of priority, the node will first consult its local file peers.dat to check if it contains IP addresses from other nodes. If this file is empty, the node will request a list of IP addresses from dedicated servers called” DNS Seeds ”. As a last resort, if these servers don't provide a response, the node can use the IP addresses of” Seed Nodes ” written directly into the Bitcoin Core source code.

Once the first connections are established, the node will ask its peers for the blocks needed to synchronize on the blockchain with the most accumulated work. After completing this verification process from the Genesis block, published by Satoshi Nakamoto in 2009, the Bitcoin node will be fully operational.

Podcast available

Table of contents

Share article

You may also like these articles

Bitstack SAS, a company registered with the Aix-en-Provence Trade and Companies Register under number 899 125 090 and operating under the trade name Bitstack, is licenced as an agent of Xpollens — an electronic money institution authorized by the ACPR (CIB 16528 – RCS Nanterre no. 501586341, 110 Avenue de France, 75013 Paris) — with the Autorité de Contrôle Prudentiel et de Résolution (ACPR) under number 747088, and is also licensed as a Crypto-Assets Service Provider (CASP) with the French Financial Markets Authority (AMF) under number A2025-003 for the following activities: exchange of crypto-assets for funds, exchange of crypto-assets for other crypto-assets, execution of orders for crypto-assets on behalf of clients, providing custody and administration of crypto-assets on behalf of clients, and providing transfer services for crypto-assets on behalf of clients, with its registered office located at 100 impasse des Houillères, 13590 Meyreuil, France.

Investing in digital assets carries a risk of partial or total loss of the invested capital.
Past performance is not indicative of future results.
DOWNLOAD BITSTACK