Most software users are familiar with the  updates and upgrades that make their applications more efficient.  Blockchain also relies on similar updates and upgrades  efficiency. However, while centralized service providers easily update their software with new features at the touch of a button, decentralized applications, such as cryptocurrency on a blockchain, require a different, more complex approach.  For example, blockchains are decentralized open-source protocols that lack a central authority. As such, the decision to upgrade to the protocol requires the consensus of all users on the network.. This unique process of updating or upgrading a blockchain is called a fork. Forks can be categorized into either soft or 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 is like a set of data blocks  , connected by secure cryptographic keys that forma chain of blocks going back to the very first block.

Therefore,  one can picture the blockchain as a straight path made of blocks linked to one another. Because the blocks are chained together through a consensus that all of the blocks agree upon, any upgrade to the system requires a change of consensus on all of the blocks.   Such a consensus is unlikely to occur because the blocks are linked through a functionally immutable set of rules. Thus, instead of rewriting each block, changes to a blockchain are often achieved through the use of a fork.  A fork is an event on the blockchain that copies the original software  and adds the desired changes to it. Because the two blockchains cannot coexist, the new blockchain splits into two branches,  forming a fork-like diversion  from the main blockchain.

Who Determines a Fork Formation?

Because 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 and implement  changes that increase the overall efficiency.

Blockchains, however, 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?

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

For example, miners, who secure the network by dedicating computational resources for block validation, tend to determine the security and popularity of the fork versions. Because miners provide the computational recourses necessary to run the network, any fork version that attains the miners’ approval   tends to succeed. Most open-source blockchains allow for an overlap of responsibilities and, therefore, a shared responsibility on the fork formation process. Other subset roles include developers who create and update the code that runs inside the blockchain, and full node users who act as the backbone and auditors of the network, as they validate and maintain the history of the blockchain.

What is a Hard Fork?

Forks are updates or upgrades to the blockchain’s software protocol that result in a split inthe main blockchain network. If there is a cryptocurrency running on an old blockchain, for example, a fork on that blockchain will result in the creation of a second cryptocurrency on the new, forked blockchain.

With a hard fork, the rules of the blockchain protocol are updated or changed so that the old blockchain and the resulting blockchain are incompatible.

This means that the old nodes will not accept the newly updated blocks, and the new blockchain will operate on new rules that continually reject blocks from the old blockchain. This is often referred to as a “backward-incompatible” software update.

For example, a hard fork was created on the Bitcoin blockchain over  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,. On the other side were those members who opposed such changes. Subsequently,  those who wanted to increase the size of the block followed the Bitcoin Cash fork, while those who opposed such changes remained on the main Bitcoin network. For this reason, while both coins (i.e., Bitcoin and Bitcoin Cash) run on different blockchains,  they still share the same history prior to the fork .

What is a Soft Fork?

While a hard fork is a backward-incompatible upgrade to the blockchain, a soft fork is a forward-compatible change to the rules. Because the fork is a forward compatible change, the old blockchain will continue to accept blocks from the newly updated blockchain protocol, even though there is a change in the rules because of the new software.

Put simply, a soft fork tricks the old blockchain into accepting the new rules and, therefore, accepting both the updated blocks and the old blocks of transactions at the same time. Thus, unlike a hard fork, a soft fork maintains the old blockchain by maintaining two lanes with different sets of rules. An example of a successfully implemented soft fork is the Segregated Witness (SegWit) Bitcoin protocol update of 2015.

Prior to the SegWit update, Bitcoin protocol was both more costly, about $30 per transaction, and more time consuming. . The creators of what would become the SegWit update recognized that signature data comprises about 65% of a transactional block. Therefore, SegWit proposed to increase the effective block size from 1MB to 4 MB.

The idea behind this increase 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. By applying a soft fork, the old Bitcoin blockchain was able to accept new 4MB blocks and 1MB blocks at the same time. Through a clever engineering process that formatted new rules without breaking the old ones, the soft fork allowed the old nodes to also validate the new blocks. .

Hard Fork vs. Soft Fork

Blockchain and crypto communities disagree over which type of fork is best across the board for upgrading blockchain networks. While each type of fork has its strengths, it is weaknesses that the communities are more concerned with and, therefore, split about.

Soft forks are considered the gentler option of the two but possess their own risks. The most prominent of th ese risks is the fact that a soft fork can be used by bad actors to trick full-node users and miners into validating blocks that violate the rules of the blockchain.

Full-node users act as the auditors of a blockchain, maintaining a complete copy of the blockchain at all times. 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 example, Bitcoin maintains its decentralized nature through the existence of full –node users and miners who operate independently of others 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. If bad actors trick full-node users and miners into accepting blocks that violate the rules, the blockchain might  begin validating invalid blocks, which, in turn, could lead to a collapse of the system. For this reason, blockchains have tried to mitigate this risk by making all soft forks public.

Hard forks, on the other hand, are not without their own set of challenges. First, hard forks are known for dividing communities. Unlike a soft fork, there is no middle ground with a hard fork. Second, many argue that hard forks are dangerous because they split the hashing power of the network, therefore reducing the network’s security and processing capacity overall.

.

Conclusion: Evolution of Blockchains

Regardless of the fork type, it is clear there remains much 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.

Hard forks ensure that blockchain miners and merchants are not left behind or defrauded, especially when they run. 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 ability to implement updates without splitting the community.

 

 

 

 

Ref:

https://medium.com/@octskyward/on-consensus-and-forks-c6a050c792e7

https://bitcointalk.org/index.php?topic=1151704.0

https://www.investopedia.com/terms/h/hard-fork.asp

https://academy.binance.com/en/articles/hard-forks-and-soft-forks

https://medium.com/@lightcoin/the-differences-between-a-hard-fork-a-soft-fork-and-a-chain-split-and-what-they-mean-for-the-769273f358c9