You might heard of the term forking many times in the last few years, if you are in the Blockchain industry by any chance. Here we are attempting to provide a clear understanding of what is meant by forking.
It is not a blockchain specific term;
In software engineering, a project fork happens when developers take a copy of source code from one software package and start independent development on it, creating a distinct and separate piece of software.
What is meant by forking in Blockchain - basics
At its most basic, a fork is what happens when a blockchain diverges into two potential paths forward — either with regard to a network’s transaction history or a new rule in deciding what makes a transaction valid. But forks also can be willingly introduced to the network. This occurs when developers seek to change the rules the software uses to decide whether a transaction is valid or not.
What is meant by forking in Blockchain - advanced
Forking in each and every Blockchain is different, based on the design architecture and use case the chain. We shall look into a more generic scenario.
Fork can happen in following situations
- Anytime two miners find a block at nearly the same time.
- Developers seek to change the rules the software uses to decide whether a transaction is valid or not.
Types of Forks
Soft fork: by contrast, is any change that’s backward compatible.
Hard fork: is a software upgrade that introduces a new rule to the network that isn’t compatible with the older software
User-activated soft fork (UASF): is a controversial idea that explores how a blockchain might add an upgrade that is not directly supported by those who provide the network’s hashing power.
What happens when the blockchain forks?
It’s actually quite simple: you get two chains with a shared genesis and are identical up until the forking point, after which they exist exclusively in parallel (unless one is completely abandoned), creating two separate networks.