计算机研究与发展2024,Vol.61Issue(8) :2110-2126.DOI:10.7544/issn1000-1239.202220644

一种面向联盟链Hyperledger Fabric的并发冲突事务优化方法

A Concurrent Conflict Transaction Optimization Method for Consortium Blockchain Hyperledger Fabric

吴海博 刘辉 孙毅 李俊
计算机研究与发展2024,Vol.61Issue(8) :2110-2126.DOI:10.7544/issn1000-1239.202220644

一种面向联盟链Hyperledger Fabric的并发冲突事务优化方法

A Concurrent Conflict Transaction Optimization Method for Consortium Blockchain Hyperledger Fabric

吴海博 1刘辉 1孙毅 2李俊1
扫码查看

作者信息

  • 1. 中国科学院计算机网络信息中心 北京 100190;中国科学院大学 北京 100049
  • 2. 山东省区块链金融重点实验室(山东财经大学) 济南 250014;中国科学院计算技术研究所 北京 100190
  • 折叠

摘要

随着区块链技术应用的普及,联盟链Hyperledger Fabric(简称Fabric)已成为知名区块链开源平台,并得到广泛关注.然而Fabric仍受困于并发事务间冲突问题,冲突发生时会引发大量无效交易上链,导致吞吐量下降,阻碍其发展.对于该问题,现有面向块内冲突的方案缺乏高效的冲突检测和避免方法,同时现有研究往往忽略区块间冲突对吞吐量的不利影响.提出了一种Fabric的优化方案Fabric-HT(fabric with high throughput),从区块内和区块间 2方面入手,有效降低事务间并发冲突和提高系统吞吐量.针对区块内事务冲突,提出了一种事务调度机制,根据块内冲突事务集定义了一种高效数据结构——依赖关系链,识别具有"危险结构"的事务并提前中止,合理调度事务和消除冲突;针对区块间事务冲突,将冲突事务检测提前至排序节点完成,建立以"推送-匹配"为核心的冲突事务早期避免机制.在多场景下开展大量实验,结果表明Fabric-HT在吞吐量、事务中止率、事务平均执行时间、无效事务空间占用率等方面均优于对比方案.Fabric-HT吞吐量最高可达Fabric的 9.51倍,是最新优化方案FabricSharp的 1.18倍;空间利用率上相比FabricSharp提升了14%.此外,Fabric-HT也表现出较好的鲁棒性和抗攻击能力.

Abstract

With the prevalence of blockchain technology,Hyperledger Fabric(Fabric for short),as a well-known open source blockchain platform,has received wide attention.However,Fabric still suffers from conflicts between concurrent transactions.Conflicts will cause a large number of invalid transactions entering the chain,resulting in a decrease in throughput and hindering its development.For this problem,existing intra-block-conflict-oriented schemes lack efficient conflict detection and avoidance methods,and ignore the adverse impact of inter-block conflicts on throughput.We propose an optimization scheme for Fabric,Fabric-HT(Fabric with high throughput),from both intra-block and inter-block aspects to effectively reduce concurrency inter-transaction conflicts and improve system throughput.For intra-block transaction conflicts,we present a transaction scheduling mechanism,in which an efficient data structure(the dependency chain)is defined to identify and abort transactions with"dangerous structures"in advance,reasonably schedule transactions and eliminate conflicts;for inter-block transaction conflicts,the conflict transaction detection is moved to the sorting node to complete,and an early conflict transaction avoidance mechanism following"push-match"pattern is established.A large number of experiments are carried out in multiple scenarios,and the results show that Fabric-HT overperforms existing schemes in terms of throughput,transaction abort rate,average transaction execution time,and invalid transaction space occupancy.The results show that the throughput of Fabric-HT can reach up to 9.51x that of Fabric and 1.18x of the latest optimized scheme FabricSharp;compared with FabricSharp,the space utilization is increased by 14%.In addition,Fabric-HT also shows good robustness and anti-attack ability in solving concurrent transaction conflict.

关键词

并发冲突/区块链/Hyperledger/Fabric/事务调度/冲突检测

Key words

concurrency conflict/blockchain/Hyperledger Fabric/transaction scheduling/conflict detection

引用本文复制引用

基金项目

国家重点研发计划项目(2021YFE0111500)

中国科学院国际伙伴计划(241711KYSB20200023)

&&(CNIC20220101)

出版年

2024
计算机研究与发展
中国科学院计算技术研究所 中国计算机学会

计算机研究与发展

CSTPCDCSCD北大核心
影响因子:2.649
ISSN:1000-1239
参考文献量37
段落导航相关论文