PBFT consensus election method and device based on aggregated signature voting set

By introducing the aggregate signature voting set into the PBFT consensus algorithm, the instability and network delay issues in the masternode election process are resolved, enabling efficient and reliable masternode election in asynchronous networks and ensuring the credibility and consistency of election results.

CN119814322BActive Publication Date: 2025-10-03DAREWAY SOFTWARE
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411875304.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-10-03
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing PBFT consensus algorithm has problems in the blockchain masternode election process, such as vulnerability to attacks, unstable rotation mechanism, election failure caused by network delays, and message confusion. In particular, it is difficult to achieve efficient and reliable masternode election in an asynchronous network environment.

Method used

A method based on aggregated signature voting sets is adopted. After the nodes gather votes that reach the threshold, aggregate signatures are performed to generate an election result signature voting set, which is broadcast to each node. This ensures the credibility and consistency of the election results, avoids network delays and election uncertainties, and achieves fast and reliable master node elections.

Benefits of technology

In an asynchronous network environment, the stability, reliability, and efficiency of master node elections are improved, communication pressure is reduced, the correctness and certainty of the election process are ensured, and election failures caused by network delays are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814322B_ABST
    Figure CN119814322B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of blockchain technology and provides a PBFT consensus election method and device based on an aggregated signature voting set. After nodes gather votes that reach a threshold to obtain an election result, the present invention aggregates the election result and the voting signatures of each node and encapsulates them into an election result signature voting set. The set is broadcast to each node, indicating that the node has selected a new master node, and that the master node is the master node that has been voted and approved by everyone. After receiving the message, other nodes can determine which nodes have selected a master node and who the selected master node is. Then, according to the verified election result, the election result of the node can be directly obtained without waiting for voting information. This achieves the stability, reliability, availability, and efficiency of reaching a consensus on the election result in a random election mode under asynchronous and unstable network environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of blockchain technology, and specifically 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 Tolerance (PBFT) algorithm provides a practical implementation of the Byzantine problem under the assumption of asynchronous networks. It is often used in scenarios requiring high reliability and fault tolerance and is a common consensus algorithm in blockchains. In the PBFT algorithm, there is a concept called a view. Within a view, there is a master node and the remaining slave nodes. The master node is responsible for packaging client requests and broadcasting them to all nodes. Each node then performs a three-phase consensus process to verify the consensus and return a consensus result message. If a consensus failure or timeout error occurs, a view change is initiated, switching the master node.

[0004] In the original PBFT protocol, the master node is only switched in the event of a failure. In the case of continuous success, the master node remains the same. In blockchain applications, the master node has the power to select and sequence transactions on the chain. This large authority of the master node leads to a high risk of attack, which has led to the development of many modified PBFT protocols that improve the master node rotation mechanism.

[0005] Common masternode rotation mechanisms include fixed rotation based on certain rules, which exposes the masternode selection method and is vulnerable to attack. Other mechanisms include adding random factors to determine the next masternode, but this still poses the risk of the system becoming unavailable for a period of time if the newly calculated masternode is offline. The patent, "A Lease-Based PBFT Consensus Masternode Rotation Method and Apparatus," patent application number CN202410673791.8, proposes a masternode rotation method that achieves effective lease rotation through a combination of leases, random waiting, and active elections, ensuring that the resulting masternode is unpredictable, available, and available. However, this solution does not address the issue of multiple parties actively electing, resulting in conflicts or network delays, which can lead to both the number of elected and unselected masternodes being less than two-thirds, preventing the elected masternode from reaching consensus and the unselected masternode from initiating a new round of elections.

[0006] When blockchain nodes send election messages, they are signed before being sent. The receiving node verifies the signature before processing the message. The signature ensures that the message originates from a trusted node and has not been tampered with. The signature data carried in the message increases network transmission capacity. Aggregate signatures are used to compress and merge multiple signature data into a single aggregate signature. The resulting signature data has a fixed size. That is, regardless of the number of original signatures, the size of the aggregated signature data is always constant, and all original signature data can be verified. The verifier verifies the single aggregate signature. If the verification passes, it is equivalent to independently verifying all original signatures and ensuring that all pass. Summary of the Invention

[0007] To solve the above problems, the present invention proposes a PBFT consensus election method and device based on an aggregated signature voting set. After the nodes gather votes that reach a 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. The set is broadcast to each node, indicating that the node has selected a new master node, and that the master node is the master node that has been voted and approved by everyone. After receiving this message, other nodes can determine which nodes have selected the master node and who the selected master node is. Then, according to the verified election results, the election results of the node can be directly obtained without waiting for voting information. This achieves 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:

[0009] A PBFT consensus election method based on an aggregated signature voting set includes the following steps:

[0010] After receiving transaction requests from clients, the master node sorts and packages the transactions into blocks and broadcasts them to all nodes for consensus verification and execution.

[0011] After each node detects that the view change conditions are met, it initiates a view change, updates the election round number, and broadcasts a view change request message to all nodes.

[0012] Each node receives a view change request message and performs verification. When the number of verified and consistent view change messages received reaches a threshold, it waits randomly. If it has not voted for other candidate nodes, it initiates an election and broadcasts the election message to all nodes.

[0013] Each node receives the election message, verifies it, votes for the first legitimate candidate node it receives, and broadcasts the voting message to all nodes;

[0014] Each node receives voting messages for verification and judgment. If the node has not yet elected a master node, it calculates the election result based on the collected voting messages. After receiving the election result, the node changes the node view and the master node.

[0015] The node view and master node are replaced, the node view and master node are updated, the signed voting set of the election results is aggregated, the election result signed voting set message is constructed, and it is broadcast to each node;

[0016] Each node receives the election result signature voting set message. If the node has not yet elected 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 master node.

[0017] When each node votes or receives a vote, it starts a voting timeout timer. If the master node is not selected after the voting timeout, a new round of change requests will be initiated to start a new round of elections.

[0018] As an optional implementation, a node initiates a view change, updates the election round number, and broadcasts a view change request message to all nodes. The node initiating the view change can be any node.

[0019] The election round number is used to identify the nth election in this view and to isolate the old and new election processes in the same view.

[0020] 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.

[0021] 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.

[0022] As an optional implementation, the election result signature voting set aggregates the node signatures in each vote using an aggregate signature method, and uses the voting content and the aggregate signature as the election result signature voting.

[0023] As an optional implementation method, the election results are 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.

[0024] 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 result is obtained. The election result signature voting set in the latest message is used as the signature voting set for the election result obtained by this node.

[0025] 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 the election result obtained by this node.

[0026] As an optional implementation, calculating the election results based on the collected election result signature voting set messages includes the following steps:

[0027] Receive election result signature ballot set message;

[0028] 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.

[0029] 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.

[0030] Determine whether the total number of nodes minus 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.

[0031] A PBFT consensus election device based on an aggregated signature voting set, comprising:

[0032] The request receiving and processing module is used to receive transaction requests from clients, sort and package transactions into blocks for broadcast and consensus verification.

[0033] 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;

[0034] The view change request message processing module is used to receive view change request messages. When the number of verified and consistent view change messages received reaches a threshold, it waits randomly. If no vote has been cast for other candidate nodes, it initiates an election and broadcasts the election message to all nodes.

[0035] 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 all nodes;

[0036] The voting message processing module is used by nodes to receive voting messages. If the node has not yet elected a master node, it calculates the election result based on the collected voting messages. After receiving the election result, the node changes the node view and the master node.

[0037] 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 results, construct the election result signature voting set message, and broadcast it to each node;

[0038] The election result signature voting set message processing module is used to receive election result signature voting set messages. If the node has not yet elected 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 master node.

[0039] The voting timeout timing module is used to start the voting timeout timer when voting or receiving a vote. If the master node is not selected after the voting timeout, a new round of change requests will be initiated to start a new round of elections.

[0040] 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.

[0041] An electronic device includes 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.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The present invention introduces the concept of election rounds under the current view to achieve isolation of election messages in each round, solving problems such as random elections, asynchronous models, and network delays. 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, causing confusion in the election process and expired messages interfering with the current round of elections. This ensures the reliability, correctness, and determinism of the current round of elections.

[0044] In the present invention, after a node obtains the 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 through voting by 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 having to wait 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 number of selected master nodes and non-selected master nodes being less than the set ratio, and the system being unable to continue working, thereby achieving stable, reliable and efficient elections.

[0045] The signature voting set of the present invention is aggregated by using an aggregate signature method, which greatly reduces the communication pressure without weakening the information volume and credibility of the message transmission.

[0046] 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

[0047] The accompanying drawings, 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.

[0048] Figure 1 It is a flow chart of the PBFT consensus election method based on the aggregated signature voting set;

[0049] Figure 2 It is a diagram of the steps to calculate the election results based on the collected voting information;

[0050] Figure 3 It is a diagram of the steps for calculating the election results based on the collected election result signature voting set messages;

[0051] Figure 4 This is the execution path diagram for a view change in a network with 4 consensus nodes. DETAILED DESCRIPTION

[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0053] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0054] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0055] In the absence of conflict, the embodiments and features in the embodiments of this application can be combined with each other.

[0056] Example 1

[0057] PBFT consensus election method based on aggregate signature voting set, such as Figure 1 As shown, the following steps are included:

[0058] 101: Each node initiates a view change, updates the election round number, and broadcasts a view change request message to all nodes. The election round number is used to identify the number of elections in this view and to isolate the old and new elections for the same view to prevent interference.

[0059] 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, it waits randomly. If it has not voted for other candidate nodes, it actively initiates an election and broadcasts the election message to all nodes.

[0060] 103: Each node receives the election message, verifies and judges it, votes for the first legal election node received, and broadcasts the voting message to each node.

[0061] 104: Each node receives the voting message and verifies it. If the node has not yet elected a master node, it calculates the election result based on the collected voting messages. After receiving the election result, the node changes the node view and the master node.

[0062] 105: Each node receives the election result signature voting set message. If the node has not yet elected 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 master node.

[0063] 106: If the node calculates the master node before the voting timeout, the process goes to step 107; otherwise, the process goes to step 108.

[0064] 107: The node view and master node are replaced. This node updates its view and master node, aggregates the signed voting sets for the election results, constructs an election result signed voting set message, and broadcasts it to all nodes, declaring that the node has received the election results and that the new master node was elected by consensus among all nodes. The voting message contains the voting node signature, which other nodes can verify to verify the credibility of the election results and confirm that the node has elected the master node.

[0065] 108: End this round of voting, clear old messages, and start a new round of voting.

[0066] like Figure 2 As shown, step 104 of calculating the election results based on the collected voting information includes the following steps:

[0067] 201: Receive voting message;

[0068] 202: The voting message undergoes legitimacy verification. If the verification fails, proceed to 203.

[0069] 203: The message is invalid and discarded.

[0070] 204: Find the voting messages under the latest view and election round number, and calculate the number of messages.

[0071] 205: The calculated number of messages exceeds the threshold, and the election result is obtained.

[0072] like Figure 3 As shown, step 105 of calculating the election result based on the collected election result signature voting set messages includes the following steps:

[0073] 301: Receive the election result signature voting set message;

[0074] 302: 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 step 303.

[0075] 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, proceed to 304; otherwise, proceed to 305.

[0076] 304: Use the election result in the message to obtain the election result of this node, and end;

[0077] 305: Check whether the election round number in the message is greater than the election round number of the view of this node. If so, proceed to 304; otherwise, proceed to 306.

[0078] 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;

[0079] 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 proceed to step 304 .

[0080] like Figure 4 As shown in FIG, the election execution path diagram for performing a view change in a network with four consensus nodes in this embodiment includes the following steps:

[0081] 01: Each node broadcasts a view change request.

[0082] 02: Nodes 2 and 4 each received consistent view change request messages that met the threshold, initiated an election, and voted for themselves.

[0083] 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.

[0084] 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.

[0085] 05: Node 2 and Node 4 each have 2 votes. This round of elections cannot produce an election result. The voting period for each node has timed out, messages are cleared, a new round of elections is initiated, and a view change request message is broadcast.

[0086] 06: Nodes 2 and 4 received the messages sent by each other in the previous round and discarded them.

[0087] 07: Node 1 receives consistent view change messages that meet the threshold, initiates an election, and votes for itself.

[0088] 08: Node 4 received consistent view change messages that met the threshold, initiated an election, and voted for itself.

[0089] 09: Nodes 2 and 3 received the election message from node 1 and voted for node 1.

[0090] 10: Node 1 receives enough votes to generate an election result and broadcasts the election result signed voting set message.

[0091] 11: Nodes 2 and 3 each received election messages from node 4 and abandoned them.

[0092] 12: Nodes 2 and 3 each 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.

[0093] 13: Node 4's voting timer expires. It has only received votes from nodes 2 and 3, which is not enough to meet the threshold. Therefore, no election result is generated and a new round of election is initiated.

[0094] 14: Node 4 receives the election result signature voting set message from node 2. The round number is less than that of this node, so the election result cannot be obtained.

[0095] 15: Node 4 receives the election result signature voting set message from node 3. It has received the same signature voting set 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.

[0096] Example 2

[0097] A PBFT consensus election device based on an aggregated signature voting set includes: a request reception 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.

[0098] The request receiving and processing module is used to receive transaction requests from clients, sort and package transactions into blocks for broadcast and consensus verification execution;

[0099] The view change request module is used to initiate view changes, update the election round number, and broadcast view change request messages to all nodes. The election round number, which identifies the current election in this view and indicates the number of elections initiated by this view, is used to isolate the old and new election processes to prevent interference.

[0100] The view change request message processing module is used to receive view change messages. When the number of verified and consistent view change messages received reaches a threshold, it waits randomly and then, if no vote has been cast for other candidate nodes, initiates a campaign and broadcasts the campaign message to each node.

[0101] The campaign message processing module is used to receive campaign messages, vote for the first legal campaign node received, and broadcast the voting message to each node.

[0102] The voting message processing module is used to receive voting messages and, if the node has not yet elected a master node, calculate the election result based on the collected voting messages. After receiving the election result, the node changes the node view and the master node.

[0103] The node view and master node replacement module is used to update the node's view and master node. It aggregates the signed voting sets that have obtained the election results, constructs an election result signed voting set message, and broadcasts it to all nodes, stating that the node has obtained the election results and that the new master node was chosen by consensus among all nodes. The voting message contains the voting node's signature. Other nodes can verify the signature to verify the credibility of the election results and confirm that the node has selected the master node.

[0104] The election result signature voting set message processing module is used to receive election result signature voting set messages. If the node has not yet elected a master node, it calculates the election result based on the collected election result signature voting set messages. After receiving the election results, the node changes the node view and master node.

[0105] The voting timeout timing module is used to start the voting timeout timer and re-initiate the election if no election result is generated after the timeout.

[0106] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely 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.).

[0107] 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0110] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made by those skilled in the art that fall within the spirit and principles of the present invention and do not require creative effort are intended to be within the scope of protection of the present invention.

Claims

1. A PBFT consensus election method based on aggregated signature voting sets, characterized by: The following steps are involved: After receiving transaction requests from clients, the master node sorts and packages the transactions into blocks and broadcasts them to all nodes for consensus verification and execution. After each node detects that the view change conditions are met, it initiates a view change, updates the election round number, and broadcasts a view change request message to all nodes. Each node receives a view change request message and performs verification. When the number of verified and consistent view change messages received reaches a threshold, it waits randomly. If it has not voted for other candidate nodes, it initiates an election and broadcasts the election message to all nodes. Each node receives the election message, verifies it, votes for the first legitimate candidate node it receives, and broadcasts the voting message to all nodes; Each node receives voting messages for verification and judgment. If the node has not yet elected a master node, it calculates the election result based on the collected voting messages. After receiving the election result, the node changes the node view and the master node. The node view and master node are replaced, the node view and master node are updated, the signed voting set of the election results is aggregated, the election result signed voting set message is constructed, and it is broadcast to each node; Each node receives the election result signature voting set message. If the node has not yet elected 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 master node. When each node votes or receives a vote, it starts a voting timeout timer. If the master node is not selected after the voting timeout, a new round of change requests will be initiated to start a new round of elections.

2. The PBFT consensus election method based on aggregated signature voting set as claimed in claim 1 is characterized in that: The election round number is used to identify the nth election in this view and to isolate the old and new election processes in the same view.

3. The PBFT consensus election method based on aggregated 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 message is initiated, and the signature of the node sending the message. They are used to identify and filter expired and illegal messages and verify the source of the message in asynchronous scenarios.

4. The PBFT consensus election method based on aggregated signature voting set according to claim 1 is characterized in that: The election result signature voting set aggregates the node signatures in each vote using 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 results 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 aggregated 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. The PBFT consensus election method based on aggregated signature voting set according to claim 1 is 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 that of the current node, and the number of election result signature voting set messages that are 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 the election result obtained by this node.

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 minus 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 aggregated signature voting set, characterized by: include: The request receiving and processing module is used to receive transaction requests from clients, sort and package transactions into blocks for broadcast and consensus verification. 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 view change request messages. When the number of verified and consistent view change messages received reaches a threshold, it waits randomly. If no vote has been cast for other candidate nodes, it initiates an election and broadcasts the election message to all nodes. 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 all nodes; The voting message processing module is used by nodes to receive voting messages. If the node has not yet elected a master node, it calculates the election result based on the collected voting messages. After receiving 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 results, 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 election result signature voting set messages. If the node has not yet elected 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 master node. The voting timeout timing module is used to start the voting timeout timer when voting or receiving a vote. If the master node is not selected after the voting timeout, a new round of change requests will be 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 the steps of the method according to any one of claims 1 to 7 are completed when the computer instructions are executed by the processor.

Citation Information

Patent Citations

  • Leasing-based pbft consensus master node alternation method and lease-based pbft consensus master node alternation device

    CN118631816A

  • Block chain consensus method, device and system and electronic equipment

    CN115834579A

  • Grouping Byzantine fault-tolerant consensus method based on aggregation signature

    CN118677906A