CN114844891A - Block chain consensus method and system based on Raft algorithm - Google Patents

Block chain consensus method and system based on Raft algorithm Download PDF

Info

Publication number
CN114844891A
CN114844891A CN202210420723.1A CN202210420723A CN114844891A CN 114844891 A CN114844891 A CN 114844891A CN 202210420723 A CN202210420723 A CN 202210420723A CN 114844891 A CN114844891 A CN 114844891A
Authority
CN
China
Prior art keywords
leader
log
node
candidate
follower
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210420723.1A
Other languages
Chinese (zh)
Other versions
CN114844891B (en
Inventor
张兴民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202210420723.1A priority Critical patent/CN114844891B/en
Publication of CN114844891A publication Critical patent/CN114844891A/en
Application granted granted Critical
Publication of CN114844891B publication Critical patent/CN114844891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a block chain consensus method and a block chain consensus system based on a Raft algorithm, which belong to the technical field of block chain consensus, solve the technical problems that the harm caused by malicious nodes cannot be avoided, and eliminate the potential safety hazard that the original Raft algorithm possibly causes splitting due to cluster expansion, and adopt the technical scheme that: the method is that observer nodes are newly added on the basis of a leader, a follower and candidate nodes, and random timeout time is set for all nodes except the observer nodes in a cluster initial state; in the leader election process, the observer monitors the candidate, identifies whether the candidate is a malicious node or not, and has final decision power on the generation of the leader; after the leader generates, performing log copy RPC message on all nodes including the observer, wherein the observer does not feed back information; in the cluster change process, the observer sends a new log entry to the leader, which broadcasts the new log entry and puts the new log entry into the local state machine.

Description

Block chain consensus method and system based on Raft algorithm
Technical Field
The invention relates to the technical field of block chain consensus, in particular to a block chain consensus method and system based on a Raft algorithm.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The Blockchain (Blockchain) is an important concept of the bitcoin, which is essentially a decentralized database, and is used as the underlying technology of the bitcoin, and is a series of data blocks which are generated by using a cryptographic method to be related, wherein each data block contains information of a batch of bitcoin network transactions, and the information is used for verifying the validity (anti-counterfeiting) of the information and generating the next block.
Common consensus mechanisms currently used in blockchains include POW mechanisms, POS mechanisms, and DPOS mechanisms. The above mechanisms suffer from resource consumption, security, and consensus time. For example, the resource consumption of the POW mechanism is large, the whole network needs to participate in the operation together when the consensus is achieved each time, a certain calculation time needs to be consumed, and the performance efficiency is low; the POS mechanism and DPOS mechanism determine the probability of generating blocks based on system tokens or weights held by the user, but do not maintain the ecology and security of the blockchain system itself.
The Raft algorithm is a consistency consensus algorithm, and the Raft algorithm is easy to understand and easy to realize in an engineering mode, and has the advantages of high efficiency and the like. The Raft algorithm achieves consistency by electing a leader, and the leader sends heartbeat messages and log replication again. However, the traditional Raft algorithm can only tolerate the fault node and cannot avoid the harm brought by the rogue node, so if the rogue node appears in the cluster, the performance is seriously influenced by the reuse of the traditional Raft algorithm, and even the safety of the system is seriously harmed under the disturbance of the rogue node.
The traditional Raft algorithm is also slightly weak in cluster expansion, and because a leader needs to obtain most votes, splitting can occur during expansion, so that the instability of system operation is increased.
Disclosure of Invention
The technical task of the invention is to provide a block chain consensus method and a block chain consensus system based on a Raft algorithm, so as to solve the problem that the harm caused by malicious nodes cannot be avoided and eliminate the potential safety hazard that the original Raft algorithm may cause splitting due to cluster expansion.
The technical task of the invention is realized in the following way, a block chain consensus method based on a Raft algorithm is provided, the method is that observer nodes are newly added on the basis of a leader, a follower and a candidate node, and random overtime time is set for all nodes except the observer nodes in a cluster initial state; in the leader election process, the observer monitors the candidate, identifies whether the candidate is a malicious node or not, and has final decision power on the generation of the leader; after the leader generates, performing log copy RPC message on all nodes including the observer, wherein the observer does not feed back information; in the cluster change process, the observer sends a new log entry to the leader, which broadcasts the new log entry and puts the new log entry into the local state machine.
Preferably, the method is specifically as follows:
cluster initialization: at first except for a natural observation point N 0 Besides, all nodes are followers;
election leader: triggering the request voting RPC of a candidate to carry out leader election by the follower without receiving the heartbeat information;
identifying as a rogue node: carrying out malicious node identification on the candidate when the candidate initiates the request voting RPC so as to reduce the performance pressure and ensure the cluster safety;
copying a log: the log is composed of a plurality of log items, each log item is composed of an instruction, an index value and an expiration number, and the form is as follows:
Figure BDA0003607488060000021
the above expression indicates that the log is composed of a plurality of log items; journal i Representing a log;
Figure BDA0003607488060000022
representing a log entry;
Figure BDA0003607488060000023
representing an index value; termnum j Represents the expiration number;
Figure BDA0003607488060000024
representing an instruction;
regarding member changes.
Preferably, the follower is adapted to accept and process messages from the leader when the leader has heartbeat information T 0 When the time is out, recommending the candidate to the user; the follower node is of the form: n is a radical of i <Node i ,TermNum j ,T i ,Vote i ,Journal i >(ii) a Wherein i is more than or equal to 1 and less than or equal to n; j is 0,1,2 …; vote i 0, 1; n is the number of nodes in the initial state cluster; journal i Is a log; vote i Initial value of 1, T i Representing a random timeout set for each follower node;
the candidate is used for sending a request voting RPC message to other nodes and becomes a leader when winning most votes;
the leader is used for processing the writing request, managing log replication and sending heartbeat information T 0 Meanwhile, only one leader can exist in the cluster;
the observer is used for identifying whether the candidate is a rogue node or not when the candidate initiates the request voting RPC, and assisting the cluster in capacity expansion; wherein, regarding the observer as a credible node, the form is: w<TermNum j+1 ,Wvote,Journal j+1 >The method and the device have the advantages that the unreliable caused by the self problems of the role of the observer is avoided, so that the stability of the system is improved, and the damage of external attack to the system is reduced; if the initial value of Wvote is 1, judging candidate C i Set it to 0 after being regarded as a rogue node.
Preferably, the election leader is specifically as follows:
the leader is not in the initial cluster, and when the timeout time T of any node is less than the threshold i Arrived first and no heartbeat information T from the leader is received in the process 0 Then will make its own expiration number Termnum j Plus one, make itself a candidate C i <i,Votes,TermNum j+1 ,Journal i >(ii) a A vote is cast to itself and a request voting RPC is initiated to all other nodes, the formula is as follows:
TermNum j+1 =TermNum j +1;
Votes=0+1;
wherein Termnum j The number of the last expiration date is represented, and the default value is 0; votes default is 0 when a follower N i Become candidate C i Later, Votes will get from C i The vote of (1) is increased by one;
when other followers receive the voting request from the node with larger tenure number and do not vote in the tenure number of the candidate, the follower node casts the vote to the candidate node initiating the request voting RPC message, and the subsequently voted followers add their own tenure numbers to be consistent with the voted candidates, which is specifically as follows:
Figure BDA0003607488060000041
Votes+Vote b
Vote b =0;
C a <a,Votes,TermNum j +1,Journal a >representing a candidate; n is a radical of hydrogen b < b ,TermNum j ,T b ,Vote b ,Journal b >Representing a follower node; votes + Vote b Representing the follower voting on the candidate; vote b Represents votes owned by the follower; the candidate initiates a request voting RPC to the follower, the follower votes on the candidate, and the follower's vote is emptied;
if a candidate node C i <i,Votes,TermNum j+1 >At a timeout T i If most votes are won, the voter will be the new leader L in the period number after the voter votes i The formula is as follows:
Figure BDA0003607488060000042
Figure BDA0003607488060000043
Figure BDA0003607488060000044
the above expression indicates that the election time cannot exceed a timeout time, all votes obtained by the candidate must be more than 50% of the number of all follower nodes, and votes of the observer nodes must be obtained; votes represents the number of tickets currently acquired by the candidate; vote i Votes representing followers of the vote; t represents the time of election; t is i Indicating a timeout period; n represents the number of follower nodes; wvote represents the vote for the observer node;
when the new leader elects, it will be elected with T i And sending heartbeat information periodically in time to prevent other nodes from initiating new elections.
Preferably, the election rule is specifically as follows:
firstly, the leader periodically sends heartbeat information to all nodes at any time so as to inform the follower and the observer of the identities of the leader of the follower and prevent the follower from becoming a candidate to initiate a new round of election;
if any follower node does not receive the heartbeat signal from the leader within a random timeout time, the follower node becomes a candidate and initiates a request voting RPC message to other nodes;
③ only one leader can exist in one free period;
fourthly, in one round of voting, the candidate throws votes to the candidate, other nodes vote according to the sequence of first-come first-throw, and the follower has only one vote in one round of voting;
log integrity, namely the size of the number value of the expiration date corresponding to the last record of the node log entry; follower N with high log integrity b Refusing to vote for candidate C with low log integrity a The method comprises the following steps:
Figure BDA0003607488060000051
Figure BDA0003607488060000052
Figure BDA0003607488060000053
a n <b n
Figure BDA0003607488060000054
the expression shows that after the candidate initiates the RPC voting request to the follower, if the deadline number value of the follower is greater than the deadline number value of the candidate, the follower refuses to vote to the candidate; c a <a,Votes,TerrnNum j+1 ,Journala>Representing a candidate node for initiating a voting request; n is a radical of b <b,TermNum j ,T b ,Vote b ,Journal b >A follower node representing no votes yet; journal b A log representing a follower node; journal a A log representing candidate nodes that initiated the voting RPC request; a is n A subscript representing a candidate node log index; b n Subscripts representing follower node log indices;
sixthly, for the candidate, even if the candidate obtains most votes (the most votes are more than 1/2 votes), the candidate can become a leader after obtaining the special votes of the observer nodes;
the leader tenure rule is specifically as follows:
the tenure period represents the period existing in a leader, and the tenure period number represents the current tenure period;
secondly, when the follower waits for the overtime of the heartbeat time, the follower becomes a candidate and adds one to the expiration number of the follower;
thirdly, when one node finds that the dead time number of the node is smaller than that of other nodes, the dead time number of the node is the same as the maximum value;
fourthly, when one leader or candidate finds that the dead time number of the leader or candidate is smaller than that of other nodes, the identity of the follower is restored immediately;
and one node receives a request with a tenure number value smaller than the tenure number of the node, and directly rejects the request.
Preferably, the malicious nodes are identified as follows:
setting a new role observer in the cluster, and when a candidate initiates a request voting RPC message, monitoring whether abnormal behaviors exist in the node of the candidate in the execution process by the observer:
if abnormal behaviors are monitored, the observer cannot vote for the candidate and broadcasts the tenure number of the candidate to enable all nodes to be consistent with the tenure number, and then the next round of voting is started;
if the candidate votes for the current vote, the observer node votes for the current vote after obtaining most votes, specifically as follows:
Figure BDA0003607488060000061
Figure BDA0003607488060000062
the expression shows that in the voting process, the observer node can detect the candidate node, does not vote for the candidate node if the candidate node is abnormal, and broadcasts the free period number of the candidate node to all follower nodes; if no abnormity occurs, voting for the abnormity; w<TermNum j+1 ,Wvote,Journal j+1 >Representing an observer node; C a<a,Votes,TermNum j+1 ,Journal a >representing a candidate node for initiating a voting request; wvote represents the vote for the observer node; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Representing the follower node.
Preferably, the replication log is specifically as follows:
after receiving the client request, the leader creates a new log item based on the instruction in the client request and adds the new log item to the local log;
copying RPC information through the log, and copying the log item to other servers;
judging whether the leader receives the corresponding copy success:
when the leader receives most of the replication success responses, applying the log items to the state machine corresponding to the leader, and returning success to the client;
when the leader does not receive the corresponding copying success, the leader returns an error to the client;
after the follower receives the heartbeat message or the new log copy RPC message, if the follower finds that the leader has already submitted any log item but does not apply itself, the follower applies the log item to a local state machine, which is specifically as follows:
Figure BDA0003607488060000071
Figure BDA0003607488060000072
Figure BDA0003607488060000073
Figure BDA0003607488060000074
Figure BDA0003607488060000075
Figure BDA0003607488060000076
the formula shows that after a leader receives a log replication request from a client, a new log item is created based on an instruction in the request and is attached to a local log, then the new log is replicated to a follower by sending a log replication RPC, when the follower successfully replicates the log, the follower sends a replication success response to the leader, and when the leader receives a node replication success response exceeding 1/2, the log item is applied to a state machine corresponding to the leader and returns success to the client; the Client represents a Client; l is b <b,TermNum j+1 ,T b ,Journal b >Representing a leader node; journal b A log representing a leader;
Figure BDA0003607488060000077
representing a newly appended log entry; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Representing a follower; cnt represents the number of copy success responses received by the leader; FSM represents a local state machine;
the consistency of the logs refers to that the leader realizes the consistency of the logs by forcing the follower to copy own log items, and the consistency is as follows:
the leader finds the maximum index value of the log item which is the same as the leader node on the follower node through the consistency check of the log copy RPC message;
the leader forces the follower to update the log items with inconsistent coverage, so as to realize the consistency of the logs;
the leader performs a separate consistency check for each follower.
More preferably, the member changes are specifically as follows:
the observer node is used for sending the newly configured log item to the leader, and the leader integrates the missing part of the newly configured log item into the log item of the leader;
the leader broadcasts a new log item to the cluster, and after receiving most of the replication success responses, submits the log item newly configured by the leader to a local state machine to complete the change of the auxiliary node members of the observer cluster, which is specifically as follows:
Figure BDA0003607488060000081
Figure BDA0003607488060000082
Figure BDA0003607488060000083
the expression shows that when the cluster needs to be expanded, the observer node updates the own log firstly, then informs the leader to copy the log of the observer through the log copy RPC, and then the leader sends the log copy RPC to the follower and copies the new log to the follower node; { NewNi } indicates the node to be newly added, W<TermNum j+1 ,Wvote,Journal j+1 >Represents the observer; l is b <b,TermNum j+1 ,T b ,Journal j+1 ,Cnt>Representing a leader; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Indicating a follower.
A block chain consensus system based on a Raft algorithm comprises,
an initialization module for cluster initialization, i.e. setting the initial except a inherent observation point N 0 Besides, all nodes are followers;
the election module is used for triggering the candidate to request to vote RPC for leader election through the condition that the follower does not receive the heartbeat information;
the identification module is used for carrying out malicious node identification on the candidate when the candidate initiates the request voting RPC so as to reduce the performance pressure and ensure the cluster safety;
the copying module is used for creating a new log item based on an instruction in the client request, attaching the new log item to a local log, and copying the log item to other servers through the log-copying RPC message;
and the change module is used for sending the newly configured log items to the leader by using the observer nodes, integrating the missing part of the newly configured log items into the log items of the leader by the leader, broadcasting the new log items to the cluster by the leader, and submitting the log items newly configured by the leader to a local state machine after receiving most of replication success responses to complete the change of the members of the auxiliary nodes of the observer cluster.
A computer readable storage medium having stored thereon computer executable instructions, which when executed by a processor, implement the method for block chain consensus based on the Raft algorithm as described above.
The block chain consensus method and system based on the Raft algorithm have the following advantages:
the invention adds an observer node, can judge whether the new leader is a rogue node before the new leader is generated, and has final decision right on the generation of the leader; the observer node only works in the election process and only monitors one node, so that the performance can be improved to the maximum extent, the resource consumption is reduced, and meanwhile, the potential safety hazard that the original Raft algorithm cannot screen the rogue node is solved;
the method and the device realize the change of the auxiliary node members of the observer, namely, the newly added observer nodes are used, and the risk that a plurality of leaders possibly appear when a new node cluster is added in the original Raft algorithm is solved;
thirdly, a new observer node is added on the basis of the original three nodes of the Raft to monitor the candidate in the process of initiating the voting request RPC by the candidate, if the observer node is found to be a rogue node, the observer does not vote for the candidate, and the candidate cannot become a leader if the candidate cannot vote by the observer, namely, an inherent credible node is assumed on the basis of the original algorithm to assist in rogue node identification and prevent splitting during cluster expansion;
the observer nodes are newly added on the original basis, and a new method is provided for malicious node identification and cluster expansion in the interaction links of the leader, the follower and the candidate nodes, so that the harm caused by malicious node avoidance of the original algorithm is solved, and the potential safety hazard of splitting possibly caused by cluster expansion of the original algorithm is eliminated;
and (V) carrying out malicious node identification on the candidate when the candidate initiates the request voting RPC so as to reduce the performance pressure and ensure the cluster safety.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart diagram of a block chain consensus method based on a Raft algorithm;
FIG. 2 is a block flow diagram of a replication log.
Detailed Description
The method and system for block chain consensus based on the Raft algorithm of the present invention are described in detail below with reference to the drawings and embodiments of the specification.
Example 1:
as shown in fig. 1, in the block chain consensus method based on the Raft algorithm, an observer node is newly added on the basis of a leader, a follower and a candidate node, and random timeout time is set for all nodes except the observer node in a cluster initial state; in the leader election process, the observer monitors the candidate, identifies whether the candidate is a malicious node or not, and has final decision power on the generation of the leader; after the leader generates, performing log copy RPC message on all nodes including the observer, wherein the observer does not feed back information; in the cluster changing process, the observer sends a new log item to the leader, and the leader broadcasts the new log item and puts the new log item into a local state machine; the method comprises the following specific steps:
s1, cluster initialization: at first except for a natural observation point N 0 Besides, all nodes are followers;
s2, election leader: triggering the request voting RPC of a candidate to carry out leader election by the follower without receiving the heartbeat information;
s3, identifying as a malicious node: carrying out malicious node identification on the candidate when the candidate initiates the request voting RPC so as to reduce the performance pressure and ensure the cluster safety;
s4, copying the log: the log is composed of a plurality of log items, each log item is composed of an instruction, an index value and an expiration number, and the form is as follows:
Figure BDA0003607488060000111
the formula shows that the log consists of a plurality of log items, and the log items consist of index values, expiration numbers and instructions; journali represents the log of channel i;
Figure BDA0003607488060000112
an index value representing an nth log entry of the log; termnum j Represents the last expiration number;
Figure BDA0003607488060000113
instructions representing an nth log entry of the log;
s5, change of members.
The follower in this embodiment is used for receiving and processing messages from the leader, when the leader has heartbeat information T 0 When the time is out, recommending the candidate to the user; the follower node is of the form: n is a radical of i <Node i ,TermNum j ,T i ,Vote i ,Journal i >(ii) a Wherein i is more than or equal to 1 and less than or equal to n; j is 0,1,2 …; vote i 0, 1; n is the number of nodes in the initial state cluster; journal i Is a log; vote i Initial value of 1, T i Representing a random timeout set for each follower node;
the candidate is used for sending a request voting RPC message to other nodes and becomes a leader when winning most votes;
lead toThe server is used for processing write requests, managing log replication and sending heartbeat information T 0 Meanwhile, only one leader can exist in the cluster;
the observer is used for identifying whether the candidate is a rogue node or not when the candidate initiates the request voting RPC, and assisting the cluster in capacity expansion; wherein, regarding the observer as a credible node, the form is: w<TermNum j+1 ,Wvote,Journal j+1 >The method and the device have the advantages that the unreliable caused by the self problems of the role of the observer is avoided, so that the stability of the system is improved, and the damage of external attack to the system is reduced; if the initial value of Wvote is 1, judging candidate C i Set it to 0 after being regarded as a rogue node.
The election leader in step S2 of this embodiment is specifically as follows:
s201, no leader exists in the cluster at first, and when the timeout time T of any node is up i Arrived first and no heartbeat information T from the leader is received in the process 0 Then will make its own expiration number Termnum j Plus one, make itself a candidate C i <i,Votes,TermNum j+1 ,Journal i >(ii) a Casting a vote to itself and initiating a request vote RPC to all other nodes, the formula is as follows:
TermNum j+1 =TermNum j +1;
Votes=0+1;
wherein Termnum j The number of the last expiration date is represented, and the default value is 0; votes default is 0 when a follower N i Become candidate C i Later, Votes will get from C i The vote of (1) is increased by one;
s202, when other followers receive the voting request from the node with larger tenure number and do not vote in the tenure number of the candidate, the nodes of the followers cast votes to the candidate node initiating the request voting RPC message, and the following followers who subsequently vote add their tenure numbers to be consistent with the voted candidates, which is as follows:
Figure BDA0003607488060000121
Votes+Vote b
Vote b =0;
the expression shows that the candidate node a sends a request voting RPC message to other follower nodes with the optional period number of a minus one, then the follower nodes vote for the candidate node, the votes of the follower nodes are reduced by one, and the votes obtained by the candidate nodes are increased by one; c a <a,Votes,TermNum j+1 ,Journal a >Representing a candidate node for initiating a voting request; n is a radical of b <b,TermNum j ,T b ,Vote b ,Journal b >A follower node representing no votes yet; votes represents the number of tickets currently acquired by the candidate; vote b Representing votes cast by the follower node;
s203, if a candidate node C i <i,Votes,TermNum j+1 >At a timeout T i If most votes are won, the voter will be the new leader L in the period number after the voter votes i The formula is as follows:
Figure BDA0003607488060000131
Figure BDA0003607488060000132
Figure BDA0003607488060000133
the above formula shows that the election time cannot exceed a timeout time, all votes obtained by a candidate must be more than 50% of the number of all follower nodes, and votes of an observer node must be obtained; votes denotes the candidate currently acquiredThe number of tickets; vote i Votes representing followers of the vote; t represents the time of election; t is a unit of i Indicating a timeout period; n represents the number of follower nodes; wvote represents the vote for the observer node;
s204, when the new leader elects, the leader will select T i And sending heartbeat information periodically in time to prevent other nodes from initiating new elections.
The election rule in this embodiment is specifically as follows:
firstly, the leader periodically sends heartbeat information to all nodes at any time so as to inform the follower and the observer of the identities of the leader of the follower and prevent the follower from becoming a candidate to initiate a new round of election;
if any follower node does not receive the heartbeat signal from the leader within a random timeout time, the follower node becomes a candidate and initiates a request voting RPC message to other nodes;
③ only one leader can exist in one free period;
fourthly, in one round of voting, the candidate throws votes to the candidate, other nodes vote according to the sequence of first-come first-throw, and the follower has only one vote in one round of voting;
log integrity, namely the size of the number value of the expiration date corresponding to the last record of the node log entry; follower N with high log integrity b Refusing to vote for candidate C with low log integrity a The method comprises the following steps:
Figure BDA0003607488060000141
Figure BDA0003607488060000142
Figure BDA0003607488060000143
a n <b n
Figure BDA0003607488060000144
the expression shows that after the candidate initiates the RPC voting request to the follower, if the deadline number value of the follower is greater than the deadline number value of the candidate, the follower refuses to vote to the candidate; c a <a,Votes,TermNum j+1 ,Journal a >Representing a candidate node for initiating a voting request; n is a radical of hydrogen b <b,TermNum j ,T b ,Vote b ,Journal b >A follower node representing no votes yet; journal b A log representing a follower node; journal a A log representing candidate nodes that initiated the voting RPC request; a is n A subscript representing a candidate node log index; b n Subscripts representing follower node log indices;
sixthly, for the candidate, even if the candidate obtains most votes (the most votes are more than 1/2 votes), the candidate can become a leader after obtaining the special votes of the observer nodes;
the leader tenure rule in this embodiment is specifically as follows:
the tenure period represents the period existing in a leader, and the tenure period number represents the current tenure period;
secondly, when the follower waits for the overtime of the heartbeat time, the follower becomes a candidate and adds one to the expiration number of the follower;
thirdly, when one node finds that the own tenure number is smaller than that of other nodes, the own tenure number is the same as the maximum value;
fourthly, when one leader or candidate finds that the own expiration number is smaller than that of other nodes, the identity of the follower is restored immediately;
and one node receives a request with a tenure number value smaller than the tenure number of the node, and directly rejects the request.
The identification of the malicious node in step S3 in the present embodiment is specifically as follows:
setting a new role observer in the cluster, and when a candidate initiates a request voting RPC message, monitoring whether abnormal behaviors exist in the node of the candidate in the execution process by the observer:
if abnormal behaviors are monitored, an observer cannot vote for a candidate and broadcasts a due period number of the candidate to enable all nodes to be consistent with the due period number, and then the next round of voting is started;
if the candidate voter does not have abnormal behavior in the voting process, the observer node votes for the candidate voter after obtaining most votes, and the method comprises the following steps:
Figure BDA0003607488060000151
Figure BDA0003607488060000152
the expression shows that in the voting process, the observer node can detect the candidate node, does not vote for the candidate node if the candidate node is abnormal, and broadcasts the free period number of the candidate node to all follower nodes; if no abnormity occurs, voting for the abnormity; w<TermNum j+1 ,Wvote,Journal j+1 >Representing an observer node; c a <a,Votes,TermNum j+1 ,Journal a >Representing a candidate node for initiating a voting request; wvote represents the vote for the observer node; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Representing follower nodes;
as shown in fig. 2, the replication log in step S4 of this embodiment is specifically as follows:
s401, after receiving a client request, a leader creates a new log item based on an instruction in the client request and adds the new log item to a local log;
s402, copying RPC information through the log, and copying the log item to other servers;
s403, judging whether the leader receives the corresponding copy success:
firstly, when the leader receives most of the replication success responses, applying the log items to a state machine corresponding to the leader, and returning success to the client;
if the leader does not receive the corresponding copy success, the leader returns an error to the client;
s404, after the follower receives the heartbeat message or the new log copy RPC message, if the follower finds that the leader already submits any log item but does not apply the log item, the follower applies the log item to a local state machine, specifically as follows:
Figure BDA0003607488060000161
Figure BDA0003607488060000162
Figure BDA0003607488060000163
Figure BDA0003607488060000164
Figure BDA0003607488060000165
Figure BDA0003607488060000166
the formula shows that when the leader receives a log replication request from a client, a new log item is created based on instructions in the request and is attached to a local log, and then the log is copiedCopying a new log into a follower by sending a log copying RPC, sending a copy success response to a leader after the follower successfully copies the log, and applying a log item to a state machine corresponding to the leader and returning success to a client when the leader receives a node copy success response exceeding 1/2; the Client represents a Client; l is b <b,TermNum j+1 ,T b ,Journal b >Representing a leader node; journal b A log representing a leader;
Figure BDA0003607488060000167
representing a newly appended log entry; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Represents a follower; cnt represents the number of copy success responses received by the leader; the FSM represents a local state machine.
The consistency of the logs in this embodiment means that the leader realizes the consistency of the logs by forcing the follower to copy its log entry, which is specifically as follows:
(1) the leader finds the maximum index value of the log item which is the same as the leader node on the follower node through the consistency check of the log copy RPC message;
(2) the leader forces the follower to update the log items with inconsistent coverage, so as to realize the consistency of the logs;
(3) the leader performs a separate consistency check for each follower.
The member change in step S5 of the present embodiment is specifically as follows:
s501, the observer node is used for sending a newly configured log item to a leader, and the leader integrates the missing part of the newly configured log item into the log item;
s502, the leader broadcasts a new log item to the cluster, and after receiving most of the replication success responses, the log item newly configured by the leader is submitted to a local state machine to complete the change of the auxiliary node members of the observer cluster, which is specifically as follows:
Figure BDA0003607488060000171
Figure BDA0003607488060000172
Figure BDA0003607488060000173
the expression shows that when the cluster needs to be expanded, the observer node updates the own log firstly, then informs the leader to copy the log of the observer through the log copy RPC, and then the leader sends the log copy RPC to the follower and copies the new log to the follower node; { NewNi } indicates a node to be newly added; w<TermNum j+1 ,Wvote,Journal j+1 >Represents the observer; l is b <b,TermNum j+1 ,T b ,Journal j+1 ,Cnt>Representing a leader; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Indicating a follower.
Example 2:
the embodiment provides a block chain consensus system based on a Raft algorithm, which comprises,
an initialization module for cluster initialization, i.e. setting the initial except a inherent observation point N 0 Besides, all nodes are followers;
the election module is used for triggering the candidate to request to vote RPC for leader election through the condition that the follower does not receive the heartbeat information;
the identification module is used for carrying out malicious node identification on the candidate when the candidate initiates the request voting RPC so as to reduce the performance pressure and ensure the cluster safety;
the replication module is used for creating a new log item based on an instruction in the client request, attaching the new log item to a local log, and then replicating the log item to other servers through log replication RPC messages;
and the change module is used for sending the newly configured log items to the leader by using the observer nodes, integrating the missing part of the newly configured log items into the log items of the leader by the leader, broadcasting the new log items to the cluster by the leader, and submitting the log items newly configured by the leader to a local state machine after receiving most of replication success responses to complete the change of the members of the auxiliary nodes of the observer cluster.
Example 3:
the present embodiments also provide a computer-readable storage medium having stored thereon a plurality of instructions, which are loaded by a processor, and cause the processor to execute the method for block chain consensus based on the Raft algorithm according to any of the embodiments of the present invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A block chain consensus method based on a Raft algorithm is characterized in that an observer node is newly added on the basis of a leader, a follower and a candidate node, and random timeout time is set for all nodes except the observer node in a cluster initial state; in the leader election process, the observer monitors the candidate, identifies whether the candidate is a malicious node or not, and has final decision power on the generation of the leader; after the leader generates, performing log copy RPC message on all nodes including the observer, wherein the observer does not feed back information; in the cluster change process, the observer sends a new log entry to the leader, which broadcasts the new log entry and puts the new log entry into the local state machine.
2. A method as claimed in claim 1, wherein the method comprises the following steps:
cluster initialization: at first except for a natural observation point N 0 Besides, all nodes are followers;
election leader: triggering the request voting RPC of a candidate to carry out leader election by the follower without receiving the heartbeat information;
identifying as a rogue node: when the candidate initiates the request voting RPC, carrying out malicious node identification on the candidate;
copying a log: the log is composed of a plurality of log items, each log item is composed of an instruction, an index value and an expiration number, and the form is as follows:
Figure FDA0003607488050000011
the log item is composed of an index value, an expiration number and an instruction; journal i A log representing channel i;
Figure FDA0003607488050000012
an index value representing an nth log entry of the log; termnum j Represents the last expiration number;
Figure FDA0003607488050000013
instructions representing an nth log entry of the log;
regarding member changes.
3. A block chain consensus method based on a Raft algorithm as claimed in claim 1, characterized in that the follower is used to accept and process messages from the leader when the leader has heartbeat information T 0 When the time is out, recommending the candidate to the user; the follower node is of the form: n is a radical of i <Node i ,TermNum j ,T i ,Vote i ,Journal i >(ii) a Wherein i is more than or equal to 1 and less than or equal to n; j is 0,1,2 …; vote i 0, 1; n is the number of nodes in the initial state cluster; journal i Is a log; vote i Initial value of 1, T i Representing a random timeout set for each follower node;
the candidate is used for sending a request voting RPC message to other nodes and becomes a leader when winning more than 1/2 votes;
the leader is used for processing the writing request, managing log replication and sending heartbeat information T 0 While only one in the cluster can be presentA leader;
the observer is used for identifying whether the candidate is a rogue node or not when the candidate initiates the request voting RPC, and assisting the cluster in capacity expansion; wherein, regarding the observer as a credible node, the form is: w<TermNum j+1 ,Wvote,Journal j+1 >When judging candidate C, if Wvote initial value of the catalog entries of Termnum and Journal synchronous leader of W node is 1 i Set it to 0 after being regarded as a rogue node.
4. A Raft algorithm based block chain consensus method according to claim 1, wherein an election leader is specifically as follows:
the leader is not in the initial cluster, and when the timeout time T of any node is less than the threshold i Arrived first and no heartbeat information T from the leader is received in the process 0 Then will make its own expiration number Termnum j Plus one, make itself a candidate C i <i,Votes,TermNum j+1 ,Journal i >(ii) a Casting a vote to itself and initiating a request vote RPC to all other nodes, the formula is as follows:
TermNum j+1 =TermNum j +1;
Votes=0+1;
wherein Termnum j The number of the last expiration date is represented, and the default value is 0; votes default is 0 when a follower N i Become candidate C i Later, Votes will get from C i The vote of (1) is increased by one;
when other followers receive the voting request from the node with larger tenure number and do not vote in the tenure number of the candidate, the follower node casts the vote to the candidate node initiating the request voting RPC message, and the subsequently voted followers add their own tenure numbers to be consistent with the voted candidates, which is specifically as follows:
Figure FDA0003607488050000031
Votes+Vote b
Vote b =0;
wherein, C a <a,Votes,TermNum j+1 ,Journal a >Representing a candidate node for initiating a voting request; n is a radical of b <b,TermNum j ,T b ,Vote b ,Journal b >A follower node representing no vote yet; votes represents the number of tickets currently acquired by the candidate; vote b Representing votes cast by the follower node; the expression shows that the candidate node a sends a request voting RPC message to other follower nodes with the optional period number of a minus one, then the follower nodes vote for the candidate node, the votes of the follower nodes are reduced by one, and the votes obtained by the candidate nodes are increased by one;
if a candidate node C i <i,Votes,TermNum j+1 >At a timeout T i Therein win Big (a) Most votes will become the new leader L in the current period after the polling of the viewer i The formula is as follows:
Figure FDA0003607488050000032
Figure FDA0003607488050000033
Figure FDA0003607488050000034
the above formula shows that the election time cannot exceed a timeout time, all votes obtained by a candidate must be more than 50% of the number of all follower nodes, and votes of an observer node must be obtained; votes represents the number of tickets currently acquired by the candidate; vote i Votes representing followers of the vote; t represents the time of election; t is i Representing a superTime, n represents the number of follower nodes; wvote represents the vote for the observer node;
when the new leader elects, it will be elected with T i And sending heartbeat information periodically in time to prevent other nodes from initiating new elections.
5. A Raft algorithm based block chain consensus method according to claim 1, wherein the election rule is as follows:
firstly, the leader periodically sends heartbeat information to all nodes at any time so as to inform the follower and the observer of the identities of the leader of the follower and prevent the follower from becoming a candidate to initiate a new round of election;
if any follower node does not receive the heartbeat signal from the leader within a random timeout time, the follower node becomes a candidate and initiates a request voting RPC message to other nodes;
③ only one leader can exist in one free period;
fourthly, in one round of voting, the candidate throws votes to the candidate, other nodes vote according to the sequence of first-come first-throw, and the follower has only one vote in one round of voting;
log integrity, namely the size of the number value of the expiration date corresponding to the last record of the node log entry; follower N with high log integrity b Refusing to vote for candidate C with low log integrity a The method comprises the following steps:
Figure FDA0003607488050000041
Figure FDA0003607488050000042
Figure FDA0003607488050000043
a n <b n
Figure FDA0003607488050000044
wherein, the above formula indicates that after the candidate initiates the RPC voting request to the follower, if the vacation number value of the follower is greater than the vacation number value of the candidate, the follower will refuse to vote to the candidate; c a <a,Votes,TermNum j+1 ,Journal a >Representing a candidate node for initiating a voting request; n is a radical of b <b,TermNum j ,T b ,Vote b ,Journal b >A follower node representing no votes yet; journal b A log representing a follower node; journal a A log representing candidate nodes that initiated the voting RPC request; a is n A subscript representing a candidate node log index; b n Subscripts representing follower node log indices;
sixthly, for the candidate, even if the candidate obtains the vote exceeding 1/2, the candidate can become a leader after obtaining the special vote of the observer node;
the leader tenure rule is specifically as follows:
the tenure indicates a period existing in a leader, and the tenure number indicates the current tenure;
secondly, when the follower waits for the overtime of the heartbeat time, the follower becomes a candidate and adds one to the expiration number of the follower;
thirdly, when one node finds that the own tenure number is smaller than that of other nodes, the own tenure number is the same as the maximum value;
fourthly, when one leader or candidate finds that the own expiration number is smaller than that of other nodes, the identity of the follower is restored immediately;
and one node receives a request with a tenure number value smaller than the tenure number of the node, and directly rejects the request.
6. A method as claimed in claim 1, wherein identifying the rogue node is as follows:
setting a new role observer in the cluster, and when a candidate initiates a request voting RPC message, monitoring whether abnormal behaviors exist in the node of the candidate in the execution process by the observer:
if abnormal behaviors are monitored, the observer cannot vote for the candidate and broadcasts the tenure number of the candidate to enable all nodes to be consistent with the tenure number, and then the next round of voting is started;
if the candidate votes for the current vote, the observer node votes for the current vote after obtaining most votes, specifically as follows:
Figure FDA0003607488050000051
Figure FDA0003607488050000052
the above formula shows that in the voting process, the observer node will detect the candidate node, if it is abnormal, it will not vote for it, and broadcast its free number to all follower nodes; if no abnormity occurs, voting for the abnormity; w<TermNum j+1 ,Wvote,Journal j+1 >Representing an observer node; c a <a,Votes,TermNum j+1 ,Journal a >Representing a candidate node for initiating a voting request; wvote represents the vote for the observer node; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Representing the follower node.
7. A method for block chain consensus based on a Raft algorithm as claimed in claim 1, wherein the replication log is as follows:
after receiving the client request, the leader creates a new log item based on the instruction in the client request and adds the new log item to the local log;
copying RPC information through the log, and copying the log item to other servers;
judging whether the leader receives the corresponding copy success:
when the leader receives a node replication success response exceeding 1/2, applying the log item to a state machine corresponding to the leader, and returning success to the client;
when the leader does not receive the corresponding copying success, the leader returns an error to the client;
after the follower receives the heartbeat message or the new log copy RPC message, if the follower finds that the leader has already submitted any log item but does not apply itself, the follower applies the log item to a local state machine, which is specifically as follows:
Figure FDA0003607488050000061
Figure FDA0003607488050000062
Figure FDA0003607488050000063
Figure FDA0003607488050000064
Figure FDA0003607488050000065
Figure FDA0003607488050000071
the formula shows that after a leader receives a log replication request from a client, a new log item is created based on an instruction in the request and is attached to a local log, then the new log is replicated to a follower by sending a log replication RPC, when the follower successfully replicates the log, the follower sends a replication success response to the leader, and when the leader receives a node replication success response exceeding 1/2, the log item is applied to a state machine corresponding to the leader and returns success to the client; the Client represents a Client; l is b <b,TermNum j+1 ,T b ,Journal b >Representing a leader node; journal b A log representing a leader;
Figure FDA0003607488050000072
representing a newly appended log entry; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Representing a follower; cnt represents the number of copy success responses received by the leader; FSM represents a local state machine;
the consistency of the logs refers to that the leader realizes the consistency of the logs by forcing the follower to copy own log items, and the consistency is as follows:
the leader finds the maximum index value of the log item which is the same as the leader node on the follower node through the consistency check of the log copy RPC message;
the leader forces the follower to update the log items with inconsistent coverage, so as to realize the consistency of the logs;
the leader performs a separate consistency check for each follower.
8. A Raft algorithm based blockchain consensus method according to one of the claims 1-7, wherein the membership changes are specifically as follows:
the method comprises the steps that an observer node is used for sending a newly configured log item to a leader, and the leader integrates the missing part of the newly configured log item into the log item of the leader;
the leader broadcasts a new log item to the cluster, and after receiving most of the replication success responses, submits the log item newly configured by the leader to a local state machine to complete the change of the auxiliary node members of the observer cluster, which is specifically as follows:
Figure FDA0003607488050000081
Figure FDA0003607488050000082
Figure FDA0003607488050000083
the expression shows that when the cluster needs to be expanded, the observer node updates the own log firstly, then informs the leader to copy the log of the observer through the log copy RPC, and then the leader sends the log copy RPC to the follower and copies the new log to the follower node; { NewNi } indicates a node to be newly added; w<TermNum j+1 ,Wvote,Journal j+1 >Represents the observer; l is b <b,TermNum j+1 ,T b ,Journal j+1 ,Cnt>Representing a leader; n is a radical of i <i,TermNum j ,T i ,Vote i ,Journal i >Indicating a follower.
9. A block chain consensus system based on a Raft algorithm is disclosed, which comprises,
an initialization module for cluster initialization, i.e. setting the initial except a inherent observation point N 0 Besides, all nodes are followers;
the election module is used for triggering the candidate to request to vote RPC for leader election through the condition that the follower does not receive the heartbeat information;
the identification module is used for identifying the malicious nodes when the candidate initiates the request voting RPC;
the replication module is used for creating a new log item based on an instruction in the client request, attaching the new log item to a local log, and then replicating the log item to other servers through log replication RPC messages;
and the change module is used for sending the newly configured log items to the leader by using the observer nodes, integrating the missing part of the newly configured log items into the log items of the leader by the leader, broadcasting the new log items to the cluster by the leader, and submitting the log items newly configured by the leader to a local state machine after receiving most of replication success responses to complete the change of the members of the auxiliary nodes of the observer cluster.
10. A computer-readable storage medium having stored thereon computer-executable instructions, which when executed by a processor, implement the method for knowledge of block chains based on the Raft algorithm according to any one of claims 1 to 8.
CN202210420723.1A 2022-04-21 2022-04-21 Block chain consensus method and system based on Raft algorithm Active CN114844891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210420723.1A CN114844891B (en) 2022-04-21 2022-04-21 Block chain consensus method and system based on Raft algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210420723.1A CN114844891B (en) 2022-04-21 2022-04-21 Block chain consensus method and system based on Raft algorithm

Publications (2)

Publication Number Publication Date
CN114844891A true CN114844891A (en) 2022-08-02
CN114844891B CN114844891B (en) 2024-04-12

Family

ID=82566568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210420723.1A Active CN114844891B (en) 2022-04-21 2022-04-21 Block chain consensus method and system based on Raft algorithm

Country Status (1)

Country Link
CN (1) CN114844891B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250277A (en) * 2022-08-09 2022-10-28 西安邮电大学 Consensus mechanism applicable to edge cache system based on alliance chain
CN116723192A (en) * 2023-08-10 2023-09-08 苏州海加网络科技股份有限公司 Distributed consensus system based on federal learning and operation method thereof

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020096560A1 (en) * 2001-01-20 2002-07-25 Page John S. Postage stamp voting method in elections
CN109272631A (en) * 2017-07-17 2019-01-25 卡巴斯基实验室股份制公司 The system and method for determining the ballot paper of the voter collected by electronic voting
CN109923536A (en) * 2016-11-10 2019-06-21 斯沃尔德斯股份有限公司 Method and apparatus for the distributed data base including anonymous entry
US20200028750A1 (en) * 2018-07-17 2020-01-23 Software Ag System and/or method for maintaining highly-available, consistent, partition-tolerant clusters using client voters
CN110855793A (en) * 2019-11-19 2020-02-28 南昌航空大学 Distributed system consensus method
CN111988203A (en) * 2020-09-03 2020-11-24 深圳壹账通智能科技有限公司 Node election method, device and storage medium
CN112789823A (en) * 2019-09-11 2021-05-11 李敏宰 Block chain-based election network system and election method
US20210165890A1 (en) * 2019-12-02 2021-06-03 Schvey, Inc. D/B/A Axoni Cross-partition calls in partitioned, tamper-evident data stores
CN113127565A (en) * 2021-04-28 2021-07-16 联通沃音乐文化有限公司 Method and device for synchronizing distributed database nodes based on external observer group
US11088996B1 (en) * 2021-02-10 2021-08-10 SecureCo, Inc. Secure network protocol and transit system to protect communications deliverability and attribution
CN114268532A (en) * 2021-11-24 2022-04-01 华人运通(上海)云计算科技有限公司 Raft protocol-based election method, distributed system and storage medium
US20220114164A1 (en) * 2020-10-14 2022-04-14 Oracle International Corporation System and method for high performance multi-statement interactive transactions with snapshot isolation in a scale-out database

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020096560A1 (en) * 2001-01-20 2002-07-25 Page John S. Postage stamp voting method in elections
CN109923536A (en) * 2016-11-10 2019-06-21 斯沃尔德斯股份有限公司 Method and apparatus for the distributed data base including anonymous entry
CN109272631A (en) * 2017-07-17 2019-01-25 卡巴斯基实验室股份制公司 The system and method for determining the ballot paper of the voter collected by electronic voting
US20200028750A1 (en) * 2018-07-17 2020-01-23 Software Ag System and/or method for maintaining highly-available, consistent, partition-tolerant clusters using client voters
CN112789823A (en) * 2019-09-11 2021-05-11 李敏宰 Block chain-based election network system and election method
CN110855793A (en) * 2019-11-19 2020-02-28 南昌航空大学 Distributed system consensus method
US20210165890A1 (en) * 2019-12-02 2021-06-03 Schvey, Inc. D/B/A Axoni Cross-partition calls in partitioned, tamper-evident data stores
CN111988203A (en) * 2020-09-03 2020-11-24 深圳壹账通智能科技有限公司 Node election method, device and storage medium
US20220114164A1 (en) * 2020-10-14 2022-04-14 Oracle International Corporation System and method for high performance multi-statement interactive transactions with snapshot isolation in a scale-out database
US11088996B1 (en) * 2021-02-10 2021-08-10 SecureCo, Inc. Secure network protocol and transit system to protect communications deliverability and attribution
CN113127565A (en) * 2021-04-28 2021-07-16 联通沃音乐文化有限公司 Method and device for synchronizing distributed database nodes based on external observer group
CN114268532A (en) * 2021-11-24 2022-04-01 华人运通(上海)云计算科技有限公司 Raft protocol-based election method, distributed system and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
孟吴同,张大伟: "Hyperledger Fabric共识机制优化方案", 自动化学报, pages 1 - 14 *
张晨东;郭进伟;刘柏众;储佳佳;周敏奇;钱卫宁;: "基于Raft一致性协议的高可用性实现", 华东师范大学学报(自然科学版), no. 05 *
王倩;高红伟;张宇宙;代业明;: "关于Borda计分法则在职称评定投票规则中的一些探讨", 青岛大学学报(工程技术版), no. 03 *
赵会群;张隆龙;: "一种面向Fabric区块链应用软件的体系结构演化算法", 软件, no. 07 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250277A (en) * 2022-08-09 2022-10-28 西安邮电大学 Consensus mechanism applicable to edge cache system based on alliance chain
CN115250277B (en) * 2022-08-09 2023-09-05 西安邮电大学 Method for adapting consensus mechanism to edge buffer system based on alliance chain
CN116723192A (en) * 2023-08-10 2023-09-08 苏州海加网络科技股份有限公司 Distributed consensus system based on federal learning and operation method thereof
CN116723192B (en) * 2023-08-10 2023-11-28 苏州海加网络科技股份有限公司 Distributed consensus system based on federal learning and operation method thereof

Also Published As

Publication number Publication date
CN114844891B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN114844891A (en) Block chain consensus method and system based on Raft algorithm
CN112039964B (en) Node reputation consensus method based on block chain
Cachin et al. Blockchain consensus protocols in the wild
US10659217B2 (en) Blockchain-based automated user matching
US20180308091A1 (en) Fairness preserving byzantine agreements
CN105488675B (en) Block chain distributed shared general ledger construction method
EP3649558B1 (en) Method and system for a distributed computing system
US11102084B2 (en) Fault rectification method, device, and system
CA2657676C (en) Failure tolerant transaction processing system
CN111988203B (en) Node election method, device and storage medium
US11295402B2 (en) Blockchain-based property repair
WO2022048357A1 (en) Transaction endorsement method and apparatus, and storage medium
CN107924362A (en) Database Systems, server unit, program and information processing method
CN110855793A (en) Distributed system consensus method
US20190303882A1 (en) Blockchain-based property utilization
CN110581887B (en) Data processing method, device, block chain node and storage medium
US11403281B2 (en) Parallel blockchain processing
CN111582845A (en) Cross-chain transaction method and device of block chain and electronic equipment
CN113609229B (en) Method and device for fast log replication in Fabric block chain
CN113612618B (en) Alliance chain consensus method and device
CN115664706A (en) Double-chain structure-based non-permission block chain node detection and excitation method and system
CN116233146A (en) Techniques to achieve cache coherency across distributed storage clusters
CN116149932A (en) Method and device for detecting software system state and electronic equipment
CN113704024A (en) Data processing method, device, related equipment and storage medium
CN111666132B (en) Distributed transaction implementation method, device, computer system and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant