SCIENTIFIC NEWS AND
INNOVATION FROM ÉTS
Fork Analysis in the Bitcoin Network - By : Yahya Shahsavari, Kaiwen Zhang, Chamseddine Talhi,

Fork Analysis in the Bitcoin Network


Yahya Shahsavari
Yahya Shahsavari Author profile
Yahya Shahsavari earned an MSc in Information and Communication Technology from Iran University of Science and Technology, Iran, in 2016 respectively. Currently he is pursuing his PhD degree in the FUSÉE laboratory at ÉTS.

Kaiwen Zhang
Kaiwen Zhang Author profile
Kaiwen Zhang is a professor in the Department of Software and IT Engineering at ÉTS. His research interests include blockchain technologies, publish/subscribe systems, massive multiplayer online games, and software-defined networking.

Chamseddine Talhi
Chamseddine Talhi Author profile
Chamseddine Talhi is a Professor in the Department of Software Engineering and IT at ETS. His research interests include cloud native telco service management and security, DevOps security, and federated learning.

Apparition de fourches dans le réseau bitcoin

Purchased from Istock.com. Copyright.

SUMMARY

The present article is a short presentation of a theoretical model used for the analysis of forks in the Bitcoin network. This model estimates the probability of a fork occurrence in a system based on different network parameters, such as block size, average bandwidth, and the average number of connections per node in the network. It can be useful for researchers as well as Bitcoin miners to predict and understand the dynamics of inconsistencies in the network. It can also be used to design inconsistency-tolerant blockchain-based systems.

Forks: Inconsistencies in the Blockchain

A cryptocurrency network like Bitcoin may face some inconsistencies that arise from its decentralized nature. For instance, Bitcoin uses a large and unstructured peer-to-peer (P2P) network, which is subject to fork-related inconsistencies when propagating blocks. The term fork refers to a situation in which different nodes have different data in their copy of the blockchain, which is supposed to be the same everywhere. We can represent a fork as a directed tree of blocks. This concept is depicted in Figure.1, where two different sets of nodes have a different state for the blockchain. In this case, the directed tree contains two separate branches. Forks can occur either due to propagation delays or poor connectivity leading to networking partitions. We differentiate between these types of forks—which are the focus of this article—and forks occurring from miners deviating from protocol, or changes in the code or protocol, which create a new independent network.

Forks are undesirable since they create inconsistencies across the local copies of a blockchain, reducing the reliability of responses to queries related to the blockchain data. Thus, the occurrence of forks implies that blockchain networks are eventually inconsistent and disturb the notion of immutability in blockchains. As a consequence, users have to wait for a certain length of time—usually measured in block confirmations—to be reasonably certain that a transaction is finally committed to the blockchain. For the current Bitcoin network, users typically wait for 6 confirmations, but each user is free to choose their own threshold.

Two branches of a fork in the Bitcoin network

Figure 1. Overview of a fork with two competing branches N_1 and N_2

Origins of Forks

Generally, a fork can occur in one of the following cases:

Network isolation: Due to a poor connection between different nodes in the network, the network may become temporarily partitioned. This can occur if there are some very weak links acting as bottlenecks, or if there are not enough network connections in the system.

Changes in core components of the blockchain protocol: Any change in core components of the protocol such as the format of a valid block or transaction, difficulty retargeting functions, or any upgrade in the mining software can cause a fork in the system. Changes that are incompatible with previous versions cause a hard fork, as opposed to soft forks.

Miner deviations from the standard protocol: The most well-known fork caused by deviating miners is the double-spending attack. Other examples of this kind of attack are: temporary block withholding, selfish mining, feather forking attacks, etc.

Block propagation delay: In practice, two or more different miners may find a valid block almost at the same time. If the first miner has not fully disseminated its block due to propagation delay, a fork occurs if a second miner starts gossiping its own proposed block. Increasing the block size to include more transactions has the drawback of raising the propagation delay, which increases the probability of a fork occurrence.

Theoretical Model

This article is an extension of our previous work and proposes a theoretical model for the analysis of forks in blockchain networks, particularly for Bitcoin. Our model can be useful in predicting the long-term impact of proposed changes to Bitcoin, as well as assessing network health based on hard forks in the Bitcoin code.

We estimated the probability of forks versus block size and compared it to the historical records. The results can be seen in Figure.2. We carried out this experiment for three different values of inter-block time. The fork occurrence probability increases proportionally to the block size. Also note that decreasing the block time increases the fork probability and vice versa. Therefore, fork probabilities can be manipulated by adjusting the mining difficulty.

Influence of block size on Fork occurrence.

Figure 2. Impact of block size on the fork probability in a Bitcoin network

In another experiment, we estimated the weight of fork branches, which indicates the number of participating nodes in different fork branches. Nodes in one branch may become aware of the fork occurrence if they receive the inventory packets related to other branches. Otherwise, they will remain unaware. We also used our model to estimate the number of nodes that are not aware of the fork occurrence.

Conclusion

In this article, we presented an analytical model to estimate the probability of fork occurrences in the Bitcoin network, using a random graph to model the Bitcoin overlay network, and dissemination waves to model the inventory-based block propagation protocol. We investigated the effect of several blockchain and network parameters on fork probabilities. Our results showed that reducing block time compromises blockchain security by increasing the probability of a fork.

Additional Information

For more information on this research, please refer to the following conference paper: Shahsavari, Y.; Zhang, K.; Talhi, C. 2019. “A theoretical model for fork analysis in the Bitcoin network”. IEEE BLOCKCHAIN. Atlanta, USA.

Yahya Shahsavari

Author's profile

Yahya Shahsavari earned an MSc in Information and Communication Technology from Iran University of Science and Technology, Iran, in 2016 respectively. Currently he is pursuing his PhD degree in the FUSÉE laboratory at ÉTS.

Program : Information Technology Engineering 

Research laboratories : FUSÉE- Fast Unified Scalable Event processing Event messaging 

Author profile

Kaiwen Zhang

Author's profile

Kaiwen Zhang is a professor in the Department of Software and IT Engineering at ÉTS. His research interests include blockchain technologies, publish/subscribe systems, massive multiplayer online games, and software-defined networking.

Program : Software Engineering  Information Technology Engineering 

Research laboratories : FUSÉE- Fast Unified Scalable Event processing Event messaging 

Author profile

Chamseddine Talhi

Author's profile

Chamseddine Talhi is a Professor in the Department of Software Engineering and IT at ETS. His research interests include cloud native telco service management and security, DevOps security, and federated learning.

Program : Software Engineering  Information Technology Engineering 

Research laboratories : LASI – Computer System Architecture Research Laboratory 

Author profile


Research laboratories :

FUSÉE- Fast Unified Scalable Event processing Event messaging 

Field(s) of expertise :

Blockchains 

Get the latest scientific news from ÉTS