When something splits into two alternative pathways it is called a ‘fork’, as in the popular phrase ‘a fork in the road’. In digital currency circles there are various different, but related, types of fork which commonly occur: codebase forks, blockchain forks, hard forks and soft forks. All of these terms, as they relate to Bitcoin and other cryptocurrencies, are explained below.

What is a Codebase Fork?

A software developer may sometimes take the source code which runs an application, whether that is a cryptocurrency or any other software product, and make changes to it in order to create an alternative version. The newly altered version of the code is commonly described as a ‘fork’ of the original software.

There are many different reasons why a developer may create a fork. They may do so just to experiment to learn about how the software works, to test out possible changes and different configurations, to provide users with alternative versions of the same software, or to use the code as the foundation to start developing a new application. In any of these cases, the changes made in the forked version may then be ‘merged’ back into original source code.

If a piece of software is free and open source (FOSS), as the software which runs many digital currencies is, then its source code is stored in a public repository which anybody can view and access. This means that anybody can create their own fork of the software’s codebase. When creating a new piece of software, starting off by copying the code which runs something similar means that you do not have to continually ‘reinvent the wheel’, making development much quicker and more efficient.

Many digital currencies today started off as codebase forks of Bitcoin, or as forks of another coin which itself may have derived most of its code from Bitcoin.

Although these coins may use a great deal of the computer code from their predecessors, they launch their own blockchain with its own ‘genesis block’ as the starting point of a new transaction history. As a result, these coins are completely independent, even if they are a ‘clone’ with exactly the same codebase.

What is a Blockchain Fork?

The technology which runs digital currencies like Bitcoin is based on something called a ‘blockchain’. Transactions are grouped into blocks of time – for example Bitcoin blocks are roughly 10 minutes long. Each time a block is generated it is supposed to include all of the transactions which have taken place since the last block was generated. This creates a continuous history of every transaction which has ever taken place on that network, which is called the block chain, or ‘blockchain’.

Usually the distributed consensus process ensures that everybody using the network is in full agreement that this blockchain represents the correct and true transaction history. When a new block is generated, individual alternative blocks may be generated by other miners, but these ‘orphan blocks’ are quickly abandoned and do not grow into alternative chains.

Sometimes, however, the blockchain may fork – meaning that there are two competing versions of the transaction history.

Once a blockchain has split in this way, the coins owned by users on one chain may not be recognized by the users on the other chain. A person who owned coins before the split would find that they own coins on both of the new chains, but would need to use different wallets to access and spend each set. Anybody who receives coins after the split would only own those coins on the chain from which they were sent.

The most common reason for this happening is if part of the network is using software which is not completely compatible with the rest of the network, meaning that its transactions are not recognized and accepted by other users. It may also happen as a result of other bugs and problems. If this is unintentional then it will usually be resolved by the weaker side (the side with fewer users and / or  lower hash rate) abandoning their fork so that they can re-engage with the rest of the network.

In some cases, however, a fork may be more deliberate. As described below, a ‘hard fork’ in the code which runs a coin may result in two different versions of the network.

What is a Hard Fork or a Soft Fork?

When the developers of a coin want to make changes to the software they will create a fork and alert users that they should upgrade to the latest version.

Sometimes upgrading to the latest version is optional, meaning that you could still keep running the old version and still be part of the same network as the users who do upgrade. This is known as a ‘soft fork’.

More substantial changes often require a ‘hard fork’. This means that the new version is not compatible with the old version. If a developer pushes out changes which are controversial then some users may choose to upgrade while others do not. This would cause a fork in the blockchain itself – splitting the network into two competing versions.

Because it is ultimately the users of the network who decide whether to upgrade, the developers cannot force substantial changes onto the network without the agreement of its users. Also, new developers are free to create different versions of the software and submit them to a coin’s community of users for consideration – and the coin’s users are free to decide whether to make the change or not, regardless of the wishes of the original developers. In other words, developers only control codebase forks – blockchain forks are entirely controlled by a coin’s users themselves.

« Back to Glossary Index