Forks take place when a new blockchain splits from an already existing blockchain. They occur when a protocol is updated or new protocols are added to a blockchain, which results in both an old and a new version of the blockchain. There are two types of forks:
- Soft fork: A soft fork is a backwards-compatible upgrade, meaning the upgraded nodes can still communicate with the non-upgraded nodes on the blockchain. Soft forks typically take place when a protocol is added or updated that doesn’t conflict with the older protocol on the blockchain. This results in that some nodes work in the ‘old’ version of the blockchain and other nodes work in the ‘new’ version. All nodes still create blocks at the same time, but the protocols used are different. Eventually, the old nodes will be updated and start creating updated blocks too.
- Hard fork: Hard forks are backwards-incompatible software updates. They usually occur when nodes implement new protocols that conflict with the protocols of the old version of the blockchain. Updated nodes can only communicate with other nodes that are using the new version of the blockchain. As a result, the blockchain splits, creating two separate blockchains: one with the old protocols and one with the new protocols.