Table of Contents
The term “fork” is used when a blockchain undergoes a fork resulting in the generation of two blockchains that will cease to have any relationship between them from that moment on. There are several types of these forks depending on the scenario in which they occur, the most common being the hard fork and the soft fork, although there are some others such as the temporary fork and the accidental fork.
Before explaining the differences between these forks, let’s first look at the reasons why they can occur.
Blockchain technology is interesting because each of them provides a set of rules that make it work. Miners, clients and nodes agree on their own to join, stay and protect a network because they fully understand and accept the rules.
Updating any computer application creates a new version, and Blockchain technology is no exception, however, in this case because of its own decentralized nature, it has many peculiarities.
Access to the internet and the increase of innovation in different fields of technology, allows anyone to be aware of what can be done by applying a series of improvements on a software. If, for example, we were Bitcoin enthusiasts, we could simply submit a BIP, a ‘Bitcoin Improvement Proposal’, which is simply a suggestion of how to improve one or more features of the software. If enough people like our idea, they can ask for that software improvement to be implemented.
But things can get complicated when people already inside a network decide to change these rules for one reason or another. In fact, BIPs can lead to disagreements in communities that can lead the more conservative ones to stay with the old rules and those who do like the new changes to join a new project.
If the Bitcoin Blockchain were to find itself in this situation, either try to reach a middle ground where everyone is satisfied and therefore a new compromise is reached by everyone or, eventually the split would be allowed to happen.
Building consensus on what to do is one of the freedoms introduced by Blockchain technology, it is the community that has the power to decide.
Going back to the previous case, if members of the Bitcoin community were to finally reach a compromise that such an improvement proposed by us is implemented on the blockchain, users would not have to choose which version to follow of the software as the fork would not happen, but you would only be dealing with an upgrade of the current software.
A soft fork is used to introduce different network-consensual changes to the Bitcoin software. These changes must always be fully compatible with previous versions allowing the coexistence of both new and older versions without users having major problems both in their use of any version and in wanting to upgrade to the latest one.
What is sought, therefore, is to change the rules established to validate the blocks. Blocks that would have been previously validated may no longer be valid under the new rules, however, those that were invalid before will also be invalid now under the new rules.
For these types of updates to the Bitcoin software to occur, it is only necessary for the Bitcoin Core software to be updated by the majority of miners, although it is more convenient for all members of the network to have the new version of the software so that the new rules established are the same for everyone.
Although, as we have seen, this type of update is usually carried out by the miners, there is another procedure called UASF, which is short for User Activated Soft Fork. This represents a mechanism in which the activation time of a soft fork on the Blockchain is applied by the full nodes, which are commonly referred to as the economic majority.
Traditionally, soft forks have been activated by miners, who exercise their control over the network. However, a UASF mechanism takes this control from the miners and places it in the hands of the nodes.
Soft forks are intended to improve Blockchain operations by introducing new features. Unlike hard forks, soft forks do not split the Blockchain network, as they simply implement some slight changes with the intention of improving the current blockchain and more importantly, they do not violate any current rules of the existing protocol, whereas hard forks do.
However, there may be different opinions on how and when these changes should be adopted. Usually, miners could greenlight a soft fork and set its activation time by leveraging its hash power.
But sometimes the entire Blockchain community might not agree with the majority of miners, and this is when a UASF makes sense. Under the concept of the UASF mechanism, it is the
Blockchain economy, including individual users, wallet providers, exchanges and other entities, that triggers the activation of the soft fork.
When the economy triggers the soft fork, everyone ignores transactions and blocks that do not comply with the new rules. While miners could break the new rules if they wanted to, it is in their interest to avoid approving invalid transactions and blocks since their block reward would be meaningless in an ecosystem that considers those blocks to be invalid.
As we can see, a UASF involves a great deal of coordination and the support of an entire Blockchain community and although it may seem complex to achieve, we have a clear example that it is possible with the famous BIP 148 case.
A hard fork is, like a soft fork, an upgrade of Bitcoin software, however, the difference lies in backward compatibility. In this case, the new versions are not backward compatible, i.e., both versions cannot coexist, and network members must upgrade if they want to continue to be able to verify and validate the blocks of the new chain.
One of the consequences of a hard fork is that all blocks that have been confirmed by a node that does not have the latest version of the software will no longer be valid. Therefore, nodes that want their blocks to continue to be verified by the forked network will have to follow the new consensus rules.
The abandoned blockchain, may continue to exist in case it still receives support from miners, so eventually both chains could end up existing at the same time.
Hard forks can generally have two subcategories, they can be a planned hard fork or a contentious hard fork.
Planned hard fork:
A planned hard fork is simply an update to the protocol that had already been clarified in advance by the project developers. Usually, a high degree of consensus of the project developers and the community would have already been reached before the hard fork occurred. An example of planned hard forks would be that of cryptocurrency Monero in January 2017, which saw the addition of a new privacy feature known as Ring Confidential Transactions (RingCT).
Contentious hard fork:
These types of hard fork occur when there is a serious disagreement between various stakeholders in the project, which may include: project developers, network users, and miners. Contentious hard forks typically take place because one part of the community believes that major changes to a Blockchain’s code will produce a superior blockchain. A well-known example of a contentious hard fork was Bitcoin Cash. Where it was believed by one part of the community that increasing the Bitcoin block size from 1MB to 8MB would allow faster processing of transactions on the network.
The hard forks, is a process that will certainly continue to be done in the future and with much more assiduity than so far. In fact, a blockchain must have hard forks throughout its life to remain healthy, truly decentralized and able to absorb the constant improvements generated by technological evolution.
In this unit we have learned that the most basic part of a blockchain are the blocks, which shape and build a Blockchain. These blocks contain different types of data and basic information to maintain and continue the structuring of the blockchain. When one of them is completed, it becomes an indivisible link and gives way to the generation of a new block.
In this way, the entire network runs in a cycle and all data is stored permanently. Each block contains records of some or all recent transactions, and a reference to the block that preceded it, which, together with the point-to-point verification system, makes all transactions that are recorded in the blocks of the chain impossible for any user to change or delete.
All this information contained in the blocks must be secured, for which the hash function is used to encrypt all the content. This hash function must have three basic properties:
– Its input can be of any size.
– Regardless of its input, the output will always have the same size.
– It must be computationally efficient, being able to calculate the output in a reasonable amount of time.
Satoshi Nakomoto’s major innovation was to create a new rule that was added to the existing ones. When a new set of transactions (a block) is added to the existing chain, an extremely difficult and impossible mathematical problem must be solved.
This task is done by the so-called “miners” and consists of finding the origin that gives rise to a given hash. When the origin is finally found, a new block is added to the chain and whoever has solved the “riddle” receives a reward in the form of the coin being mined. Solving the problem is what is called “proof of work”, which is a test of how much energy was used to try to solve the problem.
A public key is addresses where we can store cryptocurrencies, for example, and they need the private keys to be unlocked.
Mining is usually confused with creating new Bitcoins, however, the mining process is what makes the Blockchain a fully decentralized system. It gives security to the system and enables it without a central authority. One must clearly differentiate the mining of the new Bitcoins that are generated and delivered to the miners, from the actual process they perform.
A “Soft Fork” could be defined as an update of the characteristics of a blockchain, with the new version being fully compatible with the old one.
A “Hard Work”, on the other hand, is a separation of the main chain, thus creating two totally different chains that are not compatible with each other.