What Is Fork in Blockchain?

What Is Fork in Blockchain?

Blockchain For Newbies
March 12, 2019 by Leo Webb
What Is Fork in Blockchain_-min

Forks are a very common topic in the blockchain community, however, this concept is often misunderstood. Even though forks have many patterns in common, all of them are unique.

All the blockchains have certain problems and limitations. First, there may be delays between the moment when one node sends data and another node receives it. Sometimes, transactions may get lost, or nodes may transmit false information. To address such issues, developers make changes in a protocol, creating a divergence from the existing version of the blockchain. This new version is called a fork. When an alternative block is generated, the older system may consider this block not valid.

Any blockchain depends on a decentralized network of computers (full nodes) that verify the public ledger and ensure the security of the network. The more nodes, the safer the network. Therefore, when developers update software, there is a need for collective agreement. Every node should run the same core software in order to access the ledger. This is a reason why a node that only runs Ethereum core software is unable to access the Bitcoin blockchain and vice versa.

Hard Fork vs. Soft Fork

As we’ve already mentioned above, when a new block is generated according to an updated protocol, it might be considered not valid by the old version of the blockchain. However, the issue of compatibility depends on the software. When developers make updates, they have to convince nodes to switch to the new version of the core software, and this version may not be compatible with the older one. Forks that are incompatible with the previous version of a blockchain are called hard forks. Hard forks usually occur when developers change the rules of consensus, such as its protocol, block size, or mining algorithm.

For example, Ethereum is going to switch from Proof of Work to Proof of Stake, preparing its Casper update. This update will be a hard fork because nodes that don’t update their software will no longer be compatible with the Casper nodes. However, Ethereum hard forks are usually not contentious, as the vast majority of the network accepts updates. On the other hand, if two nodes run different versions of software, these nodes will follow different rules of consensus and so run different blockchains. Such a situation is typical for contentious hard forks, where a significant part of the community doesn’t agree upon new updates.

Another type of forks is soft forks. In this case, a fork remains compatible with the previous version of the software. An example of a soft fork is Bitcoin SegWit update. This update has introduced a new class of addresses, however, nodes that used older addresses continued to work as they used to. Nodes that run Bitcoin Core 1.0 software were able to send transactions to nodes that run SegWit, and such transactions were completed. The older version of the software will work until at least 51% of nodes switch to the soft fork. If nodes with the older version provide invalid blocks, such blocks will form new versions of the ledger (“old chain only”), which can quickly catch up with the fork.

The Most Famous Forks

  • Ethereum (ETH) vs. Ethereum Classic (ETC)
    The history of the Ethereum hard fork is associated with the DAO. This Decentralized Autonomous Organization was aimed to become a decentralized venture capital fund. It was expected to change Ethereum forever, providing funds for all the new dApps. To get funded, developers should purchase DAO tokens for Ether. The DAO offered flexibility and transparency. It managed to accumulate as much as $150 million in ETH in one month, which was 14% of all the Ether coins.
    However, it was also important to make sure investors could opt out of the DAO. To do this, the DAO introduced its Split Function, which allowed users to get their ETH coins back. This function also enabled users to create their own “Child DAO.” Everything was good except one thing: users should wait for 28 days before they could spend their Ether. Many users pointed out this loophole, and the DAO developers replied that it won’t be a problem. However, it became a problem in 2016, when someone used this loophole to steal one-third of the funds collected by the DAO, which was worth $50 million.
    The Split Function should exchange DAO tokens back to Ethereum, register this transaction in the ledger, and update the token balance. The hacker used a recursive function that rolled the code back before registering the transaction and transferred more ETH for the same amount of DAO. To refund all the stolen money, the Ethereum team created a hard fork (the one that is now called Ethereum). However, many users didn’t agree to switch to the new Ethereum and named their blockchain Ethereum Classic.
  • Bitcoin (BTC) vs. Bitcoin Cash (BCH)  – One of the main problems associated with cryptocurrencies is the speed of transactions. For instance, Visa processes about 1,700 transactions per second, while the Bitcoin blockchain can process only seven  transactions per second. As Bitcoin becomes more and more popular, waiting time also increases, which is a matter of concern within the Bitcoin community. To address this issue, mining pools and organizations that represent 80%-90% of the total Bitcoin computing power decided to introduce new technology — SegWit2x. SegWit2x allows for decreasing the amount of data required for verification. It removes the signature data from each block, and this data is attached to an extended block. Therefore, blocks of data become bigger and more information can be processed at one time. In 2017, Bitcoin Unlimited reported mining a 1GB block, which is 1,000× the size of the normal block. However, a part of the Bitcoin community was not going to adopt SigWit2x technology, claiming that this solution will not solve the scalability problem in a meaningful way. The introduction of SigWit2x was not transparent, it didn’t follow the roadmap created by Satoshi Nakamoto, and it undermined the principle of decentralization. Therefore, some developers and miners decided to create a hard fork and named it Bitcoin Cash.
  • Steemit vs. Golos
    Steemit is the world’s first decentralized social media platform. It has become quite popular around the world, and even though it still cannot compete with traditional social media, many users have appreciated the system that rewards users for high-quality content. The success of this platform inspired many developers to create their own forks. An example of such a fork is Golos — a Russian version of Steemit. Basically, it works the same way as the original platform, however, it also has certain improvements. For example, developers from Golos fixed problems with notifications. On the other hand, Golos is aimed towards a Russian-speaking audience. Although you can switch the interface language to English, there are only Russian-speaking contributors.