The invention discloses a block chain
consensus method and device based on a Raft
algorithm, relates to the technical field of communication, and is used for solving the technical problems that in theprior art, abnormal nodes in a block chain based on a Raft
algorithm are easily selected as candidates, and the node activity is relatively low, so that the security of a block
chain system is relatively low. According to the invention, the
consensus nodes and the supervisor nodes used for obtaining the node information of the
consensus nodes can be constructed in the block chain; the height of each consensus node including the block height, Online duration, and node information of the average voting frequency are obtained through the supervisor node; when the consensus node of the leader state ends at any time, the consensus node of the leader state receives the node information of each consensus node sent by the supervisor node, determines and broadcasts the node information to at mostone recommended candidate consensus node according to the node information, converts the state of the recommended candidate consensus node into a candidate state, and enters a next election process. The invention is used for improving the security of the block
chain system.