Episode 14 - Fork
Blockchains are decentralized systems. It means there is no single point of control or failure. This also means multiple parties store the data and continuously trying to reach an agreement (consensus) on the state of the blockchain.
For multiple parties to reach consensus, they must follow some rules. Rules regarding how to decide who would produce blocks and when, the interval between blocks, how big or small the blocks could be, and so on. These rules are together part of the consensus algorithm of the chain.
These rules are updated from time to time to introduce functional optimizations to the blockchains. At this time, when an update is supposed to happen, it is up to the parties to begin following the new rules by updating their nodes (software) or not.
When some of the nodes decide not to update to the new rules, then a fork happens on the chain. Forks are of two types — soft and hard.
A Soft Fork happens when the new rules are compatible with old ones. Even if some of the nodes chose not to update, they could still be part of the chain and participate in the consensus process as per the old rules.
A Hard Fork happens when the new rules are not compatible with the old ones. When some nodes don’t update in this case, they don’t participate in the consensus process on the updated chain. In such cases, depending on how the communities decide (old rules vs. new rules), there could be two different blockchains each following old and new rules separately.