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.
翻译:自2008年出现以来,链链链从学术界和产业界都受到许多注意。由于部署大型块链链的不便,使用链链模拟器来帮助设计和实施块链链。我们评估Bitcoin和Etheum所使用的最新工艺模拟器,发现这些模拟器的性能和可缩缩度都很低,这些功能和可缩缩缩度都有很大的局限性。为了建立一个更普遍和更快的块链模拟器,我们扩展了一个现有的块链模拟器,即BlockSim。我们添加了一个与网络型组群生成算法和块传播算法相结合的网络模块,以生成一个现实的中位链链网络,并高效地模拟块传播。我们设计了一个双轨交易模拟器结构,将BlockSimmimmimmmmmmmmus从Pythin和GHOHSTmillalimalimal 规则的双倍级级缩缩缩缩缩缩略图。我们使用的模拟模型和模拟模型模型模型模型的缩略图比其他的缩略图要小。