March 29, 2019, | AtoZ Markets - The decentralized nature of blockchains such as Bitcoin and Ethereum means that users on the network must be able to come to an agreement to the shared state of the blockchain network. A complete consensus amongst the participants in the network results in a single block of verified data that everyone considers as correct.
A blockchain fork will occur when there is a withdrawal from consensus, which occurs in three cases: Temporary Fork, Hard Fork and Soft Fork. Before we jump into the difference between Hard Fork and Soft Fork, it is important to know about the temporary Fork.
What is a Temporary Fork?
Temporary forks are the forks that occur when miners on cryptocurrency systems find a block at the same time. This results in two split competing blockchains. Temporary forks are resolved in Proof-of-Work (POW) systems such as Bitcoin when miners select which chain to form next blocks. The longest blockchain is considered as being the real blockchain and will win, while the shorter chain will be dismissed.
Difference Between Hard Fork and Soft Fork explained
Hard Fork and Soft Fork differ from temporary forks in the way these forks stand for a permanent change in the underlying rules of the blockchain protocol. For effecting such a change, which can occur for various reasons, including:
- Extra functionality to the blockchain network in the form of upgrades.
- Changing a core rule in the protocol, such as increasing the block size of the network
- Hard fork and Soft Fork differ to temporary forks because these changes are permanent, thus, requires changes at the network protocol layer.
A hard fork is a permanent deviation from the previous version of a blockchain. A new set of consensus rules are introduced into the blockchain network that is not compatible with the older network. In simple words, a hard fork can be a software upgrade that is not compatible with previous versions of the software. In this type of fork, all network participants are required to upgrade to the latest version of the software in order to continue verifying and validating new blocks of transactions in the blockchain network.
Moreover, under a hard fork, blocks that are confirmed by nodes are not upgraded to the latest version of the protocol software will be invalid. The nodes running the previous version of the software will have to follow the new set of consensus rules in order for their blocks to be valid on the Hard-forked network. In case of a hard fork, if there is still mining support for the minority chain, then two blockchains can continue to exist simultaneously.
This type of fork can usually fall into two sub-categories, they can either be a planned hard fork or a contentious hard fork.
Planned Hard Fork: A planned hard fork is simply an upgrade to the protocol that had already been made clear in advance by the developers. Typically, a high degree of consensus from the project developers and the community would already have been reached before the hard fork occurred.
Contentious Hard Fork: It occurs when there is severe disagreement between various members in the project. It includes project developers, network users, and miners. It normally takes place because one part of the community believes that major changes in a cryptocurrency’s code will produce a superior blockchain.
Example of a contentious hard fork was the Bitcoin Cash hard fork. Where few members of the community believed that increasing Bitcoin’s block size from 1MB to 8MB would allow for the faster processing of transactions on the blockchain network.
A soft fork is a backward compatible way of upgrading a blockchain. In simple words, a soft fork is a software upgrade that is backward compatible with previous versions of the software. It does not require nodes on the network to upgrade to maintain consensus as all the blocks on the soft-forked blockchain network follows the old set of consensus rules as well as the new ones. However, blocks produced by nodes conforming to the old set of consensus rules will violate the new set of consensus rules.
For a soft fork to work, most cryptocurrency miners need to recognize and enforce the new set of consensus rules. If this majority is reached, then the older network will fall into disuse, with the newer blockchain gaining recognition as the ‘real’ blockchain.
An example of a soft fork would be the operation of a new rule changing the network block size from 1MB to 500KB. Nodes that have not upgraded will continue to see incoming transactions as valid, as these nodes follow the old set of rules as well as the new. However, mining nodes will not upgrade and try to mine new blocks and will have these blocks rejected, as it does not conform to the new set of rules. Therefore, the blockchain network with 1MB block size is likely to fall into disuse as miners enforce the new 500KB consensus rule.
Examples of Soft Forks include Bitcoin Improvement Proposal (BIP) 66: A soft fork on Bitcoin’s signature validation.
Please share your thoughts with us in the comment box below.