In the cryptoasset landscape, forks are an established feature but most people don’t have an idea of what they are let alone the difference between a hard fork and a soft fork. Blockchain the technology underlying digital assets is a distributed ledger of ever-growing blocks of data that form a chain of blocks. Cryptocurrencies are decentralized and because of this, the participants have a set of rules in validating transactions to achieve a consensus.
So what is a fork?
A fork in programming is an open source code meant for modification. A forked code is similar to the initial one but with the necessary modifications. A fork can be used to test for processes but in the crypto world, the fork is used to create a new asset with similar but not equal characteristics as the initial one or to implement any fundamental change. In the crypto world, all forks are not intentional as with any other distributed open source code. It happens when all nodes on the network replicate the same information. Most of the forks in cryptocurrencies, however, are due to disagreements over the embedded characteristics.
A hard fork is a modification or change to a protocol rendering all the older versions invalid. If the older versions continue to run, they end up with different data and a different protocol than the new version. This results in confusion and possible errors.
A hard fork in bitcoin, for example, is necessary to change some of the defining parameters such as the size of a block, limit to additional information that can be added, the complexity of the cryptographic puzzle to be solved etc. changing any of these rules causes blocks to get accepted by new protocols but rejected by the older versions. This can lead to significant problems including a possible loss of funds.
Unlike hard forks, soft forks are upgrades or updates to a block but the block is still compatible with the older versions. Look at it as a software upgrade. All the work done with an older version is still compatible with the new one. A soft fork won’t require any of the nodes in the network to maintain consensus or upgrade because all of the blocks in the soft fork blockchain still follow the previous set of rules in addition to the new ones.
For a soft fork to be effective, the majority of miners on the network must recognize the new set of consensus rules and also enforce them. When a majority does this, the older ones are rendered useless.