arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.05788cs.DCcs.PF
收藏

CBlockSim:模块化高性能区块链模拟器

CBlockSim: A Modular High-Performance Blockchain Simulator

Xuyang Ma, Han Wu, Du Xu, Katinka Wolter

摘要:

区块链自2008年出现以来,引起了学术界和工业界的广泛关注。由于大规模区块链部署的不便,区块链模拟器被用来促进区块链的设计和实现。我们评估了应用于比特币和以太坊的最先进的模拟器,发现它们的性能和可扩展性较低,这是显著的局限性。为了构建一个更通用、更快速的区块链模拟器,我们扩展了现有的区块链模拟器,即BlockSim。我们添加了一个网络模块,集成了网络拓扑生成算法和块传播算法,以生成真实的区块链网络并有效地模拟块传播。我们设计了一个二进制事务池结构,并将BlockSim从Python迁移到C++,以便使用按位操作来加速模拟并减少内存使用。此外,我们基于五个主要的区块链进程对模拟器进行了模块化。重要的区块链元素,包括共识协议(PoW和PoS),信息传播算法(Gossip)和终结规则(Longest rule和GHOST rule)都在各个模块中实现,并且可以灵活组合以模拟不同类型的区块链。实验表明,新的模拟器将模拟时间减少了一个数量级,并提高了可扩展性,使我们能够模拟超过一万个节点,大致相当于比特币和以太坊网络的规模。提出了两个典型的用例来研究大多数其他模拟器所不涵盖的网络相关问题。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑