Blockchains are a type of decentralized open-source software that are used to power cryptocurrencies like Bitcoin (BTC) and Ethereum (ETH), among others. A change to the blockchain’s underlying protocol is referred to as a fork. A blockchain fork is an essential upgrade to the network that can either represent a significant change or a minor one. Blockchain forks can be initiated by either developers or members of the community.
Node operators, which are machines that are connected to the blockchain and help validate transactions on it, are required to upgrade to the most recent version of the protocol in order to comply with this requirement. Each node maintains its own copy of the blockchain and checks to make sure that new transactions do not invalidate its previous records.
A hard fork is an extreme upgrade that requires all validators in a network to upgrade to a newer version. A hard fork can render previously validated transactions and blocks either invalid or valid, depending on the circumstances. It is not compatible with previous versions. An upgrade to the backwards-compatible software that allows validators in an older version of the chain to recognize the new version as valid is referred to as a soft fork.
Because the previous version of the software is incompatible with the new version, a hard fork almost always results in the permanent splitting of the chain. This is the case more often than not. Those who held tokens on the previous chain will automatically receive tokens on the new chain as well due to the fact that the two chains have the same history. There are a variety of causes that can result in a hard fork.
Understanding hard forks
It is necessary to have a fundamental understanding of blockchain technology before moving on to grasp the concept of a hard fork. A blockchain is essentially a chain that is made up of blocks of data that function as a digital ledger. In a blockchain, a new block of data is only considered valid after the network validators have confirmed the validity of the block that came before it. The history of the data stored on the blockchain can be followed all the way back to the very first transaction that was ever conducted using the network. This is the reason why the very first block is still visible to us on the Bitcoin blockchain.
A hard fork is essentially a permanent divergence from the most recent version of a blockchain. This leads to a separation of the blockchain because some nodes can no longer meet consensus, and two distinct versions of the network are run separately.
This essentially signifies that a fork will be created on the blockchain, with one path continuing to adhere to the rules that have been in place up until this point while the other path will adhere to a new set of rules. Because a hard fork is incompatible with older versions, the older version will no longer recognize the new one as valid.
Because of the frequent chain split that they cause, hard forks are frequently regarded as being potentially hazardous. If there is a breach in communication between the miners, who are responsible for the network’s safety, and the nodes responsible for helping to validate transactions, the network as a whole will be less safe and more susceptible to assault.
A 51% attack is a common form of malicious action that can be taken against a blockchain. This type of attack occurs when a group of miners is able to obtain more than 51% of the computing power that is used to secure a network and then uses that power to alter the history of the blockchain. Some of the networks that came into existence as a direct result of hard forks have, in point of fact, been subjected to numerous 51% attacks, in which malicious actors spend the same funds twice. In these types of attacks, the malicious actors use the superior computing power they have access to within the network to reorganize the blocks, which then enables them to double spend.
Replay attacks are yet another type of vulnerability that might be introduced by hard forks. When a malicious entity on a forked network intercepts a transaction and then repeats that data on the other chain, this type of attack is known as a replay attack. Both transactions are seen as valid when there is no protection against a replay attack in a hard fork, which means that someone can move another user’s funds without being able to control them.
What causes a hard fork to occur?
Why do hard forks even take place if they have the potential to compromise the integrity of a blockchain so severely? The answer is quite straightforward: Hard forks are essential upgrades that must be implemented in order to improve the network in light of the ongoing development of blockchain technology. There are many potential causes for a hard fork, not all of which are negative, including the following:
- Improve functionality
- Address potential safety concerns
- Put an end to a dispute that has been raging within a cryptocurrency community
- Cancel transactions that have been made on the blockchain
Accidental hard forks are another possible occurrence. The majority of the time, these incidents are quickly resolved, and those participants who were no longer in consensus with the main blockchain, after realizing what had occurred, return to it and adhere to it once again. Likewise, those who deviate from the consensus can typically re-join the main chain when a hard fork is implemented, which adds functionalities and upgrades the network.
Accidental hard forks
Throughout its existence, the Bitcoin blockchain has been subject to a number of unintended hard forks. These occur more frequently than one might think, and the majority of the time, they are solved so quickly that they are hardly worth mentioning.
When two miners find the same block at nearly the same time, this is the situation that leads to the majority of accidental hard forks. Both parties initially agree that the block is legitimate and continue mining on separate chains until either they or another miner adds a subsequent block to the network. This happens because consensus is distributed across the network.
That subsequent block will determine which chain will become the longer one, which will mean that the other chain will be abandoned in order to preserve consensus. The abandoned chain is no longer profitable for miners to mine Bitcoin on, so they move on to the chain with the longest length. This is because mining Bitcoin on the abandoned chain would involve mining a fork of the network.
When one of these forks occurs, the miner who discovered the abandoned block is penalized by having both their coinbase and their transaction fee rewards reduced. However, because the two blocks that were discovered were identical and contained the same transactions, none of the transactions would be rendered invalid.
Code problems were the root cause of other accidental hard forks, which in turn led to short-chain splits. For instance, in 2013, a block was mined and broadcast that contained a higher number of total transaction inputs than had been seen before; however, some nodes chose not to process the block, resulting in a network split. After some nodes downgraded their software in order to get everyone to agree on something and reject this larger block, the problem was solved.
The difference between hard and soft forks
It is not necessary to resort to a hard fork in order to bring the software that underpins a cryptocurrency up to date. Soft forks, on the other hand, are regarded as a more secure alternative that is backward compatible. This implies that nodes that do not upgrade to newer versions will still consider the chain to be in working order.
The rules that must be adhered to by a blockchain may not be altered by using a soft fork, which allows for the addition of new features and functions. Soft forks are frequently the method of choice when implementing new features at the programming level.
In order to acquire a deeper comprehension of the distinction between hard forks and soft forks, it is helpful to imagine an upgrade to the fundamental operating system of a mobile device or a computer. After the update, the new version of the operating system will be compatible with all of the applications that are currently installed on the device. In this particular situation, a hard fork would entail the transition to an entirely new operating system.
Examples of noteworthy hard forks
In the world of cryptocurrencies, there are a lot of historical examples of hard forks, and not all of them happened with the Bitcoin blockchain. Some of them did, though. The following is a list of some of the most famous hard forks in history, along with an explanation of how they impacted the industry.
SegWit2x in conjunction with Bitcoin Cash
The SegWit2x upgrade was a proposed improvement with the goal of making Bitcoin more scalable. On the network for the cryptocurrency, it was planned to implement Segregated Witness (SegWit) and increase the maximum size of a block from one megabyte to two megabytes.
The controversial New York Agreement, which was reached on May 23, 2017, made a decision regarding the implementation of SegWit2x. According to the terms of the agreement, Bitcoin’s future was decided behind closed doors by a group of Bitcoin miners and business owners accounting for more than 85 percent of the network’s total hash rate.
The implementation of SegWit would take place through a soft fork, while the block size limit implementation would occur later on through a hard fork. The proposal was met with opposition because it did not involve any of the developers responsible for Bitcoin Core, the primary codebase of Bitcoin, and was perceived as a centralizing force — a group of businesses deciding the future of the network without miners and nodes coming to a consensus. The consensus was reached after years of discussion regarding scaling Bitcoin.
Proponents of smaller blocks argued that larger blocks would make it more difficult to host a full node, which could lead to increased centralized control of the cryptocurrency. Those who advocated for larger blocks argued that Bitcoin’s rising transaction fees would be detrimental to the cryptocurrency’s growth and would cause some users to be priced out of the network.
User input can trigger soft forks on the Bitcoin network. This capability exists. Wallet operators, exchanges, and other businesses that run full nodes may be able to migrate to a new version of the blockchain in this scenario. This new version of the blockchain will have an activation point in the future, requiring miners on a network to “fall in line” and activate the new rules. If they don’t, the network might end up becoming more fragmented.
In response to the meeting behind closed doors that was determining the course of Bitcoin’s future, users of Bitcoin organized a campaign to have a user-activated soft fork at the time. This was done to prevent a precedent from being established. They argued that SegWit2x was a contentious hard fork that made the network vulnerable to a replay attack. They called for implementing Bitcoin Improvement Proposal (BIP) 148, which sought to implement SegWit on the Bitcoin network. They also called for the implementation of SegWit on the Bitcoin network. It was made public in March of 2017, and the implementation date was originally August 1 of that same year.
Some big-block supporters made the decision to fork the Bitcoin blockchain on August 1, 2017, out of fear that the SegWit2x plan would not be implemented successfully and because they saw that the community supported SegWit. As a direct consequence of this, Bitcoin Cash was born (BCH). Its supporters did not view the split as the establishment of a competing network; rather, they saw it as the continuation of Satoshi Nakamoto’s initial vision.
The initial block size for the Bitcoin Cash blockchain was eight megabytes, but that value has since been increased to 32 megabytes. Supporters of Bitcoin Cash continue to argue that the cryptocurrency’s lower transaction fees will allow it to scale and provide financial services to those who are currently unbanked. They believe that Bitcoin will fall behind as a result of its higher transaction fees.
The Bitcoin Cash hard fork brought the idea of a hard fork into the public eye, and in the short time that followed, a large number of additional Bitcoin forks were created. Bitcoin Gold (BTG), Bitcoin Diamond (BTCD), and other cryptocurrencies fall into this category.
The DAO Hack
The launch of the decentralized autonomous organization (DAO) on the Ethereum network in 2016 was associated with yet another significant historical hard fork that occurred on the Ethereum network. Smart contracts are essentially chunks of code that automatically execute whenever a set of criteria has been met, and Ethereum is responsible for running a number of these contracts. These contracts make money programmable and are the driving force behind applications for decentralized finance (DApps).
Before the initial coin offering (ICO) frenzy of 2017, the DAO successfully crowdfunded the purchase of ETH in the amount of $150 million. This was one of the earliest crowdfunding efforts in the cryptocurrency industry. To put it simply, it was an early iteration of the decentralized governance models that DeFi protocols use, in which token holders vote on the direction in which the protocol will go in the future.
After it was launched, the DAO was the victim of a hack that resulted in the theft of ETH valued at $60 million from 11,000 investors. Because Ethereum was trading for less than $10 at the time, approximately 14% of all circulating Ether was invested in the DAO. As a result, the hack significantly damaged users’ confidence in the network.
The Ethereum community immediately began debating the best way to defend themselves against the attack as everyone scrambled to figure out what to do. At first, Vitalik Buterin, the founder of Ethereum, suggested a soft fork that would blacklist the attacker’s address and prevent them from transferring the funds.
The attacker, or someone posing as them, responded to the community by asserting that the funds had been obtained in a manner that was both “legal” and in accordance with the rules of the smart contract. They stated that they were prepared to pursue legal action against anyone who attempted to take possession of the money. Tensions escalated as a result of the attacker’s statement that they would prevent attempts at a soft fork by bribing ETH miners with the funds.
Once more, debate ensued until a hard fork was put forward as an option. In the end, the hard fork was implemented, and it rolled back the history of the Ethereum network to a time before the DAO attack took place. It also reallocated the stolen funds to a smart contract from which investors could withdraw their funds.
The action was highly contentious, and some people believed that it compromised the censorship resistance and immutability of the blockchain. According to these people, investors were being bailed out of their investments. Those who held this point of view opposed the hard fork and advocated for an earlier iteration of the network, which is now referred to as Ethereum Classic (ETC).
Going Head to Head Hashrate Wars: ABC and SV
In August of 2017, the Bitcoin blockchain underwent a hard fork, which resulted in the creation of Bitcoin Cash. Subsequently, internal strife would divide the Bitcoin Cash community into two separate networks. On the one hand, there was Bitcoin Cash ABC (BCHA), a development team attempting to enhance the technology it was based on. On the other hand, there was Bitcoin Cash SV (BSV), a group supported by Craig Wright, who fancies himself to be “Satoshi Nakamoto.” This group was attempting to increase the block size from 32 MB to 128 MB.
The blockchain was split in two at block 556,767, and the fight to control the BCH ticker symbol started at that point. Miners on both sides used every resource at their disposal in an effort to achieve a higher hash rate and gain an advantage over the other side. Many people advocated for an attack on the other network that would take 51% of its resources and reorganize its blocks in order to coerce its supporters into joining their camp.
Exchanges of cryptocurrencies and other types of businesses have revealed that they intend to credit the BCH ticker to the blockchain that emerged victorious. A number of mining pools committed their entire resource pool to the hash wars, which ultimately resulted in Bitcoin Cash ABC having the majority of the hash rate and successfully fending off any attempts at a 51% attack. Later, it asserted its ownership of the BCH ticker on exchanges and other services, while the other network opted to use the BSV ticker.