Introduction to Bitcoin Cash BCH Part 3

Blockchain Forks. Bitcoin Cash as a fork of Bitcoin BTC.


Bitcoin Cash went live on August 1, 2017 as a hard fork of Bitcoin.

What you need to know about blockchain forks

There are a lot of levels to Bitcoin and other digital currencies. These currencies are monetary systems, peer-to-peer ways of exchanging information, secure ways to store data, and so on. With all of this it is easy to forget that any blockchain network is simply software that runs on a group of computers. With Bitcoin, there are wallets that users on the network can use to participate in the transactions on the network. There is also a full copy of the Bitcoin blockchain. There is also software that miners use to compile transactions that are occurring on the network into blocks of the bitcoin blockchain and add blocks to the blockchain.


Temporary blockchain forks

A fork in a blockchain network is a change to the software of the blockchain network. Temporary forks on blockchain networks happen all the time, but most users do not realize that because temporary forks last for a very short period of time and have no impact on how a network operates.

Here is how and when temporary forks happen. Let’s say there is a blockchain network that has three blocks and all the users on the network have agreed that these blocks are valid. Then, two different miners compile transactions that occur on the network into two separate blocks. Miner 1 creates a version of the block 4 and miner 2 creates another version of the block 4. Let’s call these blocks 4A and 4B. Technically, if you look at the blockchain from the block 4A, you will see the same blockchain as you will see looking at it from the block 4B.

One of the breakthroughs of the Bitcoin blockchain was that it was able to solve the issue of forks by utilizing the algorithm called proof-of-work. In proof-of-work, miners need to create a hash for the transactions that they include in the block. The hash needs to satisfy the Bitcoin network difficulty parameter. The network changes this parameter so that it is not easy for miners to create competing blocks at the same time and forks do not occur. In practical terms, difficulty means that the hash needs to begin with a lot of zeros. For example, the hash for block #521336 of the Bitcoin network is 0000000000000000003cb2ba98f54ccffb0078b4d0ad0e3db13ee1b53a135325. To create a hash like this, miners need to first compile transactions into a block of the Bitcoin blockchain and then seal the transactions with a hash that is smaller than the target hash. To do so, miners need to pick a number they can add to the transactions that they’ve compiled. This number is called nonce or number used once. After that, they run the set of data that consists of the data about the transaction and the nonce through the cryptography algorithm called SHA-256, which is the cryptography algorithm that the Bitcoin network uses. Other cryptocurrency blockchain networks may use different algorithms.

In case there is a short-term unintentional fork, the Bitcoin network and most other networks use a simple rule, also known as the longest chain rule. This rule is very simple. It says that the longer chain wins. Here is an example of how this rule works.


Example of the longest chain rule

Let’s say there are ten miners on the network in the scenario above with the blockchain that now has two blocks, 4A and 4B. Miners add blocks to the existing blockchain, which means that in case of two blocks, miners will need to choose whether they should be adding a block to 4A or 4B. Even if five miners decide to go with the blockchain that adds in 4A and some decide to go with the fork that ends in 4B, inevitably one of the forks will be adding blocks faster than the other. According to the longest chain rule, the network will accept this chain as the main one because it is longer than the other. The miners will then switch to the main chain and the chain will experience no damage or adverse effects whatsoever.