What are Soft and Hard Fork?

Forks, Soft Forks, Hard Forks, UASF – terms that are often referred to in blockchain technologies. What exactly is a “fork” and what types of you exist?

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 ability 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 elemental 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.

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. So it would 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 you want to make them so that they are recognized by as many network participants as possible.

This looks like in practice as follows:

  • There is a generally accepted Bitcoin version.
  • Users want new features, such as increasing blocksize, to solve capacity issues.
  • Any user copies the current Bitcoin software and modifies it with a higher blocksize.
  • 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: important is the differentiation between Blockchain Forks and Forks software. 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 the existing software or on the blockchain network:

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 problems: the nodes with the old software also accept the opinions of the users who have now opted for the new software. Conversely, however, 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.

Hard fork

This type of fork is not backward 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 simply 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. Ethereum now has five hard forks and only one of them has formed a new blockchain with Ethereum Classic.

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 intensely discussing how to undo 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 the stolen Coins) and Ethereum (with Hard Fork: unwanted transaction was reversed).