作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (2): 191-198. doi: 10.19678/j.issn.1000-3428.0063464

• 网络空间安全 • 上一篇    下一篇

结合动态信用机制的PBFT算法优化方案

刘泽坤, 王峰, 贾海蓉   

  1. 太原理工大学 信息与计算机学院, 太原 030024
  • 收稿日期:2021-12-07 修回日期:2022-03-24 发布日期:2022-07-19
  • 作者简介:刘泽坤(1996-),男,硕士研究生,主研方向为区块链技术;王峰、贾海蓉,教授、博士。
  • 基金资助:
    山西省留学回国人员科技活动择优项目(20200017);山西省回国留学人员科研项目(2020-042)。

Optimization Scheme of PBFT Algorithm Combining Dynamic Credit Mechanism

LIU Zekun, WANG Feng, JIA Hairong   

  1. College of Information and Computer, Taiyuan University of Technology, Taiyuan 030024, China
  • Received:2021-12-07 Revised:2022-03-24 Published:2022-07-19

摘要: 实用拜占庭容错(PBFT)共识算法被广泛应用于金融机构、电子货币行业、农产品溯源等领域,但存在灵活性较差、拜占庭节点处理方式不足、通信开销和网络时延较大等问题。提出基于动态机制与信用积分机制的实用拜占庭容错共识算法DT-PBFT。引入动态加入或退出机制,使集群内的节点可以按需自由加入或退出,增加信用积分机制,通过分层机制将节点按可信任程度分为备用主节点层、中间层、警告层和清理层,采用惩罚机制降低节点连续作恶的可能性,以保证从备用主节点层中优先选择最优的主节点,大幅提高共识效率。同时,通过剔除网络清理层中的拜占庭节点,提高算法的运行效率。在此基础上,通过优化一致性协议对共识流程进行改进,减少一轮全网节点信息交互确认流程,从而降低通信开销。实验结果表明,当节点数为22时,相比DGPBFT、DDBFT和PBFT算法,DT-PBFT算法具有较优的灵活性,吞吐量和交易请求有效完成率分别为292 transaction/s和83.4%,CPU利用率为50%,相比PBFT算法,延迟降低了350 ms。

关键词: 区块链, 动态加入机制, 拜占庭容错算法, 信用机制, 分层机制

Abstract: Practical Byzantine Fault Tolerance (PBFT) consensus algorithm is widely used in financial institutions, electronic currency industry, agricultural product traceability, and other fields, but there are problems such as poor flexibility, insufficient Byzantine node processing methods, large communication overhead, and network delay.This paper proposes a PBFT consensus algorithm DT-PBFT based on a dynamic mechanism and credit scoring mechanism.The dynamic joining or exit mechanism is introduced to enable nodes in the cluster to joining or exit freely as needed, and the credit scoring mechanism is added.Nodes are divided into standby primary node layer, intermediate layer, warning layer, and cleaning layer according to the degree of trust through the layered mechanism.The penalty mechanism is used to reduce the possibility of the continuous evil of nodes, so as to ensure that the optimal primary node is selected preferentially from the standby primary node layer, and to greatly improve the efficiency of consensus.At the same time, by eliminating Byzantine nodes in the network cleaning layer, the operation efficiency of the algorithm is improved.Based on this, the consensus process is improved through the optimized consistency protocol to reduce a round of network wide node information interaction confirmation process, thereby reducing communication overhead.The experimental results show that when the number of nodes is 22, compared with the DGPBFT, DDBFT and PBFT algorithms, the DT-PBFT algorithm has a better flexibility.The throughput and effective completion rate of transaction requests are 292 transaction/s and 83.4%, respectively, and the CPU utilization is 50%.Compared with the PBFT algorithm, the delay is reduced by 350 ms.

Key words: blockchain, dynamic joining mechanism, Byzantine Fault Tolerance(BFT) algorithm, credit mechanism, hierarchical mechanism

中图分类号: