计算机科学 ›› 2024, Vol. 51 ›› Issue (1): 124-132.doi: 10.11896/jsjkx.230800201

• 数据库&大数据&数据科学 • 上一篇    下一篇

许可链下的事务并行执行模型

董昊1, 赵恒泰2, 王子尧2, 袁野1, 张奥千1   

  1. 1 北京理工大学计算机学院 北京100081
    2 东北大学计算机科学与工程学院 沈阳110169
  • 收稿日期:2023-08-31 修回日期:2023-10-25 出版日期:2024-01-15 发布日期:2024-01-12
  • 通讯作者: 张奥千(aoqian.zhang@bit.edu.cn)
  • 作者简介:(donghaomail@foxmail.com)
  • 基金资助:
    国家重点研发计划(2022YFB2702100);国防基础科研计划(JCKY2021211B017)

Parallel Transaction Execution Models Under Permissioned Blockchains

DONG Hao1, ZHAO Hengtai2, WANG Ziyao2, YUAN Ye1, ZHANG Aoqian1   

  1. 1 School of Computer Science,Beijing Institute of Technology,Beijing 100081,China
    2 School of Computer Science and Engineering,Northeastern University,Shenyang 110169,China
  • Received:2023-08-31 Revised:2023-10-25 Online:2024-01-15 Published:2024-01-12
  • About author:DONG Hao,born in 2000,postgraduate,is a member of CCF(No.P7867M).His main research interests include blockchain and so on.
    ZHANG Aoqian,born in 1990,Ph.D,associate researcher,is a member of CCF(No.H7286M).His main research interests include database,data gover-nance,blockchain and knowledge graph.
  • Supported by:
    National Key R & D Program of China(2022YFB2702100) and Defense Industrial Technology Development Program(JCKY2021211B017).

摘要: 现有的许可链系统大多采取串行的事务执行方式,无法利用多核处理器的性能优势。在共识算法性能较高的许可链中,这种串行的事务执行方法将会成为性能瓶颈。为降低排序-执行-验证架构的许可链中事务执行的时间开销,文中提出了两种事务并发模型。首先,提出了基于地址表的并行执行模型,通过静态分析的方法将事务的读写集映射到地址表中,并利用地址表构建调度图实现无数据冲突的事务并行执行;其次,针对静态分析方法不适用于读写需求复杂的应用场景,提出了基于多版本时间戳排序的并行执行模型,领导者节点使用多版本时间戳排序算法并行地预执行事务并将调度图以事务依赖三元组的形式存储入区块,所有验证节点通过事务依赖三元组进行调度,在保证一致性的前提下实现事务的并行执行;最后,在Tendermint中实现了所设计的两种事务并发模型,并进行了事务执行阶段性能测试和多节点性能测试。实验结果表明,相比串行执行,所提模型在单节点8线程时的事务执行时间分别减少了68.6%和28.5%,4节点8线程时区块链吞吐量分别提升了约43.4%和19.5%。

关键词: 区块链, 实用拜占庭容错, 事务并发, 多版本时间戳排序, Tendermint

Abstract: Most existing permissioned blockchain systems adopt serial transaction execution methods,which cannot take advantage of the high performance of multi-core processors.This serial method will be a performance bottleneck in permissioned blockchains with high performance consensus algorithms.To reduce execution time of transactions in permissioned block-chains with order-execute-validate architecture,two transaction concurrency models are proposed.First,an address table-based parallel execution model is proposed that maps the read and write sets of transactions to the address table through static analysis and constructs a scheduling graph using the address table to achieve parallel execution of transactions without data conflicts.Second,a parallel execution model based on a multi-version timestamp ordering algorithm is proposed,in which the leader node uses a multi-version timestamp ordering algorithm to pre-execute transactions in parallel and stores the scheduling graph into the block in the form of transaction dependency triplets.All validation nodes schedule via transaction dependency triplets to achieve parallel execution of transactions under the premise of consistency.Finally,the two parallel transaction execution models designed in this paper are implemented in Tendermint,and a performance experiment during the transaction execution phase and a performance experiment with multiple nodes are conducted.Experimental results show that the above models reduce the transaction execution time by 68.6% and 28.5% with a single node and 8 threads,and increase the blockchain throughput by about 43.4% and 19.5% with 4 peer nodes and 8 threads per node,respectively.

Key words: Blockchain, Practical Byzantine fault tolerance, Transaction concurrency, Multi-version timestamp ordering, Tendermint

中图分类号: 

  • TP311
[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.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!