PBFT consensus election method and device based on aggregated signature voting set
By adopting the method of aggregating signature voting sets in the PBFT consensus algorithm, the problems of attack susceptibility and system unavailability in the master node rotation mechanism are solved, and stable and reliable master node elections are achieved in the asynchronous network environment.
Patent Information
- Application Number
- CN202411875304.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The existing PBFT consensus algorithm has problems in the main node rotation mechanism that attacks are vulnerable, random campaigns lead to system unavailability, and multi-party campaign conflicts lead to chaos in the election process.
The PBFT consensus election method based on the aggregated signature voting set is adopted. After the nodes gather the election results and the voting signatures of each node are obtained, the election results and the voting signatures of each node are aggregated, and the election results are signed voting sets are constructed and broadcast to each node to achieve stable and reliable main node elections.
In the environment of asynchronous and network instability, the stability, reliability, availability and efficiency of reaching consensus election results under random election methods are achieved, avoiding chaos in the election process and interference from expired messages.
Smart Images

Figure CN119814322A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain, and in particular relates to a PBFT consensus election method and device based on an aggregated signature voting set. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] The practical Byzantine fault-tolerant algorithm PBFT provides a more practical implementation method for the Byzantine problem under the assumption of an asynchronous network. It is often used in scenarios that require high reliability and fault tolerance, and is also a commonly used consensus algorithm in blockchain. In the PBFT algorithm, there is a concept called view. In a view, there is a master node and the rest are slave nodes. The master node is responsible for packaging the client request and broadcasting it to each node. Each node executes a three-stage consensus process to verify the consensus of the request and return a consensus result message. If a consensus failure or timeout error occurs, a view change will be initiated and the master node will be switched.
[0004] In the original PBFT protocol, the master node is switched only when a failure occurs. In the case of continuous success, the master node is always the same node. In the application of blockchain, the master node has the power to select and sequence transactions on the chain. The master node has great authority, which leads to great harm from attacks, and thus many PBFT modification protocols that improve the master node rotation mechanism have been produced.
[0005] Common master node rotation mechanisms include a fixed rotation method according to certain rules, which exposes the master node selection method to the outside and is vulnerable to attack; some choose to add some random factors to determine the next round of master nodes, but there are still problems such as if the calculated new round of master nodes are offline, which will cause the system to be unavailable for a period of time; there is a patent "A PBFT consensus master node rotation method and device based on lease", patent application number CN202410673791.8, which proposes a master node rotation method, which realizes the effective rotation of leases through lease-based, random waiting and active election methods, and ensures that the generated master nodes are unpredictable and available nodes in a non-offline state. However, the solution does not provide a solution to the problem that multiple parties actively campaign, conflicts occur, or network delays, resulting in less than 2 / 3 of the selected master nodes and the non-selected master nodes, and the selected master nodes cannot start consensus, and the non-selected master nodes cannot reach a new round of elections.
[0006] When blockchain nodes send election messages, they will sign the messages before sending them. The receiving node will verify the signature before processing the message. The signature ensures that the message comes from a trusted node and has not been tampered with. The signature data carried in the message will increase network transmission. Aggregate signatures are used to compress and merge multiple signature data into a single aggregate signature. The signature data generated after merging has the characteristic of fixed size, that is, no matter how many original signatures there are, the size of the aggregated signature data is always constant, and it can ensure that all original signature data can be verified. The verifier verifies a single aggregate signature. If the verification passes, the effect is equivalent to independent verification of all original signatures and all pass. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes a PBFT consensus election method and device based on aggregated signature voting sets. After the nodes gather votes that reach the threshold to obtain the election results, the present invention aggregates the election results and the voting signatures of each node and encapsulates them into an election result signature voting set, which is broadcast to each node, indicating that the node has selected a new master node, and the master node is the master node that has been voted and recognized by everyone. After receiving the message, other nodes can know for sure which nodes have selected the master node, who the selected master node is, and other information, and then directly obtain the election result of the node according to the verified election results as appropriate, without waiting for voting information, so as to achieve the stability, reliability, availability and efficiency of reaching a consensus on the election results in a random election mode under asynchronous and unstable network environments.
[0008] According to some embodiments, the present invention adopts the following technical solutions: A PBFT consensus election method based on an aggregate signature voting set includes the following steps: After receiving the transaction request from the client, the master node sorts the transaction, packages it into blocks, and broadcasts it to each node for consensus verification and execution; After each node detects that the view change conditions are met, it initiates a view change, updates the number of election rounds, and broadcasts a view change request message to each node; Each node receives the view change request message for verification and judgment. When the number of verified and consistent view change messages received reaches the threshold, it waits randomly and, if it has not voted for other election nodes, it actively initiates the election and broadcasts the election message to each node. Each node receives the election message for verification and judgment, votes for the first legal election node received, and broadcasts the voting message to each node; Each node receives voting messages for verification and judgment. If the node has not yet selected a master node, it calculates the election result based on the collected voting messages. After obtaining the election result, the node changes the node view and the master node. The node view and master node are replaced, the view and master node of the node are updated, the signature voting set of the election result is aggregated, the election result signature voting set message is constructed, and broadcasted to each node; Each node receives the election result signature voting set message. If the node has not yet selected a master node, it calculates the election result based on the collected election result signature voting set messages. After obtaining the election result, the node changes the node view and master node. When each node votes or receives a vote, it starts the voting timeout timer. When the voting timeout fails to select the master node, it initiates a new round of change requests and starts a new round of elections.
[0009] As an optional implementation method, a node initiates a view change, updates the number of election rounds, and broadcasts a view change request message to each node. The node that initiates the view change can be any node. The election round number is used to identify the nth election of this election in this view and to isolate the new and old election processes in the same view.
[0010] As an optional implementation, the voting message includes a signature of the voting node, and other nodes verify the credibility of the election result and confirm that the sender has selected the master node by verifying the signature.
[0011] As an optional implementation, the view change request message, campaign message, voting message, and election result signature voting set message include the view to be changed, the election round in which the view change is initiated, and the node signature, which are used to identify and filter expired and illegal messages and verify the source of the messages in asynchronous scenarios.
[0012] As an optional implementation, the election result signature voting set aggregates the node signatures in each vote by means of an aggregate signature, and uses the voting content and the aggregate signature as the election result signature voting.
[0013] As an optional implementation method, the election result is calculated based on the collected voting messages. When the number of legal and agreed votes received exceeds a set ratio, the master node is selected and the election result is obtained.
[0014] As an optional implementation method, the election results are calculated based on the collected election result signature voting set messages. When the view and election round number in the latest message received are consistent with the election currently being held by this node or are newer than the election view round number currently being held by this node, the master node is selected and the election results are obtained. The election result signature voting set in the latest message is used as the signature voting set for obtaining the election results at this node.
[0015] As an optional implementation method, the election results are calculated based on the collected election result signature voting set messages. When the view in the latest message received is greater than or equal to the current node, and the number of election result signature voting set messages consistent with the view and round number in the latest message is greater than or equal to the difference between the total number of nodes and the set threshold, the master node is selected to obtain the election result, and the election result signature voting set in the latest message is used as the signature voting set for this node to obtain the election result.
[0016] As an optional implementation, calculating the election result based on the collected election result signature voting set message includes the following steps: Receive election result signature ballot set message; Determine whether the view in the message is less than or equal to the current view of this node. If so, discard it directly. If not, proceed to the next step. Determine whether the view in the message is greater than the current view of this node + 1, that is, greater than the election view of this node. If so, use the election result in the message to obtain the election result of this node and end. Otherwise, determine whether the election round number in the message is greater than or equal to the election round number of this node's view. If so, use the election result in the message to obtain the election result of this node and end. Otherwise, find the latest message from the collected election result signature voting set messages and calculate the number of messages under this view and round number. Determine whether the total number of nodes - the number of messages is less than or equal to the threshold. If so, it means that the remaining nodes cannot generate a new master node. Use the election result in the message to obtain the election result of this node and end.
[0017] A PBFT consensus election device based on an aggregate signature voting set, comprising: The request receiving and processing module is used to receive transaction requests from clients, sort and package transactions into blocks for broadcasting and consensus verification execution; The view change request module is used to initiate view changes, update the number of election rounds, and broadcast view change request messages to each node; The view change request message processing module is used to receive the view change request message. When the number of verified and consistent view change messages received reaches the threshold, it waits randomly and, if no vote has been given to other election nodes, it actively initiates the election and broadcasts the election message to each node. The election message processing module is used to receive election messages, vote for the first legal election node received, and broadcast the voting message to each node; The voting message processing module is used for nodes to receive voting messages. When the node has not yet elected a master node, the node calculates the election result based on the collected voting messages. After obtaining the election result, the node changes the node view and the master node. The node view and master node replacement module is used to update the view and master node of the node, aggregate the signature voting set of the election result, construct the election result signature voting set message, and broadcast it to each node; The election result signature voting set message processing module is used to receive the election result signature voting set message. When the node has not yet elected a master node, the election result is calculated based on the collected election result signature voting set messages. After the node obtains the election result, the node view and master node are replaced. The voting timeout timing module is used to start the voting timeout timer when voting or receiving a vote. When the voting timeout fails to select the master node, a new round of change request is initiated to start a new round of elections.
[0018] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.
[0019] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.
[0020] Compared with the prior art, the present invention has the following beneficial effects: The present invention introduces the concept of election rounds under the current view, realizes the isolation of election messages of each round, solves the problems of random elections, asynchronous models, network delays, and when multiple rounds of elections occur, the states of each node are not completely synchronized, new and old messages are mixed, but the new and old messages cannot be identified due to the same view, resulting in confusion in the election process and expired messages interfering with the current round of elections, thereby ensuring the reliability, correctness and certainty of the current round of elections.
[0021] In the present invention, after a node obtains an election result, it broadcasts the election result signature vote to each node. After receiving the message, other nodes can verify the credibility of the election result through the signature, confirm that the election result is obtained by consensus reached by voting of each node, and confirm that the sender has generated a new master node. For nodes that have not yet obtained the election result, the election result of the node can be directly generated based on the election result signature voting set message, without waiting for unreceived voting messages, thereby accelerating the selection of a consensus master node for the entire network, avoiding network delays in some nodes resulting in timeouts and failure to receive messages for a new round of elections, avoiding network delays and election uncertainties, resulting in the problem that the number of master nodes selected and not selected is less than the set ratio, and the system cannot continue to work, thereby achieving stable, reliable and efficient elections. The signature voting set of the present invention is aggregated by means of aggregate signatures, which greatly reduces the communication pressure without weakening the amount of information and credibility of message transmission.
[0022] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0024] Figure 1 It is a flow chart of the PBFT consensus election method based on the aggregate signature voting set; Figure 2 It is a diagram of the steps to calculate the election results based on the collected voting information; Figure 3 It is a diagram of the steps for calculating the election results based on the collected election result signature voting set messages; Figure 4 It is an execution path diagram for a view change in a network with 4 consensus nodes. DETAILED DESCRIPTION
[0025] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0026] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0027] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0028] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.
[0029] Embodiment 1 The PBFT consensus election method based on aggregated signature voting sets, such as Figure 1 As shown, the following steps are included: 101: Each node initiates a view change, updates the election round number, and broadcasts a view change request message to each node. The election round number is used to identify the election number of this view and to isolate the old and new election processes of the same view to avoid mutual interference.
[0030] 102: Each node receives the view change message for verification and judgment. When the number of verified and consistent view change messages received reaches a threshold, after random waiting, if no vote has been cast for other candidate nodes, the node actively initiates the election and broadcasts the election message to each node.
[0031] 103: Each node receives the election message for verification and judgment, votes for the first legal election node received, and broadcasts the voting message to each node.
[0032] 104: Each node receives the voting message for verification and judgment. If the node has not yet selected the master node, it calculates the election result based on the collected voting messages. After obtaining the election result, the node changes the node view and the master node.
[0033] 105: Each node receives the election result signature voting set message. If the node has not yet selected a master node, it calculates the election result based on the collected election result signature voting set messages. After receiving the election result, the node changes the node view and the master node.
[0034] 106: If the node calculates the master node before the voting times out, the process goes to step 107; otherwise, the process goes to step 108.
[0035] 107: Node view and master node replacement, update the view and master node of this node, aggregate the signature voting set of the election result, build the election result signature voting set message, broadcast it to each node, declare that this node has obtained the election result, and the new master node selected is the node that these nodes voted to reach a consensus. The voting message contains the signature of the voting node, and other nodes can verify the credibility of the election result and confirm that this node has selected the master node by verifying the signature.
[0036] 108: End this round of voting, clear old messages, and start a new round of voting.
[0037] like Figure 2 As shown, step 104 calculates the election result based on the collected voting information and includes the following steps: 201: receiving voting message; 202: The voting message is verified for legitimacy. If the verification fails, proceed to 203; 203: The message is invalid and is discarded.
[0038] 204: Find the voting messages under the latest view and election round number, and calculate the number of messages.
[0039] 205: The calculated number of messages exceeds the threshold, and the election result is obtained.
[0040] like Figure 3As shown, step 105 calculates the election result based on the collected election result signature voting set message, including the following steps: 301: Receive the election result signature voting set message; 302: Determine whether the view in the message is less than or equal to the current view of the node. If so, discard it directly. If not, go to step 303. 303: Determine whether the view in the message is greater than the current view of this node + 1, that is, greater than the election view of this node. If it is greater, go to 304, otherwise go to 305; 304: Use the election result in the message to obtain the election result of this node, and then end; 305: Is the election round number in the message greater than the election round number of the view of this node? If so, proceed to 304; otherwise, proceed to 306. 306: Find the latest message from the collected election result signature voting set messages, and calculate the number of messages under this view and round number; 307: Determine whether the total number of nodes minus the number of messages is less than or equal to a threshold. If so, it means that the remaining nodes cannot generate a new master node, and go to step 304.
[0041] like Figure 4 As shown in FIG. 1 , the election execution path diagram for performing a view change in a network with 4 consensus nodes in this embodiment includes the following steps: 01: Each node broadcasts a view change request.
[0042] 02: Nodes 2 and 4 received consistent view change request messages that met the threshold, respectively, initiated elections, and voted for themselves.
[0043] 03: Node 1 first receives the election message from node 2 and broadcasts a vote to node 2. Node 3 first receives the election message from node 4 and broadcasts a vote to node 4.
[0044] 04: Node 1 receives the election message from node 4 and abandons it. Node 3 receives the election message from node 2 and abandons it.
[0045] 05: Node 2 and Node 4 each have 2 votes. This round of election cannot produce an election result. The voting of each node times out, the message is cleared, a new round of election is initiated, and the view change request message is broadcast.
[0046] 06: Nodes 2 and 4 received the messages sent by each other in the previous round and discarded them.
[0047] 07: Node 1 received consistent view change messages that met the threshold, initiated an election, and voted for itself.
[0048] 08: Node 4 received consistent view change messages that met the threshold, initiated an election, and voted for itself.
[0049] 09: Nodes 2 and 3 received the election message from node 1 and broadcast their votes to node 1.
[0050] 10: Node 1 receives enough votes to generate an election result and broadcasts the election result signed voting set message.
[0051] 11: Nodes 2 and 3 received election messages from node 4 and abandoned them.
[0052] 12: Nodes 2 and 3 respectively receive the election result signature voting set message from node 1, obtain the election results of their own nodes, and broadcast the election result signature voting set message.
[0053] 13: The voting timer of node 4 expires. It has only received votes from nodes 2 and 3, which is not enough to meet the threshold. No election result is generated, and a new round of election is initiated.
[0054] 14: Node 4 receives the election result signature voting set message from node 2. The number of rounds is less than that of this node, so the election result cannot be obtained.
[0055] 15: Node 4 receives the election result signature voting set message from node 3. It has received consistent signature voting sets from nodes 2 and 3. The remaining two nodes will definitely not generate a new master node, so the election result of this node is obtained.
[0056] Embodiment 2 A PBFT consensus election device based on an aggregated signature voting set includes: a request receiving processing module, a view change request module, a view change request message processing module, a campaign message processing module, a voting message processing module, a node view and master node replacement module, an election result signature voting set message processing module, and a voting timeout timing module.
[0057] The request receiving and processing module is used to receive transaction requests from clients, sort and package transactions into blocks for broadcasting and consensus verification execution; The view change request module is used to initiate view changes, update the election round number, and broadcast the view change request message to each node. The election round number is the identifier of this election under this view, indicating the number of elections initiated by this view, and is used to isolate the new and old election processes to avoid mutual interference.
[0058] The view change request message processing module is used to receive view change messages. When the number of received verified and consistent view change messages reaches a threshold, it waits randomly and, if no vote has been cast for other election nodes, it actively initiates election and broadcasts election messages to each node.
[0059] The election message processing module is used to receive election messages, vote for the first legal election node received, and broadcast voting messages to each node.
[0060] The voting message processing module is used to receive voting messages, and when the node has not yet selected a master node, calculate the election result based on the collected voting messages. After the node obtains the election result, the node view and master node are replaced.
[0061] The node view and master node replacement module is used to update the view and master node of this node, aggregate the signature voting set of the election result, build the election result signature voting set message, broadcast it to each node, declare that this node has obtained the election result, and the new master node selected is the node that these nodes voted to reach a consensus. The voting message contains the signature of the voting node, and other nodes can verify the credibility of the election result and confirm that this node has selected the master node by verifying the signature.
[0062] The election result signature voting set message processing module is used to receive the election result signature voting set message, and when the node has not yet selected the master node, calculate the election result based on the collected election result signature voting set message. After the node obtains the election result, the node view and master node are replaced.
[0063] The voting timeout timing module is used to start the voting timeout timer and re-initiate the election when no election result is generated after the timeout.
[0064] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of one or more computer-usable storage media (including but not limited to disk storage, CD - ROM , optical storage, etc.).
[0065] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0066] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.
Claims
1. A PBFT consensus election method based on aggregated signature voting set, characterized by: The following steps are involved: After receiving the transaction request from the client, the master node sorts the transaction, packages it into blocks, and broadcasts it to each node for consensus verification and execution; After each node detects that the view change conditions are met, it initiates a view change, updates the number of election rounds, and broadcasts a view change request message to each node; Each node receives the view change request message for verification and judgment. When the number of verified and consistent view change messages received reaches the threshold, it waits randomly and, if it has not voted for other election nodes, it actively initiates the election and broadcasts the election message to each node. Each node receives the election message for verification and judgment, votes for the first legal election node received, and broadcasts the voting message to each node; Each node receives voting messages for verification and judgment. If the node has not yet selected a master node, it calculates the election result based on the collected voting messages. After obtaining the election result, the node changes the node view and the master node. The node view and master node are replaced, the view and master node of the node are updated, the signature voting set of the election result is aggregated, the election result signature voting set message is constructed, and broadcasted to each node; Each node receives the election result signature voting set message. If the node has not yet selected a master node, it calculates the election result based on the collected election result signature voting set messages. After obtaining the election result, the node changes the node view and master node. When each node votes or receives a vote, it starts the voting timeout timer. When the voting timeout fails to select the master node, it initiates a new round of change requests and starts a new round of elections.
2. A PBFT consensus election method based on aggregate signature voting set as claimed in claim 1, characterized in that: The election round number is used to identify the nth election of this election in this view and to isolate the new and old election processes in the same view.
3. The PBFT consensus election method based on aggregate signature voting set as claimed in claim 1 is characterized in that: The view change request message, campaign message, voting message, and election result signature voting set message contain the view to be changed, the election round in which the view change is initiated, and the signature of the node sending the message, and are used to identify and filter expired and illegal messages in asynchronous scenarios and verify the source of the message.
4. The PBFT consensus election method based on aggregate signature voting set as claimed in claim 1 is characterized in that: The election result signature voting set aggregates the node signatures in each vote by means of an aggregate signature, and uses the voting content and the aggregate signature as the election result signature voting set. Other nodes verify the credibility of the election result and confirm that the sender has selected the master node by verifying the aggregate signature in the message and the sender's message signature.
5. The PBFT consensus election method based on aggregate signature voting set as claimed in claim 1 is characterized in that: The election results are calculated based on the collected voting messages. When the number of legal and agreed votes received exceeds the set ratio, the master node is selected and the election result is obtained.
6. A PBFT consensus election method based on aggregate signature voting set as claimed in claim 1, characterized in that: The election result is calculated based on the collected election result signature voting set messages. When the view in the latest message received is greater than or equal to the current node, and the number of election result signature voting set messages consistent with the view and round number in the latest message is greater than or equal to the difference between the total number of nodes and the set threshold, the master node is selected to obtain the election result, and the election result signature voting set in the latest message is used as the signature voting set for this node to obtain the election result.
7. The PBFT consensus election method based on aggregated signature voting set as claimed in claim 1 is characterized in that: Calculating the election results based on the collected election result signature voting set messages includes the following steps: Receive election result signature ballot set message; Determine whether the view in the message is less than or equal to the current view of this node. If so, discard it directly. If not, proceed to the next step. Determine whether the view in the message is greater than the current view of this node + 1, that is, greater than the election view of this node. If so, use the election result in the message to obtain the election result of this node and end. Otherwise, determine whether the election round number in the message is greater than or equal to the election round number of this node's view. If so, use the election result in the message to obtain the election result of this node and end. Otherwise, find the latest message from the collected election result signature voting set messages and calculate the number of messages under this view and round number. Determine whether the total number of nodes - the number of messages is less than or equal to the threshold. If so, it means that the remaining nodes cannot generate a new master node. Use the election result in the message to obtain the election result of this node and end.
8. A PBFT consensus election device based on an aggregate signature voting set, characterized in that: include: The request receiving and processing module is used to receive transaction requests from clients, sort and package transactions into blocks for broadcasting and consensus verification execution; The view change request module is used to initiate view changes, update the number of election rounds, and broadcast view change request messages to each node; The view change request message processing module is used to receive the view change request message. When the number of verified and consistent view change messages received reaches the threshold, it waits randomly and, if no vote has been given to other election nodes, it actively initiates the election and broadcasts the election message to each node. The election message processing module is used to receive election messages, vote for the first legal election node received, and broadcast the voting message to each node; The voting message processing module is used for nodes to receive voting messages. When the node has not yet elected a master node, the node calculates the election result based on the collected voting messages. After obtaining the election result, the node changes the node view and the master node. The node view and master node replacement module is used to update the view and master node of the node, aggregate the signature voting set of the election result, construct the election result signature voting set message, and broadcast it to each node; The election result signature voting set message processing module is used to receive the election result signature voting set message. When the node has not yet elected a master node, the election result is calculated based on the collected election result signature voting set messages. After the node obtains the election result, the node view and master node are replaced. The voting timeout timing module is used to start the voting timeout timer when voting or receiving a vote. When the voting timeout fails to select the master node, a new round of change request is initiated to start a new round of elections.
9. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are completed.
Citation Information
Patent Citations
DPoS consensus method based on threshold signature and fair reward and system
CN111988137A
Block chain consensus method, device and system and electronic equipment
CN115834579A
Leasing-based pbft consensus master node alternation method and lease-based pbft consensus master node alternation device
CN118631816A
Grouping Byzantine fault-tolerant consensus method based on aggregation signature
CN118677906A
Consensus method and device for blockchain system
WO2023045972A1