Upgrades are essential in the world of technology. The same is true for open-source cryptocurrencies, where the source code is publicly accessible, freely distributed, and developed in a collaborative manner rather than being an intellectual property of an organization or individual.
Forks play a key role in the upgrade roadmap of a blockchain and in implementing bug fixes, soft additions, and new rules because of their decentralized nature. But, what exactly are forks? And, what’s the fuss about them? What are hard forks and soft forks? Read to find out.
What is a fork?
In computing, a fork is an alteration to the source code of an open-source software program and the creation of an entirely new program. You may have come across the term while contributing to a public repository on GitHub and using a forking tool to copy the source code locally and make changes to it.
In a blockchain, forks affect the underlying protocol or source code to implement significant changes or create assets that are similar to the original blockchain. The forked code usually resembles the original but with significant modifications; both blockchains can exist in parallel.
Blockchains are operated by an open community of participants, who decide on future paths and enhance the system’s overall functionality and efficiency. They could be developers, network participants, or miners who are part of the shared authority and who decide whether to implement forks.
Some forks breathe new life to cryptocurrencies. Now, forks may not always be intentional. There have been instances of accidental forks, where two miners mined a new block simultaneously. It is important to note that blockchain upgrades are arduous processes by themselves and there are often no mechanisms to introduce new functionalities but through hard forks.
What is a hard fork?
A hard fork is a radical software upgrade that permanently alters the code in a blockchain and requires all validators to switch to the new version. They are not backward-compatible. The original cryptocurrency holders receive some of the newer cryptocurrency after a hard fork; each of them is traded separately.
A hard fork takes place when some nodes no longer meet consensus on the latest version of a blockchain, resulting in two versions of the network running independently. There are other reasons to opt for a hard fork, which include:
- Patching off any security flaws
- Building a new software upgrade (another blockchain)
- Adding new features to the blockchain
- Reverse transactions on a blockchain
Here are some examples of hard forks:
Bitcoin hard fork
Segregated Witness or SegWit is the upgrade name for the Bitcoin protocol implemented on August 23, 2017. Bitcoin developer Peter Wiulle first introduced it in 2015 during the Scaling Bitcoin Conference.
SegWit allowed a greater number of transactions in bitcoin’s blocks, where the upgrade was originally meant to correct a bug named transaction malleability. The bug would let anyone make subtle changes to the network that affected the transaction id and the subsequent hash. The implementation of SegWit led to the famous Bitcoin hard fork, resulting in Bitcoin Cash. The Bitcoin Cash community wanted a larger block size, whereas the Bitcoin community opposed it.
Ethereum hard fork
It was in April 2016 that Ethereum hit a peak with a radical experiment called the Distributed Autonomous Organization, or the DAO, which set out to assemble a venture capital firm using smart contracts that would make all investment decisions for investors without any human involvement. This was one of the earliest crypto crowdfunding AKA initial coin offering (ICO) efforts to raise $150 million worth of ETH. On June 17, shortly after the launch of the DAO, Ethereum was attacked, where the attacker siphoned off $60 million worth of ETH. Around 14% of Ethereum’s circulating supply was invested in the DAO, which heavily affected the network’s confidence.
There was a community consensus on the hard fork in response to the heist which occurred on The DAO smart contract, with 97% voting in support of it. Ethereum developers introduced an irregular state change via a hard fork on July 20, 2016, at a block height of 1.92 million, as an attempt to recover the stolen ETH.
What is a soft fork?
Soft forks are software upgrades that add new features to each node in the blockchain. Blockchain nodes must accept and adhere to a set of new protocols. Soft forks do not invalidate old blocks and are compatible with older ones. The old blockchain will thereby continue to accept blocks from the newly updated protocol because the fork is forward-compatible. Here is an example of a soft fork:
Segregated Witness soft fork
Bitcoin’s chain underwent a soft fork in August 2017 to implement the Segregated Witness protocol, which reduced block size and increased transaction speeds. While SegWit was a soft fork, some miners opposed the new protocol, which resulted in Bitcoin Cash.
Hard fork vs. Soft fork
Both the forks serve different purposes and are inherently different in the up-gradation of blockchain networks. Both unplanned and planned hard forks introduce significant changes in the blockchain, like resolving security issues. Miners and merchants tend to prefer hard forks because they minimize the risk of validating (or mining) invalid blocks. However, hard forks are extremely difficult to enforce since they split communities as well as the hashing power of the blockchain network. This affects the processing capacity and overall network security.
Soft forks help implement software upgrades and improve the functionality of a blockchain on a programming level. Soft forks offer a faster way to upgrade blockchain software in a resource-efficient manner and help implement updates without dividing users. However, one of the biggest risks is that a bad actor can exploit a soft fork to trick full-node users and miners into validating blocks that do not conform to blockchain rules.
Why are forks important?
The dynamic nature of cryptocurrency is enhanced by forks making trading and investing more interesting. Forks offer more choices for traders, let the holders of the original crypto avail of the new crypto of equivalent sum, and introduce new functionalities to the said blockchain.