摘要
区块链技术自从面世以来,就以其不可篡改性和去中心化等优势闻名。保证其不可篡改性的技术中重要的一项技术便是共识协议。而不同的共识协议面对不同的环境的表现也是各不相同,所以如何确保共识协议在特定的环境核能稳定高效运行,是区块链应用中的一个很重要的问题。基于Raft算法和Pbft算法设计一种新的共识算法并应用于区块链物流项目中,首先对参与共识的节点进行分组,组内使用Raft算法共识,各组选出领导者节点后由领导者节点代表本组成员来进行组间共识,组间使用Pbft算法进行共识,对Pbft算法的启动条件进行修改,使其支持在运行过程中增减节点。通过这种方式来确保即便节点在增多的情况下,对系统的性能影响依旧在可控范围内,同时还能够避免Raft算法的候选冲突问题。
Different consensus algorithms perform differently in different environments.Therefore,how to ensure the stable and efficient operation of the consensus algorithm in a specific environment is a very important issue in blockchain applications.This paper designs a new consensus algorithm based on Raft algorithm and Pbft algorithm and applies it to the blockchain logistics project.First,the nodes participating in the consensus are grouped,and the Raft algorithm is used for consensus within the group.After each group selects a leader node,the leader nodes represent the members of the group to carry out the consensus among the groups,and the slightly modified Pbft algorithm is used for consensus among the groups.In this way,even if the number of nodes increases,the performance impact on the system is still within a controllable range,and at the same time,the candidate conflict problem of the Raft algorithm can be avoided.
作者
赵鹏
刘佳宝
梁晋铭
ZHAO Peng;LIU Jia-bao;LIANG Jin-ming(Taiyuan Normal University,Taiyuan 030619,Shanxi)
出处
《电脑与电信》
2022年第12期62-66,共5页
Computer & Telecommunication