Journal of Computer Applications ›› 2023, Vol. 43 ›› Issue (1): 122-129.DOI: 10.11772/j.issn.1001-9081.2021111996

Special Issue: 网络空间安全

• Cyber security • Previous Articles     Next Articles

Improved practical Byzantine fault tolerance consensus algorithm based on Raft algorithm

WANG Jindong, LI Qiang   

  1. College of Computer Science, Sichuan University, Chengdu Sichuan 610065, China
  • Received:2021-11-24 Revised:2022-05-07 Online:2022-05-24
  • Contact: LI Qiang, born in 1963, Ph. D., associate professor.His research interests include mobile cloud computing, big data, blockchain.
  • About author:WANG Jindong, born in 1997, M. S. candidate. His research interests include blockchain;
  • Supported by:
    This work is partially supported by National Key Research and Development Program of China (2020YFB1711800).

基于Raft算法改进的实用拜占庭容错共识算法

王谨东, 李强   

  1. 四川大学 计算机学院,成都 610065
  • 通讯作者: 李强(1963—),男,四川成都人,副教授,博士,主要研究方向:移动云计算、大数据、区块链。liq@scu.edu.cn
  • 作者简介:王谨东(1997—),男,四川巴中人,硕士研究生,CCF会员,主要研究方向:区块链;
  • 基金资助:
    国家重点研发计划项目(2020YFB1711800)。

Abstract: Since Practical Byzantine Fault Tolerance (PBFT) consensus algorithm applied to consortium blockchain has the problems of insufficient scalability and high communication overhead, an improved practical Byzantine fault tolerance consensus algorithm based on Raft algorithm named K-RPBFT (K-medoids Raft based Practical Byzantine Fault Tolerance) was proposed. Firstly, blockchain was sharded based on K-medoids clustering algorithm, all nodes were divided into multiple node clusters and each node cluster constituted to a single shard, so that global consensus was improved to hierarchical multi-center consensus. Secondly, the consus between the cluster central nodes of each shard was performed by adopting PBFT algorithm, and the improved Raft algorithm based on supervision nodes was used for intra-shard consensus. The supervision mechanism in each shard gave a certain ability of Byzantine fault tolerance to Raft algorithm and improved the security of the algorithm. Experimental analysis shows that compared with PBFT algorithm, K-RPBFT algorithm greatly reduces the communication overhead and consensus latency, improves the consensus efficiency and throughput while having Byzantine fault tolerance ability, and has good scalability and dynamics, so that the consortium blockchain can be applied to a wider range of fields.

Key words: blockchain, consensus algorithm, Practical Byzantine Fault Tolerance (PBFT), Raft algorithm, K-medoids clustering algorithm

摘要: 针对应用于联盟链的实用拜占庭容错(PBFT)共识算法可扩展性不足、通信开销大等问题,提出了一种基于Raft算法改进的实用拜占庭容错共识算法K-RPBFT。首先,将区块链分片,使用K-medoids聚类算法将所有节点划分为多个节点簇,每个节点簇构成一个分片,从而将全局共识改进为分层次的多中心共识;然后,每个分片的聚类中心节点之间使用PBFT算法进行共识,而在分片内部使用基于监督节点改进的Raft算法进行共识。K-RPBFT算法的片内监督机制赋予了Raft算法一定的拜占庭容错能力,并提升了算法的安全性。实验分析表明,相较于PBFT算法,K-RPBFT算法在具备拜占庭容错能力的同时能够大幅降低共识的通信开销与共识时延,提升共识效率与吞吐量,并且具有良好的可扩展性与动态性,使联盟链能够应用于更广泛的场景中。

关键词: 区块链, 共识算法, 实用拜占庭容错, Raft算法, K中心点聚类算法

CLC Number: