In a fork, a new version splits off from the existing blockchain or application to function as its own network. Often, a blockchain is "forked" to implement new rules through changes in the source code.
Forks can occur either due to a programming code error or when an update is deemed necessary. There are two main types: "Soft Fork" and "Hard Fork". a Hard Fork, the newly created blockchain operates independently from the original one. In contrast, a Soft Fork is accepted as the new blockchain by the majority of miners and users, while the old blockchain is no longer maintained. This variant is commonly used for code updates.
The difference between soft and hard forks
- Soft fork
A soft fork is a backward-compatible upgrade to the blockchain protocol. This means that nodes that have not upgraded to the new version will still be able to recognize and validate new blocks that follow the updated rules. Soft forks are typically used to introduce new features or improve the efficiency of the network without fundamentally changing the consensus mechanism.
Some examples of soft forks:- Segregated Witness (SegWit) Bitcoin fork in 2017
- BIP91 fork on the Bitcoin Cash blockchain in 2017
- Hard fork
A hard fork is a more disruptive change to the blockchain protocol. It can introduce new consensus rules, or change existing rules in a way that makes it impossible for nodes running the old version to validate new blocks. This can result in a permanent split of the blockchain into two separate chains, each with its own set of rules and consensus mechanism.
Some examples of hard forks:- Ethereum fork from Ethereum Classic and Ethereum in 2016
- Bitcoin Cash (BCH) fork from the Bitcoin blockchain in 2017