What is the difference between a hard fork and a soft fork?

Disponible en podcast
Share article:

The term “fork” can be translated as “branch line” in French. This refers to any form of division of the Bitcoin node network into different groups. A fork takes the form of the production of different blocks at the same height. However, this term is also used to refer to changes made to the rules of the Bitcoin protocol, i.e. at the consensus level. We can thus categorize forks according to their nature, objectives and purposes on the Bitcoin blockchain.

In this article, we explain to you what the different types of forks are on Bitcoin. In particular, we study the differences between soft forks and hard forks.

What is a natural branch?

In A previous article, I told you about the natural divisions of the Bitcoin blockchain. These divisions are a form of fork. They happen when two miners find different blocks at the same height in a short period of time. Some of the nodes in the network are on the chain with block A, and the other part on the chain with block B. As soon as an additional block is found, all the nodes are synchronized again on a single chain. This is what we call a reorganization.

This type of fork is perfectly natural on Bitcoin. It is not a final branch since the network meets again during the reorganization. These natural divisions can still be categorized as “forks”, because a temporary branch in the blockchain does happen.

What is a fork of the Bitcoin code?

There are various Bitcoin node implementations out there. The most used to date is Bitcoin Core. This software consists of code, often open-source, that can be freely consulted online. It is therefore possible to copy the Bitcoin Core code, modify it as we wish, and launch our own cryptocurrency protocol.

In the field of programming, software development platforms that use Git for version control are generally used, such as GitHub or GitLab for example. On these platforms, a “fork” is a copy of a repository that we can put on our own account in order to make changes without affecting the original repository.

We therefore also use this term “fork” to refer to the various copies of the Bitcoin code used to build a brand new cryptocurrency, starting from the Genesis block. For example, the cryptocurrency Litecoin is a fork of the Bitcoin code, but it has no blocks in common with Bitcoin.

What is a hard fork on Bitcoin?

The hard fork is also characterized by a change in the Bitcoin protocol code. Unlike the previous fork category, the hard fork does not start from the Genesis block, but it branches directly onto the current blockchain. It therefore maintains a history in common with the original protocol.

For example, the Bitcoin Cash (BCH) cryptocurrency is a hard fork of Bitcoin. The branch line took place at block No. 478,559 on August 1, 2017. Prior to this block, the history between Bitcoin (BTC) and Bitcoin Cash (BCH) is common.

Changing the rules on a hard fork produces a permanent separation of the network of nodes into two distinct groups. There will be the group that implemented this change, and the group that did not. Each group will have its own independent channel, but with a common history. Unlike a soft fork, The hard fork results from a code change that is not backwards compatible. For this separation to take place, the new code added must therefore remove some of the existing rules, or make the protocol rules less restrictive.

For example, if I make a code change to increase the size of Bitcoin blocks from 1MB to 8MB, then I am making the protocol rules less restrictive. So I'm doing a hard fork. Indeed, the nodes that are on the original protocol with a limit of 1 MB will not accept my 8 MB blocks since they exceed the rules they specified. The nodes that will follow me in my modification will thus separate from the original network.

In short, a hard fork is simply the action of modifying the Bitcoin protocol in such a way that it becomes a “Bitcoin bis”. If this Bitcoin bis meets a consensus, then it is considered to be the replacement of the original Bitcoin. On the other hand, if Bitcoin bis is only used on the fringes, then it only becomes an altcoin independent of the original Bitcoin.

What is a soft fork on Bitcoin?

The soft fork is also characterized by a change in the Bitcoin protocol code. But unlike the hard fork, this change is backwards compatible. It means that The soft fork will essentially add new rules, or make the current rules more restrictive. This modification mechanism makes it possible not to produce a separation at the level of Bitcoin nodes.

For example, if you decide to reduce the maximum block size on Bitcoin, from 1,000 KB to only 500 KB, then you are making the rules more restrictive. Up-to-date nodes will only accept blocks under 500 KB. When an old node, which did not update, receives a 500 KB block from an updated node, it accepts it. In fact, if the old node accepts a block of up to 1,000 KB, then the new blocks of 500 KB necessarily fall into this rule. All nodes that have not updated will be able to remain synchronized with the Bitcoin network, as the new rules are more restrictive. So it is indeed a soft fork.

However, there is a specific case for which the soft fork can cause a branch in the blockchain. Indeed, if minors who have not updated their client have more than 50% of the computing power of the network, then the old nodes will follow a chain that will not be accepted by the up-to-date nodes. There will therefore be a branch that can persist as long as the chain with the old rules has more accumulated work than the chain with the new rules.

This is why in a healthy development process, miners are asked to decide on their acceptance of the soft fork before applying it. In this way, we can ensure that a majority of them are ready to mine on the current chain in order to avoid branching during a soft fork.

➤ Learn more about Bitcoin mining and proof of work.

What type of fork do we use on Bitcoin?

Unlike the majority of altcoins, in the Bitcoin development process, we largely prefer to use soft forks when we want to make changes to the consensus. This allows old nodes to always be able to stay in sync with up-to-date nodes. This way you don't lose anyone along the way.

Thus, numerous soft forks have already been done in the past. Among the best known, there was SegWit, activated in 2017, or Taproot, which dates from 2021. Apart from intentional hard forks like Bitcoin Cash, we also experienced a few hard forks in the development process. These have either arrived by accident or to quickly rectify major bugs.

Technically, it is possible to adapt almost any modification of the protocol to make it pass in the form of a soft fork. The SegWit update was the perfect example, as it allowed for an increase in the size of Bitcoin's blocks without producing hard forks.

➤ Find out who is in control of Bitcoin protocol updates.

Conclusion

As you can see, the term “fork” refers to many different concepts on Bitcoin. It is used either to designate a separation of the network, or to designate a change in the rules of the protocol, or both simultaneously.

📌 To summarize, there are four main types of forks on Bitcoin:

  • If the chain naturally separates when there has been no change in the rules, then it is a natural phylum. The blockchain will come together spontaneously during a reorganization;
  • If a person takes over the Bitcoin source code, and creates a brand new crypto starting from block zero, then it's a Fork of the code ;
  • If one changes the Bitcoin protocol in a way that is not backwards compatible, then it is a Hard Fork. The blockchain separates in two, but it maintains a common history;
  • If one changes the Bitcoin protocol in a backwards compatible manner, then it is a Soft Fork and the chain does not separate (with some exceptions).

The fundamental difference between a hard fork and a soft fork is that the former removes rules, or relaxes existing ones, while the latter adds rules, or makes existing ones more restrictive. The hard fork breaks the rules of consensus, while the soft fork does not break anything. The consequence of this is that the hard fork produces a permanent division of the network. The soft fork, on the other hand, maintains the unity of the Bitcoin node network, provided that up-to-date miners have more than 50% of the network's computing power.

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