Software users are generally familiar with software updates and upgrades that aim to make the application they are using function more efficiently. Hard and soft forks on the blockchain operate similarly.

While centralized service providers easily update their software with new features at the touch of a button, a decentralized application — such as cryptocurrencies on the blockchain — needs a different approach.

Given that blockchains are decentralized, open-source protocols, the decision to upgrade to a new protocol requires the consensus of all users on the network, as there is no central authority to dictate changes to the network. This unique process of updating or upgrading a blockchain, therefore, is called a fork. Forks can be categorized into two parts (soft and hard forks), depending on their purpose.

But first, let us look at what it means to have a fork on the blockchain.

Understanding Forks on a Blockchain

At its most basic level, a blockchain can be depicted as a set of blocks of data, connected through the use of secure cryptographic keys, forming a chain of blocks going back to the very first block (the so-called Genesis Block).

Therefore, you can picture the blockchain as a straight path made of blocks linked to one another. Since the blocks are chained together through a consensus that all blocks agree upon, any upgrade to the system would require a change of consensus on all blocks. This is impossible to achieve since the blocks are linked through an immutable set of rules.

A fork is therefore an event on the blockchain that copies the original software of the existing blockchain but, at the same time, adds new changes that previously did not exist on the “legacy” blockchain. Since both blockchains cannot coexist, the new blockchain takes a different direction, forming a fork-like diversion from the main blockchain. Now instead of one path, the network branches out to form two paths.

Who Determines a Fork Formation?

Since the blockchain is not run by any central authority, it is the responsibility of the participants on the network to agree on the way forward for the network and to implement appropriate changes that benefit the overall efficiency of the network.

However, blockchains feature different subsets of participants ranging from miners to full node users and developers. So who gets the final say on what changes should be implemented on the network?

Since each subset contributes differently to the network, some get to have more voting power than others.

For instance, developers create and update the code that runs inside the blockchain, miners secure the network by dedicating computational resources for block validation, and full node users act as the backbone or auditors of the network as they validate and maintain the history of the blockchain.

Most open-source blockchains will allow for an overlap of these responsibilities and, therefore, a shared responsibility on the fork formation process. However, it is primarily the miners who determine the security and popularity of either version as they continually provide computational resources that run the network. When there is a disagreement on a blockchain’s future progression, the side that gets the majority of the miners to participate wins.

So What is a Hard Fork?

We have so far established that forks are updates or upgrades to the blockchain’s software protocol that result in a split of the main blockchain network. It stands to reason that if there is a cryptocurrency running on an old blockchain, a fork on that blockchain will also result in the creation of a second cryptocurrency on the new blockchain.

A hard fork results when the rules of the blockchain protocol are updated or changed so that the old blockchain and the new blockchain become incompatible.

This means that the old nodes will refuse to accept the newly updated blocks, and the new blockchain will operate on new rules that continually reject blocks from the old blockchain. In technical terms, this is referred to as a backward-incompatible software update.

The creation of Bitcoin cash is a good example of a hard fork event on the Bitcoin blockchain. The hard fork occurred after a disagreement in the Bitcoin community over the best approach for scaling the network.

On one side of the argument were members who wanted to increase the block size while the other side opposed the changes. A faction of the community followed the Bitcoin Cash route while the other remained on the main Bitcoin network. Now both coins, i.e., Bitcoin and Bitcoin Cash, run on different blockchains; however, they share the same history from the point of the fork.

What is a Soft fork?

While a hard fork is considered to be a backward-incompatible upgrade to the blockchain, a soft fork is a forward-compatible change to the rules. This means that the old blockchain will continue to accept blocks from the new updated blockchain protocol even though there is a change in the rules instigated by the new software.

At its core, a soft fork “tricks” the old blockchain into accepting the new rules as valid and therefore accepting both updated and old blocks of transactions at the same time.

Both forks create a split in the main blockchain. However, a hard fork results in two different blockchains and a soft fork aims to maintain the old blockchain by running on two lanes with different sets of rules.

A good example of a soft fork implemented successfully is the Segregated Witness (SegWit) update to the Bitcoin protocol that happened in 2015.

Before the SegWit update, the Bitcoin protocol took longer to process the transaction and the cost per transition was much higher at about $30 per transaction. The SegWit update recognized that signature data takes up about 65% of the space in a transactional block. Therefore, SegWit proposed an increase in the effective block size from 1MB to 4 MB.

The idea was to segregate or remove the signature data from the transactional data on every block on the blockchain, freeing up space for more transactional throughput per block.

The SegWit update is a good example of how the old Bitcoin blockchain was able to accept new 4MB blocks and 1MB blocks at the same time. This is achieved through a clever engineering process that formats new rules without breaking the old ones. Therefore it is only through a soft fork where old nodes can still validate new blocks.

Hard Fork vs. Soft Fork

There is still a lot of disagreement in the blockchain and crypto space over what type of fork is best for upgrading a blockchain network. While a hard fork is known for dividing communities, soft forks are considered the gentler option even though they come with inherent risks.

A soft fork can be used by bad actors to trick full node users and miners to validate blocks that violate the rules of the blockchain.

Full node users act as the auditors of a blockchain as they maintain a copy of the entire blockchain. Therefore, it is their job to ensure that every new block complies with the rules of the old blockchain. If a group of people on the blockchain manage to create new rules without the knowledge of the full node users on the network, the security of the network can be compromised.

For instance, Bitcoin maintains its decentralized characteristics through the use of full nodes and miners who operate independently and confirm the validity of the ledger. This is how key economic policies, such as the prevention of double-spending and Bitcoin’s inflation formula, are reinforced.

However, suppose bad actors manage to trick the miners and full nodes into accepting blocks that violate the rules. In that case, the blockchain might risk validating invalid blocks leading to an eventual collapse of the system. So far, blockchain communities mitigate this risk by making every soft fork public.

Hard forks, on the other hand, are not without their own set of challenges.

Given the fact that miners secure the blockchain network by providing hashing power to the protocol, many argue that hard forks are dangerous in that they split the hashing power of the network and therefore reduce the network’s security and processing capacity.

Conclusion: Evolution of Blockchains

No matter the type of fork you prefer on a blockchain, it is clear that there is still much that needs to be done to ensure a smooth transition of blockchain updates and upgrades. Most blockchain miners and merchants prefer hard forks as they limit the risk of validating or mining invalid blocks.

By running on a blockchain with a majority, blockchain miners and merchants will not be left behind or be defrauded. However, hard forks take up a lot of computational resources and are considered to be detrimental to the future of cryptocurrencies.

Despite their inherent risks, soft forks offer a much faster solution to software upgrades on the blockchain without the excessive use of computational resources. Soft forks are also lauded for their capacity to implement updates without splitting the community.