The invention provides a Raft
consensus method based on a weighted
PageRank and a BLS threshold signature, and belongs to the technical field of block chains. The problem that the
consensus efficiency and the Byzantine fault-tolerant capability of a common
consensus algorithm of a current alliance chain are difficult to balance is solved; comprising the following steps:
system initialization: starting each node of a consensus cluster and initializing each node attribute, adding two node attributes on the basis of the original node attribute of a Raft
algorithm, namely a node initial pr value and a public and private key pair (pki, ski) required by node signature
verification, and performing communication through a
heartbeat mechanism after each node is successfully started; performing
leader election: traversing communication conditions of all nodes, constructing a weighted
directed graph according to the communication conditions among the nodes, calculating a pr value of each node through a weighted
PageRank algorithm, and setting a relatively short election
timeout time for the node with the high pr value, so that the node becomes a leader more easily; log
copying: performing log
copying based on the threshold signature of the BLS; the method is applied to the alliance chain.