What are Softforks and Hardforks?
In the field of cryptocurrencies, hardforks and soft forks are the focus of considerable discussion among the community, as well as a source of fear and speculation for traders and investors. What do these words mean?
What’s the Difference?
Many users do not realize the distinction between hardforks and soft forks and the implications for the network and the ecosystem. Hardforks and soft forks are improvements for crypto projects. Hardfork is a divergence in the blockchain, arising when non-upgraded nodes can’t verify blocks generated by upgraded nodes that obey newer updated consensus rules. Softfork is a divergence in the blockchain that occurs by non-upgraded nodes not following new consensus rules.
A hardfork is related to blockchain technologies which reflects a fundamental change to a network protocol that makes invalid blocks and transactions valid. The hardfork demands that all nodes updates to the current upgrade of the protocol. The code that implements a blockchain consensus protocol is typically created by a community of developers who are actively working to suggest and enforce the best solutions and technological improvements.
How Does it Work?
In order to understand how forks operate, it’s necessary to know who is involved in the governance of the network. For example, in Bitcoin and other common cryptocurrencies, there are three types of decision-makers: developers, miners, and full node users.
Developers: They are responsible for building and modifying the code. This code is open-source and accessible, meaning developers around the world can submit modifications and enhancements.
Miners: Their goal is to protect the network. They run the cryptocurrency’s code and dedicate computing resources to adding new blocks to the blockchain through consensus protocols. They also get a block reward.
Full node users: They validate, send, and receive blocks and transactions, however, maintain a copy of the blockchain. One person can be a miner and a developer, and a full node user.
What is a Soft Fork?
A soft fork is a backward-compatible blockchain protocol that introducing some improvements that don’t critically change the functionality of previous versions. Network nodes may continue to operate (mining new blocks and/or validating transactions). Mining nodes risk trying to put invalid blocks into the blockchain, based on the new fork rules. All invalid blocks will be rejected because nodes that updated to the new version recognize them. This will result in a loss of computational resources, and enforce every node to upgrade to the latest version of the protocol.
SegWit is the most well-known soft fork in the crypto world. It offers an opportunity to increase the speed of the network’s transactions. The main concept was to free up some space in each block that could be used to grow the number of transactions included in a block. This was achieved by removing the public key and the signature associated with each transaction from the block and sending them through a different messaging channel. Since the public key and the signature takes approximately 60% of the total transaction size, it was possible to double the number of transactions in each block by sending them separately. This process was called Segregated Witness because the “witness” (signature) of the transaction was segregated (i.e. sent separately) from the transaction itself. This improvement in the protocol was allowed blocks generated in the old fashion to also be correctly recognized and processed. The protocol upgrade is backward compatible. The introduced update to the Bitcoin Consensus Protocol allow to process and recognize all blocks mined before it. The update is backward compatible.
What is a Hardfork?
Hardfork is a backward-incompatible blockchain protocol. Such a type of network upgrade differs from the preceding versions of the blockchain and nodes operating on older versions will not be recognized and accepted by the new version. It means that all miners and nodes need to migrate to a new version of the blockchain protocol if they want to be a part of the current forked chain. There are a variety of reasons why developers may implement a hardfork: Fixing important security risks found in older versions, adding new features, or reversing transactions. Hardforks are only implemented with great support from the cryptocurrency mining community. Only when a majority of group members reach an agreement on the hardfork should developers start working on the code update. Typically, the support should be anywhere from 90% to 95% in order to hardfork.
One of the most famous hardforks is the Bitcoin and Bitcoin Cash split, which took place in 2017. Bitcoin is the dominant crypto, but high fees and transaction times have driven the community to build a new cryptocurrency that was promising better performance. The split was due to a fundamental disagreement as to whether SegWit was the best way to maximize the number of transactions performed per one block. A part of the community that was dissatisfied with SegWit decided to implement a different approach consisting of increasing the maximum block size from 1 to 8 MB.
This solution was not backward compatible and there was no consensus decision. As a result, the blockchain split into two branches. The branch that adopted the change rebranded its blockchain as Bitcoin Cash (BCH), the branch that did not implement the change kept the original name of Bitcoin (BTC). Bitcoin Cash is not backward compatible, any block with a size smaller or equal to 1MB is considered to be valid for both the BCH protocol and the BTC protocol, but any block greater than 1MB is considered to be valid only for the BCH protocol. Since the time of implementing this update, the history of the two blockchains has begun to diverge. The underlying currency of the network is also split when blockchain is branched. If not, then any block with a size compatible with both protocols would be processed by both blockchains resulting in a double-spending problem. The issue is resolved by establishing a new currency (BCH) that shares the same history as the old currency (BTC) until the time of the split, and then becomes separately and independently controlled. At the time of the split, the same amount of BCH was issued to each BTC holder.
Hardforks and soft forks ensure the long-term success of blockchain networks. It allows developers to make changes and upgrades in decentralized systems. Forks allow blockchains and cryptocurrencies to integrate new features as they have been created.