CBlockSim: A Modular High-Performance Blockchain Simulator

by   Xuyang Ma, et al.

Blockchain has attracted much attention from both academia and industry since emerging in 2008. Due to the inconvenience of the deployment of large-scale blockchains, blockchain simulators are used to facilitate blockchain design and implementation. We evaluate state-of-the-art simulators applied to both Bitcoin and Ethereum and find that they suffer from low performance and scalability which are significant limitations. To build a more general and faster blockchain simulator, we extend an existing blockchain simulator, i.e. BlockSim. We add a network module integrated with a network topology generation algorithm and a block propagation algorithm to generate a realistic blockchain network and simulate the block propagation efficiently. We design a binary transaction pool structure and migrate BlockSim from Python to C++ so that bitwise operations can be used to accelerate the simulation and reduce memory usage. Moreover, we modularize the simulator based on five primary blockchain processes. Significant blockchain elements including consensus protocols (PoW and PoS), information propagation algorithms (Gossip) and finalization rules (Longest rule and GHOST rule) are implemented in individual modules and can be combined flexibly to simulate different types of blockchains. Experiments demonstrate that the new simulator reduces the simulation time by an order of magnitude and improves scalability, enabling us to simulate more than ten thousand nodes, roughly the size of the Bitcoin and Ethereum networks. Two typical use cases are proposed to investigate network-related issues which are not covered by most other simulators.


SimBlock: A Blockchain Network Simulator

Blockchain, which is a technology for distributedly managing ledger info...

Talaria: A Framework for Simulation of Permissioned Blockchains for Logistics and Beyond

In this paper, we present Talaria, a novel permissioned blockchain simul...

BlockSim: An Extensible Simulation Tool for Blockchain Systems

Both in the design and deployment of blockchain solutions many performan...

BlockSim-Net: A Network Based Blockchain Simulator

Since its proposal by Eyal and Sirer (CACM '13), selfish mining attack o...

CLoTH: a Simulator for HTLC Payment Networks

The Lightning Network (LN) is one of the most promising off-chain scalin...

Blockchain Simulators: A Systematic Mapping Study

Recently, distributed ledger technologies like blockchain have been prol...

Boost Blockchain Broadcast Propagation with Tree Routing

In recent years, with the rapid development and popularization of BitCoi...

Please sign up or login with your details

Forgot password? Click here to reset