Before we explain what a cryptocurrency fork is. It is best to understand some common terms. So first things first, the basics:
- Mining is the process of validating transactions via cryptographic ecalculations. Miners are rewarded in cryptocurrency (the crypto being mined) for their effort. The reward is usually a variable ‘mining fee’.
- A digital signature is a calculation that validates the authenticity of digital messages. In this case- the transaction of a cryptocurrency.
- For cryptocurrency, the actual owner of a coin is the person that holds the ‘private key’. The digital signature verifies that the person sending a currency as a transaction is the actual owner and therefore not a fraudulent transaction.
- A hash function takes an input (or ‘message’) and returns a fixed-size alphanumeric string; a ‘hash’ is produced every time a calculation is performed.
- It is the hash function that acts as the signature for crypto transactions.
- reflects the hash rate, the rate at which hash functions are being performed.
- As the hash function requires computing power, the hash power is also proportional to the computing power that is being used within the entire network.
- The hash rate is therefore also measuring unit of the processing power of the crypto network.
- As an example, if only a single computer (minter) is mining a cryptocurrency, then that miner is controlling 100% of the hashing power
- Transaction data is permanently recorded in files called blocks (hence the term blockchain). Think if the block as a page in a transaction book.
- means that any updated software is still able to recognise the old data or code of the existing blockchain
- Software that follows the new rules allows itself to be compatible with software that follows the old rules
- E.g. Version 1 (old) and version 2 (new) of a software exist- where version 1 can read and validate what version 2 produces, version 2 however can read and understand what version 1 has produced in the past but rejects what version 1 produces in the future
- If something is not backwards compatible it means that both the older and the newer version reject what the other one produces
- This is very important within blockchain technology, lack of backwards compatibility can have major consequences for the respective cryptocurrency
- refers to a change or upgrade that is pre-planned. The community or the developers proactively work together to create this fork.
- A contentious fork is due to disagreements within the community which results in a portion of them creating a new chain (and in their perspective a better one) by introducing major changes to the code, just like the creation of Bitcoin Cash.
Now to what is a cryptocurrency fork?
A fork is a change to the software of the digital currency that creates two separate versions of the blockchain. Forks, in fact, are not a rare occurrence. They happen often as a blockchain is processed. These temporary forks occur when miners discover a block at the same time, resulting in two split chains.
Imagine a blockchain exists such that the first two blocks are valid, as depicted below. In the next instance two further blocks 3 and 4 are discovered by the miners. This has essentially created a split in the chain i.e. a fork. Technically at this stage we have two separate chains. Viewing the chain backwards from block 3 is the same as viewing the chain from block 4. As both share the history of the same chain.
Now imagine the next block discovered is block 5 and this block follows block 3. The longest chain has been created. This chain is now seen as the valid chain.
The chain that is the shortest as shown below is abandoned i.e. the shortest chain that ends in block 4 becomes obsolete.
This is a natural consensual fork that occurs within a blockchain or cryptocurrency such as Bitcoin, and is part of a very normal process.
However forks can also occur when any other changes to the software or rules of the blockchain happen.
Forks can be classified into two further categories that are permanent cryptocurrency forks: soft forks and hard forks.
A hard or soft fork represent a permanent change of the underlying codes by developers. The reason for changing the code base can be due to:
- Adding new features to enhance the network’s functionalities
- Changing a core rule (such as increasing the block size)
A soft fork is typically a backwards compatible fork in the blockchain.
This type of fork usually allows for a gradual transition to the upgraded software. Temporary chain splits do occur after a soft fork. However the chain with the most hash power will always win over the one with less hash power.
For example, imagine that there are 6 nodes in a network. Node N1 to N4 have upgraded their clients (software) to reflect the blockchain enhancements while N5 and N6 continue to use the old software.
Now imagine that a new transaction occurs. In the below example, N1 will successfully mine the block to validate the transaction (block 3). In this case the block is accepted by by all the nodes because the upgrade is backwards compatible. Meaning N5 and N6 will also accept the new block.
Block 3, the newly accepted block, is therefore added to the blockchain.
On the other hand, if the non-upgraded nodes mine new blocks (for example N6 mines block 4), these blocks will be rejected by the network. As majority of the hash power is with N1 to N4, only blocks mined by these nodes are always accepted, and therefore rewarded. N6 and N5 then have an incentive to therefore upgrade the software so their mined blocks can be accepted in the future. Failing to do so means their mined blocks continue being rejected, and rejection equals no reward!
In an ideal scenario the soft fork shouldn’t create a permanent secondary chain as the chain with least hash power should become orphaned.
On the negative side, a soft fork may not go as planned if only a minority of hash power in the network supports the upgrade. In which case the upgraded chain may become the shortest and therefore the one that becomes orphaned instead; and the chain that follows the old rules continues to be supported by the majority hash power.
A hard fork is a software upgrade that is not backwards compatible.
Nodes that continue running the old version of the software will see the new transactions as invalid, while the upgraded nodes will no longer recognise the old rules.
A hard fork is a permanent split from the old chain which creates two chains. The community may continue to adopt both chains indefinitely, meaning that miners would continue to mine blocks for both chains and developers continue to support both. But essentially they split creates two separate cryptocurrencies that follow different rules moving forward into the future.
The hard fork can be seen in the below example.
Imagine that N1 through to N4 have upgraded to the new software, however N5 and N6 wish to continue with the old rules. In this case block 3 mined by either N5 or N6 would not be recognised as a valid block by any of N1, N2, N3, or N4. Likewise block 4 is not recognised as valid by N5 or N6.
This creates two separate chains, Chain X that continues to follow the old rules, Chain Y that follows the upgraded rules. As the life of either chain is now no longer dependent on the hash power of the other chain, either chain can continue to exist, as long as they are supported by the community.
So why all the fuss?
At the heart of blockchain is decentralisation – meaning that no one entity controls 100% of the blockchain nor the technology behind it. This applies to any new upgrades to the software or new rules that are proposed which govern how transactions are processed on the blockchain.
When forks are planned and supported by the entire community, no issues occur- regardless if it is a soft fork or a hard fork.
Infact these types of forks have occured regularly. One of the lesser unknown ones being in the early days of Bitcoin
On 6 August 2010, a major vulnerability in the bitcoin protocol was spotted. Transactions weren’t properly verified before they were included in the transaction log or blockchain which let users bypass bitcoin’s economic restrictions and create an indefinite number of bitcoins.On 15 August, the vulnerability was exploited; over 184 billion bitcoins were generated in a transaction, and sent to two addresses on the network. Within hours, the transaction was spotted and erased from the transaction log after the bug was fixed and the network forked to an updated version of the bitcoin protocol– Wikipedia
However, when the fork is contentious, that is, it only has partial support from the community…. well that’s when issues can occur.
There are no easy ways to prevent contentious hard forks…yet. Chain splits create additional chains, take up additional resources, and dilute the crypto markets. However it’s natural that within a decentralised ecosystem, we will see political views, bias and strong prejudice. These will continue to cause partiality to various chains.
So, forks aren’t a bad thing in cryptocurrency. In fact they are a normal, and repetitive occurrence. However these are the consensual forks- planned, supported upgrades to software that the entire community agrees on- which will play a big part in the evolution of cryptocurrency. However contentious hard forks are burdensome on the crypto communities. So until and unless contentious hard forks can be resolved through consensus we will continue to see multiple chains born out of core chains- creating more confusion and dilution than necessary.
If you found our content valuable, please help support us: