What Is A Fork (Blockchain) ?
A blockchain fork refers to a split in a blockchain network. When the network is open source, it means the code is freely accessible to everyone. It means that anyone can propose changes to the code. The open-source nature of code is fundamental to how cryptocurrencies operate. It is also how upgrades to the blockchains are made possible.
A fork occurs when the software of different miners is not aligned. It is up to the miners to decide which blockchain they will continue to mine. If there is no unanimous vote, a new version of the blockchain network can be created. When that happens, it can lead to increased price volatility.
How A Blockchain Fork Works
The primary means of creating a new cryptocurrency is to create one from scratch or fork an existing blockchain. A fork works by introducing changes to the software protocol on which the blockchain was built. These forks often lead to the creation of a new token.
Creating a token from scratch is the most common method. With this method, code is copied and pasted and then modified to launch a new token. The network built from scratch must be convincing enough that people will start using it. One good example of this is Litecoin (LTC), which is a clone of Bitcoin. Its founders changed the code, which convinced enough people to join the network.
The other method is to fork a blockchain. This method makes changes to an existing blockchain instead of beginning from scratch. The result is that two versions of a blockchain are created. One good example is Bitcoin cash (BCH), which came into existence due to differences in the Bitcoin community. As these differences were not resolved, a new coin was born known as Bitcoin cash.
Temporary Fork / Accidental Fork
A blockchain fork can be intentional or accidental. The question of what is a blockchain fork has already need answered above. An accident fork occurs when two or more miners find a block at nearly the same time. Such a fork is only temporary. It is quickly resolved when the subsequent block is added, making one of the chains bigger than the alternative. The network will then abandon the fork blockchain that is shorter, turning the block it contains into orphaned blocks.
Hard Forks vs. Soft Forks
Forks can be said to be hard or soft. An example of a hard fork is the Bitcoin Cash blockchain. With a hard fork, the changes to the code are so radical that users have to move to a new version of the software. Nodes that run the previous version of the blockchain network will no longer recognize the new version. With a hard fork, there is a permanent divergence from the earlier version. If there is no unanimous consensus, it can lead to two blockchains with variants of the same software.
With a soft fork, the blockchain networks have backward compatibility. It means the upgraded blockchain version can be used to validate transactions. However, nodes that were not upgraded can still see the new blocks as valid. It only works one directionally. It means that the upgraded blockchain does not recognize the nodes that have not upgraded to the new version. For a soft fork to work, most miners need to move to the upgraded version.
The more miners that move to the new network, the more secure it will be. With a soft fork, you will not get a new cryptocurrency. Many blockchain networks, including Ethereum and Bitcoin, have made soft forks. They are usually to implement a few software upgrades on which the community has consensus.