计算机科学 ›› 2024, Vol. 51 ›› Issue (1): 124-132.doi: 10.11896/jsjkx.230800201
董昊1, 赵恒泰2, 王子尧2, 袁野1, 张奥千1
DONG Hao1, ZHAO Hengtai2, WANG Ziyao2, YUAN Ye1, ZHANG Aoqian1
摘要: 现有的许可链系统大多采取串行的事务执行方式,无法利用多核处理器的性能优势。在共识算法性能较高的许可链中,这种串行的事务执行方法将会成为性能瓶颈。为降低排序-执行-验证架构的许可链中事务执行的时间开销,文中提出了两种事务并发模型。首先,提出了基于地址表的并行执行模型,通过静态分析的方法将事务的读写集映射到地址表中,并利用地址表构建调度图实现无数据冲突的事务并行执行;其次,针对静态分析方法不适用于读写需求复杂的应用场景,提出了基于多版本时间戳排序的并行执行模型,领导者节点使用多版本时间戳排序算法并行地预执行事务并将调度图以事务依赖三元组的形式存储入区块,所有验证节点通过事务依赖三元组进行调度,在保证一致性的前提下实现事务的并行执行;最后,在Tendermint中实现了所设计的两种事务并发模型,并进行了事务执行阶段性能测试和多节点性能测试。实验结果表明,相比串行执行,所提模型在单节点8线程时的事务执行时间分别减少了68.6%和28.5%,4节点8线程时区块链吞吐量分别提升了约43.4%和19.5%。
中图分类号:
[1]NAKAMOTO S.Bitcoin:A peer-to-peer electronic cash system[EB/OL].(2018-10-31)https://bitcoin.org/bitcoin.pdf. [2]WOOD D D.Ethereum:a secure decentralized generalized transaction ledger[J].EthereumProject Yellow Paper,2014,151:1-32. [3]ANDROULAKI E,MANEIVCH Y,MURALIDHARAN S,et al.Hy-perledger fabric:a distributed operating system for permissioned blockchains[C]//The Thirteen Eurosys Confe-rence.Porto,Portugal,2018:1-15. [4]BUCHMAN E,KWON J,MILOSEVIC Z.The latest gossip on bft consensus[J].arXiv:1807.04938,2019. [5]CASTRO M,LISKOV B.Practical byzantine fault tolerance[C]//The Third Symposium on Operating Systems Design and Implementation.New York,USA,1999:173-186. [6]BUCHMAN E.Tendermint:byzantine fault tolerance in the age of blockchains[D].Guelph:University of Guelph,2016. [7]GUPTA H,JANAKIRAM D.CDAG:a serialized blockDAG for permissioned blockchain[J].arXiv:1910.08547,2019. [8]FU X,WANG H M,SHI P C,et al.Jointgraph:a DAG-based efficient consensus algorithm for consortium blockchains[J].Software:Practice and Experience,2021,51(10):1987-1999. [9]ZHANG Z,LI Q,GAN J,et al.Design and implementation of a new blockchain model based on DAG[J].Computer Applications and Software,2021,38(10):114-124. [10]YU W,LUO K,DING Y,et al.A parallel smart contract model[C]//2018 International Conference on Machine Learning and Machine Intelligence.New York,USA,2018:72-77. [11]BARTOLETTI M,GALLETTA L,MURGIA M.A true con-current model of smart contracts executions[C]//22nd IFIP WG 6.1 International Conference on Coordination Models and Languages.Valletta,Malta,2020:243-260. [12]DICKERSON T,GAZZILLO P,HERLIHY M,et al.Adding concurrency to smart contracts[C]//The ACM Symposium on Principles of Distributed Computing.Washington DC,USA,2017:303-312. [13]PANG S F,QI X D,ZHANG Z,et al.Concur-rency Protocol Aiming at High Performance of Execution and Replay for Smart Contracts[J].arXiv:1905.07169,2019. [14]ZHANG A.Towards concurrency control on smart contract in blockchain platforms[D].Tianjin:Tianjin University,2018. [15]ANJANA P S,KUMARI S,PERI S,et al.OptSmart:A space efficient optimistic concurrent execution of smart contracts[J].arXiv:2102.04875,2021. [16]ANJANA P S,ATTIYA H,KUMARI S,et al.Efficient concurrent execution of smart contracts in blockchains using object-based transactional memory[C]//Networked Systems:8th International Conference.2020:77-93. [17]XIAO J,ZHANG S,ZHANG Z,et al.Nezha:exploiting concurrency for transaction processing in dag-based blockchains[C]// 2022 IEEE 42nd International Conference on Distributed Computing Systems.2022:269-279. [18]SHI J F,WU H,GAO H R,et al.Overview on parallel execution models of smart contract transactions in blockchains[J].Ruan Jian Xue Bao/Journal of Software,2022,33(11):4084-4106. [19]REED D P.Naming and synchronization in a decentralized computer system[R].USA:Massachusetts Institute of Technology,1978. |
|