SCIENTIFIC NEWS AND
INNOVATION FROM ÉTS
Modeling Bitcoin Network Performance - By : Yahya Shahsavari, Kaiwen Zhang, Chamseddine Talhi,

Modeling Bitcoin Network Performance


This article was granted the Best Paper Award during the 1st IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON 2019).

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 and IT Engineering at ÉTS. His research interests include engineering security solutions for Mobile, IoT and Cloud environments, Optimized.

The Bitcoin network

The header image was purchased on Istock.com and is protected by copyright.

SUMMARY

This article is a short presentation of a theoretical Bitcoin network model to understand the impact of important parameters, such as block sizes or number of connections per node, on the performance of the system, such as the time it takes to fully propagate new information in the network. This model allows researchers to better understand Bitcoin functions and to predict its reaction if changes are made to the network configuration. It can also be used to design better blockchain networks for applications other than Bitcoin.

Introduction

Blockchain is gaining attention as a newly emerging technology in both academia and industry: from cryptocurrencies to decentralized applications (e.g. cloud storage) and cases of pervasive use (e.g. IoT, health care, legal and law enforcement). In addition to their potential as a disruptive technology, blockchain systems currently face major performance issues, which hinder their widespread adoption as an alternative to other data management solutions. Therefore, it is essential for blockchain developers to choose the right distributed ledger technology (DLT) system and tune it accordingly to maximize its performance in a specific application and infrastructure. To assist blockchain architects in this design process, it is necessary to analyze blockchain networks from the theoretical perspective to predict and compare the performance of various blockchain designs.

A theoretical model will help blockchain designers achieve a better understanding of the underlying blockchain dynamics and characteristics which impact its performance. A theoretical model can also accelerate the development of a blockchain system by quickly discovering a theoretically optimal initial design, which is preferable to an incremental design through iterative benchmarking.

Although the scope of this article (and thus this background section) is limited to Bitcoin, our theoretical model can be applied to other blockchains like Ethereum.

Background on the Bitcoin Network

The anatomy of the Bitcoin network is depicted in Figure 1. Bitcoin operates in a public peer-to-peer network, where any machine is free to join and connect to any other already in the network [1]. When a node receives a transaction or block, it verifies the transaction or block. If it is valid, the node relays it to other nodes.

Overwiew of the Bitcoin architecture

Figure 1. Anatomy of Bitcoin

Each participating node in the blockchain network maintains a connection pool, with connections to other peers active at all times. The default number of connections to other peers plays an important role in the performance of Bitcoin.

Information Dissemination

In order to update the blockchain, transactions and blocks must be disseminated over the network. To accomplish this, Bitcoin and most other blockchains use a gossip protocol. In order to avoid saturating the network with redundant copies of transactions and blocks, Bitcoin employs a pull-based approach to sharing data, where each node requests copies of missing data from others.

Sending nodes notify neighboring nodes of the availability of a transaction or block, once it is verified, using an inventory message (inv) to all existing nodes in their connection pool. An inv message consists of transaction or block hashes that are now available and ready to be sent.

When a node receives an inv message for a block or transaction which it does not yet have, it replies with a getdata message. This message contains the hash of requested transactions or blocks.

Once the sender node receives the getdata message, it will send the requested block or transaction to the receiver. This process is depicted in Figure 2.

Exchanging blocks in a blockchain

Figure 2: Inventory-based block exchange

 

Analytical Model

To model a Bitcoin network, we used the graph model introduced by Erdős and Rényi [2]. This graph has properties suitable for modeling peer-to-peer networks found in blockchain systems.

We define an overlay network as a graph G(V,L) where V is the set of vertices and L is the set of links between nodes. For example, if there is a link between node i and node j, then (i,j) ∈ L. Furthermore, we represent a random graph using Gp(N), where N  is the total number of nodes and p is the independent probability that there exists a link between any two selected nodes in the peer-to-peer overlay network. In this work, we assume that N  is significantly large, as it is in the Bitcoin network (Currently N≅10,000).

Random Graph Construction

In general, this random graph model has several characteristics: (i) If p > 1/N then a giant component exists with high probability (w.h.p.). (ii) If p ≥ (log N)/N then all nodes become part of the giant component and Gp(N) becomes a connected graph.

These connectivity properties are vital for a blockchain network to operate properly. With a sufficient p value, each node has likely more than one path to reach any other node, using different outgoing links. In such a network, removing one link does not cause network partitioning because the entire system stays connected. Network partitions must be avoided in a blockchain network, as they guarantee that blockchain forks cannot be resolved as long as the partitions stay isolated, thus compromising the integrity of the data on the ledger.

Verification and Validation

We implemented this model using the popular network simulator OMNET++.  A limited demo of this simulation is illustrated in the following video.

 

To validate the accuracy of the theoretical model and its implementation, we used a dataset mined from the Bitcoin network. The results are depicted in Figure 3. The boxplots show the propagation delay of the blocks in the real Bitcoin network versus block sizes. The simulation results and theoretical values are almost identical and follow the empirical results. Block propagation delay increases almost linearly with an increase in block size. For the smaller blocks, quartile sizes are comparatively smaller. The main reason is that in small block sizes, the delay is caused by the signal propagation delay. As for big blocks, the delay originates from the limited network bandwidth. The impact of different values for a default number of connections on block propagation delay for different network sizes is depicted in Figure 4. Increasing the number of connections will always lead to a faster network.

Speed of block propagation according to block size

Figure 3. Model results: block propagation delay vs. block size

Speed of block propagation according to network size

Figure 4. 100% block propagation delay vs. network size for different numbers of connections

Conclusion

In this article, we developed a model for the calculation of Bitcoin performance using block size and a default number of connections per node. We validated our analytical model through simulation and compared to real data measured from the Bitcoin network. Although the throughput of Bitcoin can be increased by choosing a larger size for blocks, this can cause a significant increase in block propagation time. The delay can be reduced by increasing the average default number of connections per node but the drawback is increased traffic overhead in the network.

Our future work will focus on using this model to study the impact of different parameters on the probability of occurring forks in the system.

Additional information

For more information on this research, please refer to the following conference article: Shahsavari, Y.; Zhang, K.; Talhi, C. 2019. “Performance Modeling and Analysis of the Bitcoin Inventory Protocol”. IEEE DAPPCON. San Francisco, 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 and IT Engineering at ÉTS. His research interests include engineering security solutions for Mobile, IoT and Cloud environments, Optimized.

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