计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (14): 257-266.DOI: 10.3778/j.issn.1002-8331.2303-0457

• 网络、通信与安全 • 上一篇    下一篇

HLF区块链交易时延动态优化方法研究

李天祥,韩云飞,阿不都热衣木江·阿白,马玉鹏,王轶   

  1. 1.中国科学院 新疆理化技术研究所,乌鲁木齐 830011
    2.中国科学院大学,北京 100049
    3.新疆民族语音语言信息处理实验室,乌鲁木齐 830011
    4.新疆维吾尔自治区信息中心,乌鲁木齐 830011
  • 出版日期:2024-07-15 发布日期:2024-07-15

Improving Hyperledger Fabric Transaction Latency with Adaptive Dynamic Optimization

LI Tianxiang, HAN Yunfei, Abdureyim Abai, MA Yupeng, WANG Yi   

  1. 1.Xinjiang Technical Institute of Physics and Chemistry, Chinese Academy of Sciences, Urumqi 83001, China
    2.University of Chinese Academy of Sciences, Beijing 100049, China
    3.Xinjiang Laboratory of Minority Speech and Language Information Processing, Urumqi 830011, China
    4.Information Center of Xinjiang Uygur Autonomous Region, Urumqi 830011, China
  • Online:2024-07-15 Published:2024-07-15

摘要: Hyperledger Fabric(HLF)性能优化是区块链研究的热点问题,但当前工作对低负载生产环境中的交易时延关注不足,成为影响联盟链落地应用的重要因素。针对这一问题,提出了面向HLF的交易时延动态自适应优化方法:综合考虑交易到达率与交易大小维度,对HLF(v2.2)进行全面的性能评估,并给出了一组静态推荐配置参数;基于性能评估数据,使用XGBoost建立HLF性能模型,获得应用负载、网络配置、交易时延间的映射关系;对非饱和动态负载与突发注入攻击等场景进行模拟,获得贴近生产环境的应用负载输入;基于贝叶斯优化算法,对HLF进行动态自适应配置参数优化,有效降低HLF交易处理时延。通过实验,验证了优化方法的有效性,在多组随机动态负载输入中取得了平均53%、最高97%的交易时延优化效果。

关键词: 区块链, 性能优化, Hyperledger Fabric, 交易时延, 贝叶斯优化

Abstract: Hyperledger Fabric (HLF) performance optimization is a hot topic in blockchain research, but insufficient attention has been paid to transaction delay in low-load production environments, which has become an important factor affecting the application of alliance chains. To address this problem, a dynamic adaptive optimization method for HLF-oriented transaction delay has been proposed. Firstly, a comprehensive performance evaluation of HLF (v2.2) is conducted, taking into account the dimensions of transaction arrival rate and transaction size, and a set of statically recommended configuration parameters is obtained. Secondly, HLF performance model is established using XGBoost based on performance evaluation data, obtaining the mapping relationship between application load, network configuration, and transaction delay. Next, unsaturated dynamic load and burst injection attack scenarios are simulated to obtain application load input close to the production environment. Finally, Bayesian optimization algorithm is used to optimize the dynamic adaptive configuration parameters of HLF, effectively reducing the processing delay of HLF transactions. The effectiveness of the optimization method has been verified through experiments, and an average transaction delay optimization effect of 53% and a maximum of 97% have been achieved in multiple groups of random dynamic load inputs.

Key words: blockchain, performance optimization, Hyperledger Fabric, transaction delay, Bayesian optimization