What is a Fork? – Beginner’s Guide to ‘Forking’ on the Blockchain
Fork! The name itself sounds kinky. But, it is what it is. In technology lingo, the word Fork is used to describe anything diverging or to cut off from an already existing piece of software or code. But gradually, the definition has gone on to become much broader than it was initially used for.
To Fork means to change, differ, or diverge from something that already exists, either upgrading and leaving the old stuff behind or starting something entirely new based on the previously existing rules.
When it comes to ‘forking’ on the Blockchain, the word usually retains most of its meaning but has gone on to split into two parts (doing exactly what it means).
In this piece, we will be looking at what a “FORK” is, what are its properties, its types and eventually move on to the several occurrences within the Blockchain sector where ‘Forking’ has gone on to create much havoc and innovation, sometimes even both at the same time.
‘Forking’ on the Blockchain
Forking on the Blockchain changes the already existing rules and moves towards a new set of pre-specified rules. The rules put forward can either be supported by all, some, or none of the network participants. Forks are rules that have to be recognized by the nodes running on any given network. If the node decides not to consider the changes in rules, it can do so, but that decision will have several consequences.
The word Fork has brought much upheaval in the market in the short span of circulating. A Fork has been used to describe all types of differences in opinion, communication, or any other divergence form. Slowly but steadily, the word Fork has evolved into several types, further divided into more classifications.
In General, Forks can be considered of two types, Soft Fork and Hard Fork.
Different Types of Forks
- Backward Compatible
- It does not require consensus
- Can be reverted or ignored
A soft fork is any change to a blockchain protocol that stops the rule-set enforced by full nodes that update to enforce the soft fork rules. In other words, a soft fork means that if a new set of rules are introduced that need not gain the majority, they can or cannot be applied by all the nodes. A block considered valid before the soft fork activates will be considered valid by others even after that. New rules are brought forward.
A Soft Fork is usually backward compatible. For instance, if an old node decides to make and verify a block, it will be considered valid by all other nodes on the network, new or old.
- Non-backwards Compatible
- Requires Consensus
- It cannot be reverted
A hard fork is a non-backward compatible upgrade to an existing blockchain. This means that all the network nodes on a particular blockchain must either comply with the fork and update their protocol software or continue with the same outdated protocol by forming another separate Blockchain entity. Some of the most famous hard forks are the Bitcoin vs. Bitcoin Cash hard forks, Ethereum vs. Ethereum Classic hard fork, the Ethereum Istanbul Hard Fork, etc.
A Hard Fork is called a Non-backwards compatible fork because any changes made using nodes that run on the old set of rules will be considered invalid. In simple words, if an old node decides to make and verify a block, it will not be considered valid. All changes made during a hard fork cannot be changed or deleted after completing the fork.
Hard Forks can further be divided into two types.
- Contentious Hard Fork: A contentious hard fork is a hard fork that is non-reversible and non-backward compatible. It usually happens when there is a disagreement within the community. The faction that disagrees goes on to fork the chain and implement the changes they want on their new chain. Contentious Hard Forks usually result in a Chain Split.
- Non-Contentious Hard Fork: A non-contentious hard fork is also a hard fork that is non-reversible and non-backward compatible. The difference being that a non-contentious hard fork is carried out to upgrade the protocol and contains consensus from all the nodes in the network.
Well Known Forks in the Blockchain Ecosystem
BTC/BCH Hard Fork – Contentious Hard Fork
Bitcoin cash is a cryptocurrency created in August 2017 from a fork of Bitcoin. Bitcoin Cash increases the size of blocks, allowing more transactions to be processed.
Bitcoin cash was started by bitcoin miners and developers equally concerned with the future of the cryptocurrency and its ability to scale effectively. The key difference between BTC and BCH is the block size. The Bitcoin block size is limited to 1 MB, while Bitcoin Cash offers a block size of 8 MB, which was later upgraded to 32 MB.
Ethereum/Ethereum Classic Hard Fork – Contentious Hard Fork
Under the Ethereum Organization umbrella, the Decentralized Autonomous Organization (aka the DAO) was initiated and built to act as a decentralized venture capital fund for decentralized crypto projects. The idea was to make a stateless decentralized organization with no board of directors or employees but instead would use independent investors as its key actors. Within 28 days of its formation, it accumulated over $150 million worth of ether in a crowd-sale.
Shortly after that, a flaw in DAO’s code was exploited by attackers, and more than $50 million was drained out of DAO’s funds.
This led to an upheaval in the crypto space among DAO investors, particularly among the Ethereum community members. This upheaval was mainly because many investors’ money was drained out, leaving some to presume that the Ethereum blockchain itself was hacked and the project had failed.
Post the mayhem, most of Ethereum’s community decided to favor a “hard fork” to restore the investor’s financial losses and the ruined reputation. While a vast majority of the Ethereum community was in agreement with the fork, a small group wasn’t – thus holding on to the notion of ‘Code Is Law‘ and continuing on the old blockchain, forming “Ethereum Classic” by hard forking the Ethereum Blockchain.
Ethereum’s Istanbul Hard Fork – Non-Contentious Hard Fork
The 8th Ethereum hard fork was initiated on December 6th, 2019. This initiation of the Ethereum Network was called “network upgrade” by the community. It was the 8th such iteration of the network, following other previous updates such as Metropolis, Constantinople, etc. This network update is considered a Hard Fork because all existing rules before the hard fork have become invalid. All new nodes must follow the new set of rules. The fork wasn’t contented, meaning that no one came up to say that they were unhappy with the fork. And so, this resulted in no chain split.
SegWit – Soft Fork
SegWit was the proposed soft fork on the Bitcoin blockchain. It was the process by which the block size limit on a blockchain is increased by removing signature data from Bitcoin transactions. When certain parts of a transaction are removed, this frees up space or capacity to add more transactions to the chain. The SegWit fork was considered as a Soft fork because none of the users were mandated to use the update to the new set of rules. Nodes were given the choice of choosing to stay or upgrade their protocol. If the nodes were later unhappy with the new rules, they can turn back and use their old set again.