Block chain consensus method and device based on Raft algorithm

A block chain and algorithm technology, applied in the field of block chain, can solve problems such as inability to guarantee management nodes

Pending Publication Date: 2020-10-23
SHANGHAI SHENTIE INFORMATION ENG
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The purpose of the present invention is to provide a block chain consensus method and device based on the Raft algorithm in orde

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Block chain consensus method and device based on Raft algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] Such as figure 1 As shown, a blockchain consensus method based on the Raft algorithm, while meeting the daily bookkeeping of the blockchain based on the conventional Raft algorithm, also meets the management requirements of the blockchain and each node, specifically including the following steps:

[0035] Step S1: Divide the nodes in the blockchain into management nodes and member nodes. The status of member nodes includes follower, candidate or leader, and the status of manager nodes includes follower, candidate, leader or manager;

[0036] Step S2: The initial state of the management node is not a manager, and all management nodes and member nodes conduct leader election based on the conventional Raft algorithm, and the elected node that is the leader is responsible for recording transaction events and generating transaction blocks;

[0037] Step S3: When the state of the management node is changed from manager to manager, send periodic heartbeat notification broadcas...

Embodiment 2

[0054] The classification method of management nodes and member nodes is to identify them according to node type, node name, IP address, port number and public key password, and divide them into management nodes and member nodes through node name, IP address, port number and signature based on private key . All the other are the same as embodiment one.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a block chain consensus method based on a Raft algorithm, and the method specifically comprises the following steps: S1, dividing nodes in a block chain into management nodesand member nodes, enabling the states of the member nodes and the management nodes to comprise followers, candidates or leaders, and enabling the states of the management nodes to further comprise managers; s2, enabling the management node and the member nodes to carry out election based on a conventional Raft algorithm, selecting a leader to record a transaction event, and a forming transaction block; s3, when the management node is converted into a manager, sending a periodic heartbeat notification broadcast, converting the member node into a follower, and allowing the management node to take over the work of the leader node; and S4, when the management node exits from the manager, switching to a follower, stopping sending the periodic heartbeat notification broadcast, converting the member node into a candidate, and going to the step S2. Compared with the prior art, the invention has the advantages that the management nodes can record transaction events and generate transaction blocks at the same time, and unified management is facilitated.

Description

technical field [0001] The present invention relates to the field of block chains, in particular to a block chain consensus method and device based on Raft algorithm. Background technique [0002] Currently, the most widely used consensus algorithms in blockchain technology are PoW algorithm, PBFT algorithm and Raft algorithm. [0003] The workload proof algorithm PoW is used to confirm that a certain node has done a certain amount of work. It is a consensus algorithm that has been very successful in the Bitcoin system. According to the PoW algorithm, the PoS algorithm and the DPoS algorithm are derived. [0004] The Practical Byzantine Fault Tolerant Algorithm PBFT enables the Byzantine Fault Tolerant Algorithm to achieve engineering-acceptable efficiency in practical applications, and the fault-tolerant nodes are N / 3-1. [0005] The Raft algorithm is an engineering implementation of the Paxos algorithm, which reduces the complexity of the Paxos algorithm. The Raft algorit...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/23G06F16/27G06Q40/04
CPCG06Q40/04G06F16/23G06F16/27
Inventor 王平王学斌吴文波金翔杨友兰马毅华
Owner SHANGHAI SHENTIE INFORMATION ENG
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products