A fork is a common thing in various blockchain projects. A blockchain is a decentralized database, a chain of consecutive blocks that stores information about the transactions on the network. The structure of the blockchain and the structure of the blocks are supported by the protocol embedded in the software code of the network's nodes. Any changes to the protocol is a fork.
Reasons for forks
Blockchain developers often claim that forks are needed to improve blockchain technology and optimize the network. The most common changes are:
- block size increase to increase throughput rate(transactions/sec);
- lowering transaction fees.
Sometimes, the blockchain developers can have different views on the project updating, they can even have serious disagreements within the blockchain project community. For these reasons a fork can also emerge.
Types of forks
Forks are divided into hard fork and soft fork depending on the scale of the modification of the blockchain protocol.
- A hard fork is a significant alteration of a blockchain's algorithms and code, which results in either a completely new version of the blockchain or blockchain splitting into two separate networks. Hard forks are often used to launch new crypto-projects (cryptocurrencies).
- A soft fork is a minor change of a blockchain protocol that results in two parallel versions of the protocol, meaning that all blockchain nodes operate on the same network, but some of them under the old rules and some under the new ones.
Reasons for hard forks
The blockchain code can be altered and modified to avoid bugs and vulnerabilities, to add new updates and features.
When those alterations are significant, they are called hard fork. A parallel copy of the protocol is generated, but with the addition of new code.
Hard fork modifications allow blockchain nodes to add changes that contradict the rules of operation of previous nodes. Accordingly, the new nodes can only work with the nodes using the new version of the blockchain. As the result, the blockchain completely migrates to the new protocol or splits into two separate networks: the old one has the old rules and the new one has the new rules.
Moreover, all of the coins of that blockchain sort of split, as a new blockchain with a new coin appears, with the same balances on the same addresses as the old blockchain. In this case, the market value of the original coin is usually divided into unequal shares: the less popular coin resulting from the fork is worth less than the more popular original coin. It helps to maintain the current blockchain protocol and avoid update failures.
Hard forks concern significant alterations, and they are also used to resolve controversial situations.
To put it simply: a hard fork used to make serious alterations to the blockchain operations, causing blockchain split into two separate networks.
Participants in a hard fork
Generally, a hard fork results from prolonged discussions leading to a consensus in the blockchain project community. Initially, a proposal is put forward, then it is finalized, tested, and finally implemented.
When an update is crucial and affects not only technical changes, but, for example, changes the tokenomics of a cryptocurrency project, the discussion can go beyond the blockchain development community.
For example, the Ethereum blockchain has an entire system to improve the network (Ethereum Improvement Proposal).
To activate a hard fork, you need to write a new programming code, but a majority of participants also need to agree on that. Besides blockchain developers, network validators are also participating. After all, it is up to them to make the blockchain work, and if they do not agree with the developers' proposed update, they simply will not migrate their compute nodes to it.
It is important to understand that the blockchain protocol cannot be changed without community consent, as it is not only the network that is decentralized, but also the software layer.
Blockchain projects resulting from hard forks
If a majority of blockchain project participants agree with the update, the network follows the new protocol. But without unanimous consent, some nodes move to the new version of the blockchain, while others work according to the old rules. The result is that the blockchain splits into two chains.
The largest hard forks are Bitcoin Cash, Ethereum Classic, Merge.
Reasons for soft forks
A soft fork is a backward-compatible upgrade, meaning that the upgraded nodes can still communicate with the non-upgraded ones.
Backward compatibility provides that old transactions can be recognized by new nodes. Complying with the new protocol requires only part of validators to be updated, but not all nodes as in a hard fork.
To put it simply: a soft fork is an improvement of the blockchain's performance, with the old and new protocols functioning harmoniously in the same network.
Soft forks do not result in separation of the blockchain into autonomous networks, the release of new coins, or any other fundamental changes.
Soft forks intend to solve the following issues:
- increasing network performance;
- lowering commission fees;
- increasing blockchain privacy;
- improving security.
As a result of soft fork, network participants need to update their software, but it is not that necessary. It is possible to work under the old rules as well.
Soft forks improve various properties of cryptocurrencies, eliminate bugs in the code, and stimulate competition.
The famous soft forks are SegWit (Bitcoin soft fork designed to increase block size to enhance throughput rate), Pay to Script Hash (P2SH; soft fork designed to change bitcoin addresses format), Replace-by-fee (Litecoin soft fork designed to edit transactions to change commission level).
Forks are common things within any popular blockchain. Crypto users can benefit from learning about forks and increase their investment and trading income.