Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Raft algorithm-based block chain consensus method and system

A blockchain and consensus technology, applied in the field of blockchain consensus, can solve problems such as unavoidable harm of malicious nodes, and achieve the effect of eliminating security risks, solving security risks, and reducing performance.

Pending Publication Date: 2022-08-02
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical task of the present invention is to provide a blockchain consensus method and system based on the Raft algorithm to solve the inability to avoid the harm caused by malicious nodes, and to eliminate the potential safety hazard that the original Raft algorithm may cause splits due to cluster expansion

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
  • Raft algorithm-based block chain consensus method and system
  • Raft algorithm-based block chain consensus method and system
  • Raft algorithm-based block chain consensus method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0105] as attached figure 1 As shown, the blockchain consensus method based on the Raft algorithm of the present invention is to add an observer node on the basis of the leader, follower and candidate nodes, and the initial state of the cluster affects all nodes except the observer node. Set a random timeout period; during the leader election process, the observer monitors the candidates, identifies whether the candidates are malicious nodes, and has the final decision on the generation of the leader; All nodes in the log copy RPC messages, and the observer does not feedback information; during the cluster change process, the observer sends the new log item to the leader, and the leader broadcasts the new log item and puts the new log item in the Local state machine; as follows:

[0106] S1. Cluster initialization: In addition to an inherent observation point N at the beginning 0 In addition, all nodes are followers;

[0107] S2. Election of the leader: The leader election ...

Embodiment 2

[0185] This embodiment provides a blockchain consensus system based on the Raft algorithm, the system includes:

[0186] The initialization module is used for cluster initialization, that is, to set the initial in addition to an inherent observation point N 0 In addition, all nodes are followers;

[0187] The election module is used to trigger the candidate's request to vote RPC through the follower's failure to receive heartbeat information for leader election;

[0188] The identification module is used to identify the malicious node when a candidate initiates a request for voting RPC, so as to reduce performance pressure and ensure cluster security;

[0189] The replication module is used to create a new log entry based on the instructions in the client request, append it to the local log, and then copy the RPC message through the log to copy the log entry to other servers;

[0190] The change module is used to use the observer node to send the newly configured log item to t...

Embodiment 3

[0192] This embodiment also provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by the processor to make the processor execute the Raft algorithm-based blockchain consensus method in any embodiment of the present invention. Specifically, it is possible to provide a system or apparatus equipped with a storage medium on which software program codes for implementing the functions of any of the above-described embodiments are stored, and which enables a computer (or CPU or MPU of the system or apparatus) ) to read and execute the program code stored in the storage medium.

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 discloses a block chain consensus method and system based on a Raft algorithm, belongs to the technical field of block chain consensus, and aims to solve the technical problem of incapability of avoiding harm caused by disable nodes, eliminate the potential safety hazard of splitting possibly caused by cluster capacity expansion of an original Raft algorithm and improve the efficiency of block chain consensus. According to the technical scheme, the method comprises the steps that observer nodes are newly added on the basis of leader nodes, follower nodes and candidate nodes, and random timeout time is set for all nodes except the observer nodes in the initial state of a cluster; in the leader election process, an observer monitors the candidate, identifies whether the candidate is a disable node or not, and has a final decision right for the generation of the leader; when the leader generates the information, log replication RPC information is carried out on all nodes including the observer, and the observer does not feed back the information; and in the cluster change process, the observer sends the new log item to the leader, and the leader broadcasts the new log item and puts the new log item into the local state machine.

Description

technical field [0001] The invention relates to the technical field of blockchain consensus, in particular to a blockchain consensus method and system based on Raft algorithm. Background technique [0002] Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain (Blockchain) is an important concept of Bitcoin. It is essentially a decentralized database. At the same time, as the underlying technology of Bitcoin, it is a series of data blocks generated using cryptographic methods. The data block contains the information of a batch of Bitcoin network transactions, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. [0003] At present, the consensus mechanisms commonly used in blockchain include POW mechanism, POS mechanism and DPOS mechanism. The above mechanisms have drawbacks in resource consumpti...

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): H04L67/10H04L9/40H04L67/1097
CPCH04L67/10H04L63/1416H04L67/1097H04L2209/463Y02D10/00
Inventor 张兴民
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More