Hard Forks & Soft Forks

Those who have been around cryptocurrency for some time are familiar with the concept of a fork. In the simplest terms a fork is a modification to the open-source code of a blockchain. Forks are most often created with intent to solve an existing issue. Here are a few things you need to know about hard and soft forks – how and why blockchains split.

The Hard Fork

Forks come in two varieties, hard and soft. The hard fork is essentially a change to a blockchain framework that will invalidate older versions. When older versions are allowed to keep running, there is confusion and error because the two versions contain different data and a different protocol.

Let’s say that you were a Bitcoin developer and you wanted to change the size of a block on the Bitcoin blockchain. That is a defining parameter of the protocol, so you would need to perform a hard fork that rendered the older blockchain obsolete. You cannot have one version of the network accepting blocks that are 1 MB in size while another protocol accepts a 4 MB block. When the two protocols try to merge there will be a problem, and that issue could create inaccuracies on the blockchain and perhaps cause people to lose their Bitcoin.

In a hard fork the nodes on a blockchain network must all upgrade and agree on the new version of the framework. This is different from a soft fork where majority acceptance is all that is required to implement the change.

Right away you should see that a hard fork of a blockchain is potentially messy. It also carries risk. There is a possibility that digital tokens that were spent on the newer version of the platform could be spent again on the older version. The difficulty is further compounded by having all nodes switch to the new blockchain platform at the same time.

The Soft Fork

In contrast, a soft fork has the ability to work with older versions of a blockchain protocol. There have been many soft forks throughout the history of cryptocurrency. It was, in fact, a soft fork which was used to create a block size limit on the Bitcoin blockchain. Originally, there was no limit to the size of a block. A soft fork was used to set it at 1MB.

A soft fork is basically a change to the software protocol which only invalidates previous blocks and transactions. This type of change, unlike the hard fork, is backwards compatible. It only requires that a majority of the miners on a network upgrade to the new protocol. This majority acceptance will enforce the new rules for the entire blockchain.

Soft forks have been used to create new transaction types on a blockchain. Soft forks can also occur when miners running an older version of the protocol may violate some type of rule involuntarily. There may be changes to a platform that makes rules more strict, and it is even possible to perform cosmetic changes or add functions that do not change the underlying nature of the framework.

When a soft fork is performed the new version blocks will be accepted by the nodes that are still running an older version of the network. But the new version would reject older blocks. The ideal scenario at that point is for miners who are running an old version of the protocol to realize that their blocks are rejected. This would give them the motivation to upgrade.

As miners on the network begin to upgrade the longest chain on the network becomes the one with new blocks. This creates a type of self-correcting extinction of the older protocol over time. Only the new version of the network can survive in the long run.

This simple explanation of hard forks vs. soft forks may suffice to help you understand how and why blockchains are split. There is typically an issue present that only a split of a blockchain can resolve. When this happens a fork will be used to provide the necessary correction.

Leave a comment