基于社区发现的改进PBFT共识算法
Improved PBFT Consensus Algorithm Based on Community Discovery
摘要: 共识算法是区块链分布式系统的核心组成部分,它是通过遵循预设流程,使互不信任的节点最终实现数据一致性的关键算法。PBFT共识算法在这一过程中能够容忍一定数量的拜占庭错误节点。大规模区块链网络中,通过PBFT共识算法维护分布式账本的一致性,是区块链系统运行的关键。传统的PBFT共识算法通过多个节点间的交叉验证,防止恶意节点的篡改和欺瞒。然而,这种方式的共识过程复杂,在大规模网络中,共识效率低下,且无法有效应对恶意节点和故障节点的影响,导致网络的稳定性难以保证。本文提出一个基于社区发现的改进PBFT算法,通过节点间交易行为数据构建社交网络,根据节点间的业务关联度,利用Louvain社区发现算法进行社区划分。采用“先社区内共识,后社区间共识”的策略,降低大规模共识中的复杂度。实验结果表明,该算法能够显著降低大规模区块链网络的通信复杂度,缩短达成共识时间,提高系统的吞吐量。
Abstract: The consensus algorithm is the core component of the blockchain distributed system. It is the key algorithm that enables nodes that do not trust each other to ultimately achieve data consistency by following the preset process. The PBFT consensus algorithm can tolerate a certain number of Byzantine fault nodes in this process. In large-scale blockchain networks, maintaining the consistency of distributed ledgers through the PBFT consensus algorithm is the key to the operation of the blockchain system. The traditional PBFT consensus algorithm prevents tampering and deception by malicious nodes through cross-validation among multiple nodes. However, the consensus process of this method is complicated. In large-scale networks, the consensus efficiency is low, and it cannot deal with the influence of malicious nodes and faulty nodes, making it difficult to guarantee the stability of the network. This paper proposes an improved PBFT algorithm based on community discovery, constructs a social network through transaction behavior data between nodes, and uses the Louvain community discovery algorithm to divide communities based on the business correlation between nodes. We adopt the strategy of “consensus within the community first, then consensus between communities” to reduce the complexity of large-scale consensus. Experimental results show that this algorithm can significantly reduce the communication complexity of large-scale blockchain networks, shorten the time to reach consensus, and improve the throughput of the system.
文章引用:韩涛, 朱王. 基于社区发现的改进PBFT共识算法[J]. 计算机科学与应用, 2024, 14(6): 1-14. https://doi.org/10.12677/csa.2024.146136

参考文献

[1] Nakamoto, S. (2008) Bitcoin: A Peer-to-Peer Electronic Cash System. Decentralized Business Review.
[2] 江雨燕, 郑炜晨, 邵金. 基于改进PBFT算法的区块链技术在供应链溯源中的应用[J]. 南阳理工学院学报, 2020, 12(4): 23-29. [Google Scholar] [CrossRef
[3] 余其凤, 陈振标, 刘敏榕. 区块链技术在图书馆数字资产管理中的应用探讨[J]. 数字图书馆论坛, 2018(7): 30-36.
[4] 王振明, 于剑峰, 毛嘉, 等. 云边协同物联网中区块链技术的应用研究[J]. 物联网技术, 2022, 12(9): 60-65. [Google Scholar] [CrossRef
[5] 张路. 博弈视角下区块链驱动供应链金融创新研究[J]. 经济问题, 2019(4): 48-54. [Google Scholar] [CrossRef
[6] Sukhwani, H., Martínez, J.M., Chang, X., et al. (2017) Performance Modeling of PBFT Consensus Process for Permissioned Blockchain Network (Hyperledger Fabric). 2017 IEEE 36th Symposium on Reliable Distributed Systems (SRDS), Hong Kong, 26-29 September 2017, 253-255. [Google Scholar] [CrossRef
[7] Zhang, L., Hang, L. and Kim, D. (2023) Enhanced Multiset Consensus Protocol Based on PBFT for Logistics Information Traceability. Security and Communication Networks, 2023, 1-16. [Google Scholar] [CrossRef
[8] 王群, 李馥娟, 倪雪莉, 等. 区块链共识算法及应用研究[J]. 计算机科学与探索, 2022, 16(6): 1214-1242. [Google Scholar] [CrossRef
[9] Chen, Y., Li, M., Zhu, X., Fang, K., Ren, Q., Guo, T., Chen, X., Li, C., Zou, Z. and Deng, Y. (2022) An Improved Algorithm for Practical Byzantine Fault Tolerance to Large-Scale Consortium Chain. Information Processing & Management, 59, Article ID: 102884. [Google Scholar] [CrossRef
[10] Tang, S., Wang, Z., Jiang, J., Ge, S. and Tan, G. (2022) Improved PBFT Algorithm for High-Frequency Trading Scenarios of Alliance Blockchain. Scientific Reports, 12, Article No. 4426. [Google Scholar] [CrossRef] [PubMed]
[11] 刘泽坤, 王峰, 贾海蓉. 结合动态信用机制的PBFT算法优化方案[J]. 计算机工程, 2023, 49(2): 191-198. [Google Scholar] [CrossRef
[12] 王日宏, 张立锋, 徐泉清, 等. 可应用于联盟链的拜占庭容错共识算法[J]. 计算机应用研究, 2020, 37(11): 3382-3386. [Google Scholar] [CrossRef
[13] Navaroj, G.I., Julie, E.G. and Robinson, Y.H. (2022) Adaptive Practical Byzantine Fault Tolerance Consensus Algorithm in Permission Blockchain Network. International Journal of Web and Grid Services, 18, 62-82. [Google Scholar] [CrossRef
[14] Wang, Z.Y., Wang, J., Liu, Y.N. and Wang, W. (2021) Improvement of PBFT Consensus Mechanism Based on Credibility. 2021 18th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP), Chengdu, 17-19 December 2021, 93-96. [Google Scholar] [CrossRef
[15] Zheng, X., Feng, W., Huang, M. and Feng, S. (2021) Optimization of PBFT Algorithm Based on Improved C4.5. Mathematical Problems in Engineering, 2021, 1-7. [Google Scholar] [CrossRef
[16] Gu, R., Chen, B. and Huang, D. (2022) Primary Node Selection Algorithm of PBFT Based on Anomaly Detection and Reputation Model. Lecture Notes in Electrical Engineering, 808, 1613-1622. [Google Scholar] [CrossRef
[17] Wu, Y., Song, P. and Wang, F. (2020) Hybrid Consensus Algorithm Optimization: A Mathematical Method Based on POS and PBFT and Its Application in Blockchain. Mathematical Problems in Engineering, 2020, 1-13. [Google Scholar] [CrossRef
[18] 刘海峰, 闫宏生, 陈刚, 等. SE-PBFT: 一种面向物联网安全的区块链高效共识算法研究[C]//中国仿真学会. 第三十四届中国仿真大会暨第二十一届亚洲仿真会议论文集. 2022: 8.[CrossRef
[19] Gao, S., Yu, T., Zhu, J. and Cai, W. (2019) T-Pbft: An EigenTrust-Based Practical Byzantine Fault Tolerance Consensus Algorithm. China Communications, 16, 111-123. [Google Scholar] [CrossRef
[20] 阎红灿, 窦桂梅, 陈子昂, 等. 基于动态信任值的实用拜占庭容错算法的优化[J]. 华北理工大学学报(自然科学版), 2023, 45(1): 99-108.
[21] 涂园超, 陈玉玲, 李涛, 等. 基于信誉投票的PBFT改进方案[J]. 应用科学学报, 2021, 39(1): 79-89.
[22] 黄保华, 屈锡, 郑慧颖, 等. 一种基于信用的拜占庭容错共识算法[J]. 信息网络安全, 2022, 22(4): 86-92.
[23] Cai, W., Jiang, W., Xie, K., Zhu, Y., Liu, Y. and Shen, T. (2020) Dynamic Reputation-Based Consensus Mechanism: Real-Time Transactions for Energy Blockchain. International Journal of Distributed Sensor Networks, 16. [Google Scholar] [CrossRef
[24] Gao, W., Mu, W., Huang, S., Wang, M. and Li, X. (2021) Improved Byzantine Fault-Tolerant Algorithm Based on Alliance Chain. Wireless Communications and Mobile Computing, 2021, 1-10. [Google Scholar] [CrossRef
[25] Yu, G., Wu, B. and Niu, X. (2020) Improved Blockchain Consensus Mechanism Based on PBFT Algorithm. 2020 2nd International Conference on Advances in Computer Technology, Information Science and Communications (CTISC), Suzhou, 20-22 March 2020, 14-21. [Google Scholar] [CrossRef
[26] Liu, S., Zhang, R., Liu, C., Xu, C., Zhou, J. and Wang, J. (2022) Improvement of the PBFT Algorithm Based on Grouping and Reputation Value Voting. International Journal of Digital Crime and Forensics, 14, 1-15. [Google Scholar] [CrossRef
[27] Liu, S., Zhang, R., Liu, C. and Shi, D. (2023) P-Pbft: An Improved Blockchain Algorithm to Support Large-Scale Pharmaceutical Traceability. Computers in Biology and Medicine, 154, Article ID: 106590. [Google Scholar] [CrossRef] [PubMed]
[28] 高娜, 周创明, 杨春晓, 等. 基于网络自聚类的PBFT算法改进[J]. 计算机应用研究, 2021, 38(11): 3236-3242. [Google Scholar] [CrossRef
[29] 刘陕南, 张荣华, 刘长征. 基于分组和信用分级的PBFT共识算法改进方案[J]. 计算机工程, 2023, 49(11): 143-149. [Google Scholar] [CrossRef
[30] 任玺羽, 童向荣, 张伟. 基于信任评估模型的PBFT共识算法[J]. 山西大学学报(自然科学版), 2023, 46(1): 108-118. [Google Scholar] [CrossRef
[31] 刘炜, 阮敏捷, 佘维, 等. 面向物联网的PBFT优化共识算法[J]. 计算机科学, 2021, 48(11): 151-158.
[32] Castro, M. and Liskov, B. (1999) Practical Byzantine Fault Tolerance. Proceedings of the Third Symposium on Operating Systems Design and Implementation, 173-186.
[33] Traag, V.A., Waltman, L. and van Eck, N.J. (2019) From Louvain to Leiden: Guaranteeing Well-Connected Communities. Scientific Reports, 9, Article No. 5233. [Google Scholar] [CrossRef] [PubMed]