Main Problems Of Forking And Their Impact On Blockchain
All cryptocurrencies based on blockchain fall under the risk of forking. These events influence the whole currency environment delaying transactions, confusing participants, wasting calculating power and provoking other unnecessary time consuming activities. Non-blockchain cryptocurrencies, on the contrary, do not have this issue.
Forking can be avoided by changing the consensus algorithm, but even fork-proof approaches might face problems. Talking about the standard Proof-of-Work consensus, we must admit that there is no way to prevent natural forking.
General forking issues
Cryptocurrencies based on the very first Proof-of-Work consensus are subjected to periodical standard forks. These forks are a part of blocks creation. Main reason for such a situation is the network latency and signals spread delays. Two different participants can discover correct blocks at the same time with high probability.
Other consensus solutions try to avoid forking but this is impossible in some cases. Any consensus based on the competition concept has a chance of creating two equal blocks simultaneously. On the other hand, consensuses that have a single block creator are not decentralized enough.
Ethereum vs. Bitcoin
Bitcoin’s approach to the fork processing is simple. When a fork happens, the longest chain wins some time later. This chain is considered to be valid, and all other blocks are abandoned. Ethereum developers has initially made their blockchain different from Bitcoin. Their blockchain is more developed, transactions are more complicated, a programing language used for smart contracts is of a higher level. They even apply their own virtual machine to support the ecosystem.
From the point of view of forking, Ethereum is faster by default. The main reason lies in the time of a new block creation. Bitcoin allows producing blocks once per 10 minutes. As for Ethereum, this time is from 10 to 15 seconds on average. Taking into account that Ethereum nodes are located within the same global network, it is not a surprise that natural forks appear more frequently here.
Forked chains problems
A standard solution in Bitcoin is simply to ignore forked blocks. After the global Bitcoin network is divided into two parts with different correct blocks on top of each blockchain, the next several minutes will define which block will be the correct one. The main rule of chain adoption states that the longest chain is valid. This means that after one of semi-networks mines a new block its chain becomes longer. The shortest chain with its correct block is abandoned.
Since the average block closing time in Bitcoin is 10 minutes, the frequency of simultaneous blocks generation is relatively small. In Ethereum, block closing time is decreased to several seconds, hence equal blocks will be generated more often. However, this doesn’t influence common problems that happen in these cases.
The first problem here is that all transactions in the abandoned block are lost until they are mined again. The common reaction of transactions authors is to resend them to miners, and sooner or later they will be mined. But here the second problem appears.
Each participant can check whether their transaction is placed on blockchain. If so, the transaction is considered to be valid and immutable. From the point of view of a separate transaction, it is true. But amid the forking issue it seems to be wrong. Taking into account that some funds are involved in the process such situation is unwanted.
Calculating power waste
The last of three major problems is hashing power wasted for nothing. In fact, each abandoned block is a significant amount of wasted hashing power. The greater part of the network was involved to mine in the wrong chain, the more hashing activity was used in vain.
As we can see, the forking issue can bring a lot of problems even though it is natural for the blockchain environment. Each blockchain-based project has its own way to fight forks and their consequences. This will be the topic of our next articles.