Every cryptocurrency is powered by a decentralised open-source software called a blockchain. A fork is when the blockchain underlying protocol changes. The change can be either a massive shift or a simple one and can be launched by the community or the developers.
The fork is akin to software updates and upgrades on devices. However, while the centralised software upgrade is possible within a click of a button, the decentralised upgrades like in blockchain are more complex. The lack of a central authority on decentralised platforms means the whole network must reach a consensus before any updates. It is this unique update or upgrade of a blockchain that makes a fork. There are either soft or hard forks depending on their purpose.
What is a hard fork?
Forks are the upgrades or updates on the blockchain that leads to a split in the main network. These changes mean there would be a cryptocurrency running on the old blockchain while a new one is created to run on the newly formed blockchain.
A hard fork works such that the rules of the blockchain change and the old and the resulting blockchains become incompatible. This means the old nodes cannot accept any newly formed blocks with the updated rules. The news nodes also reject the old blocks, hence no continuity. Both sets of nodes follow different sets of rules hence finding each other to be invalid.
One of the ideal examples of a hard fork is the Bitcoin fork in August 2017. The split in Bitcoin came as a result of the community failing to agree on the scalability solution. While one team wanted the Bitcoin block size increased to accommodate more transactions, others felt it was better off unchanged. Those who wanted to increase block size ended up creating the Bitcoin Cash, while Bitcoin remained unchanged. Even though BTC and BCH currently operate as two distinct cryptos, they share a common history leading up to the crypto fork.
What is a soft fork?
Unlike in hard fork where the blockchains become incompatible, soft forks come with changes to the blockchain without having to introduce a new token. The older blockchain accepts both the old blocks and the new sets of blocks created using the new rules.
It is more like the soft fork tricks the blockchain into accepting both the old and new blocks of transactions simultaneously. Both sets of blocks find a way to operate as two lanes within the same blockchain.
An example of a soft fork is the segregated witness (segwit) on the Bitcoin protocol in 2015. The segwit was all about creating more space on the Bitcoin block by removing the digital signature data from a transaction. This would free up more than 65% of the block hence accommodating more transactions. The segwit increased the block size from 1 MB to 4 MB for cheaper and faster transactions. However, the nodes approved both blocks even with the changes.
Hard fork VS soft fork
Both hard forks and soft forks come with pros and cons. Therefore, the crypto world is yet to declare one better than the other. A soft fork, for example, is hailed for the ease of changes. It however comes with security concerns as some bad actors can use it to validate transactions that do not meet network requirements.
The hard forks come with the concern of diving communities. Given there’s no middle ground, every team takes an extreme approach to the other. The reduction in the hashing power of the network can also mean vulnerable security.
Either way, crypto forks remain part of blockchain technology. There might only be a need for smoother ways to transition for updates and upgrades.