What is a Fork, Soft Forks, Hard Forks, UASF – terms that are often referred to as blockchain technologies. What exactly is a “fork” and what types of forks exist? – Everything you will learn about forks here in this tutorial from Coding compiler.
What is a Fork?
A fork literally means the further development of open source software. Naturally, because open source software is freely accessible and downloadable by anyone, anyone has the opportunity to make their own copy of the software and modify it for their own purposes. This would have the person forfeited the software.
Modifying the software is by no means considered a nuisance, but even an elementary and desirable part of open source projects. Users with programming skills can add new functionalities according to their own needs – so different distributions of software can exist.
Related Article: What is Ethereum Mining & How Does it works?
What do Forks have to do with Blockchains?
Based on a public blockchain such as the Bitcoin, this is ultimately based on open source code, which can be locally modified by developers as described above. However, with blockchain technologies it is essential that the network participants agree on certain points.
It would therefore be problematic if some miners in the network, for example, use the SHA-256 hash function and other network users use a different hash function. After all, you do not want to just write transactions in your own “budget book”, but do it in a way that is recognized by as many network participants as possible.
Related Article: What is Blockchain and How does it work?
This looks like in practice as follows:
- There is a generally accepted Bitcoin version.
- Users want new features, such as increasing block size, to solve capacity issues.
- Any user copies the current Bitcoin software and modifies it with a higher block size.
- He makes the software available to other users who can also use it.
- Now there are two versions of Bitcoin software on the network and users can decide which ones to use.
But beware: The differentiation between Blockchain Forks and Forks software is important. While Forks are used in the latter case to develop new or additional services based on existing ones, in the context of blockchains, Forks are more aiming at presenting an alternative .
In particular, forks should be classified in terms of their impact on existing software or on the blockchain network :
Related Article: What Is Bitcoin Mining And How Does It Work?
Types of Forks
To understand the explanations, you should know what Nodes is all about. Briefly explained, the nodes store as network nodes the blockchain and provide it to the network. In the best case, the current consensus of the blockchain, ie the most recent transaction history, is stored decentrally on all nodes.
All nodes in the Netzerk must be run with compatible software so that they can communicate on a blockchain. If an amendment is tabled, there are two ways to do it:
What is a Soft Fork?
A soft fork is characterized by its backward compatibility. So there can be nodes in the network working with the new software. This does not lead to compatibility issues: The nodes with the old software also accept the opinions of the users who have now opted for the new software. On the other hand, the users want to establish their standard with the new software and therefore rely on their new procedure for all blocks.
As soon as the majority in the network is reached, all nodes agree on the new blocks.
- “Old” and “new” nodes continue to work together
Related Article: What is Ethereum? How is Ethereum Different From Bitcoin?
What is a Hard fork?
This type of fork is not backwards compatible – and therefore brings with it special challenges to guarantee network consensus. Existing nodes would need to update their software to accommodate the new blocks (at Soft Fork, the existing nodes could easily take the new blocks into account for compatibility).
The incompatibility of the versions leads to a kind of splitting of the network: users who vote for or against acceptance of the changes then operate on different blockchains. This is called a blockchain fork (not to compare with a software fork). It is important to emphasize that not every Hard Fork is a new, stable blockchain.
- “Old” and “new” nodes go their separate ways. There can be two blockchains.
Related Article: What Is a 51% Attack And How Does It Work?
How is a fork done?
Let’s look at a fork on the example of Bitcoin. The Bitcoin Core Team may be able to suggest changes – but not enforce them on their own. In the end, the miners decide which Blockchain to follow. This preserves decentralization, because here as well the decision-making authority is left to the network. The core team can certainly drive forward further developments – but it must always pitch again before the miners and hope for acceptance.
In the past, Ethereum and Ethereum Classic have actually had a crucial split in the Ethereum Blockchain: After the DAO hack, the community has been discussing intensively over reversing the transfer of hacked coins by agreeing on a blockchain to facilitate this transfer not included.
Of course, option A) Hacker may keep his prey with option B) action of the hacker is undone not compatible. The procedure therefore requires a hard fork. And unless 100% of the participants agree on a version, it will split the blockchain.
This happened by now having two Ethereum Blockchains: Ethereum Classic (without Hard Fork: the hacker remains in possession of stolen coins) and Ethereum (with Hard Fork: unwanted transaction was reversed).
Now there are several ways to do a fork – not to be confused with the different types of forks.
Related Article: How Does Bitcoin Transaction Works?
Miner Activated Fork
In this case, the miners in the network decide if a fork will be executed. They signal that they want to do the fork by attaching this information to confirmed blocks. If within the last 1000 blocks a sufficient amount of miners has signaled the fork, the changes will be enforced. For example, the new version is valid from 75% approval, from 95% even old blocks are rejected, which are not marked with the new version.
User Activated Soft Fork (UASF)
The User Activated Soft Fork (UASF) is a fork made by a majority decision among the Full Nodes. It is scheduled to a specific date on which the majority of Full Nodes must agree to it so that the Fork really comes about.
Miner Activated Soft Fork (MASF)
In a Miner Activated Soft Fork (MASF), miners use their computing power to vote on the fork and initiate it. This makes the process more efficient because the full nodes can take over the changes afterwards. However, the MASF brings with it risks because the network relies on computational power as a benchmark.
For example, the computing power can tell that the soft fork is taking place, but in fact the miners continue to work with the old version without the soft fork.
Related Article: How Does Ethereum Mining Works?