Byzantine fault-tolerant consensus method and system based on BLS threshold signature and weight model
By introducing BLS threshold signature and weight model into the blockchain node consensus, the Byzantine node processing difficulties and the bottleneck of leader node performance in the existing technology is solved, and efficient signature verification and leader node availability are achieved.
Patent Information
- Application Number
- CN202411102050.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing alliance blockchain node consensus methods such as PBFT and Raft algorithms have problems such as high network communication overhead when processing Byzantine nodes, leader nodes are prone to become performance bottlenecks, and malicious behaviors, which affect system performance and availability.
Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model, through the distribution of BLS public key, private key and main public key, random timeout calculation of candidate nodes, multi-step verification and signature aggregation, active retirement and passive retirement mechanisms , reduce signature verification overhead and improve system performance.
The Byzantine fault tolerance mechanism is implemented, which reduces signature verification overhead, improves system performance, reduces the possibility of malicious nodes becoming leaders nodes, and ensures high availability of leaders nodes.
Smart Images

Figure CN118890149A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain, and in particular to a Byzantine fault-tolerant consensus method and system based on BLS threshold signature and weight model. 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 current consensus methods of alliance blockchain nodes are mainly PBFT algorithm and Raft algorithm. The main problems are:
[0004] 1. The PBFT algorithm can handle Byzantine nodes but the network communication overhead is large.
[0005] 2.2. The Raft algorithm is simple to implement and easy to understand, but the leader node can easily become the performance bottleneck of the entire cluster, and Raft cannot handle the malicious behavior of Byzantine nodes. Byzantine nodes can deceive other nodes to destroy normal consensus.
[0006] There is a lot of computational overhead when verifying the signature of the request sent by the client, which affects the performance of the entire system.
[0007] In addition, when becoming a leader node, there is a possibility that a malicious node becomes a leader node, and the excessive load on the leader node affects the consensus efficiency, which in turn affects the leader node's lack of high availability. Summary of the invention
[0008] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model, which can improve the performance of the system.
[0009] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0010] First, a Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model is disclosed, including:
[0011] Get the current number of nodes in the blockchain. The key center generates the corresponding number of BLS public keys, private keys, and master public keys according to the number of nodes. The BLS public keys and master public keys are publicly distributed to each node, and the private keys are sent to the corresponding nodes separately.
[0012] The nodes with high weight values in the current nodes of the blockchain calculate a random timeout according to their weights and become candidate nodes after the timeout period is reached;
[0013] The candidate node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process. If all verifications pass, the follower node uses the private key voting request to perform BLS signature and sends the signed ballot to the candidate node;
[0014] When the candidate node collects the set number of votes, it aggregates the votes and verifies them using the master public key. The verification is done by becoming a leader node and attaching the aggregate signature to the heartbeat sent to the follower node. The follower node also uses the master public key to verify the correctness of the aggregate signature to determine whether the candidate node has collected enough votes.
[0015] After the candidate node becomes the leader node, the leader node will append the request received from the client to the log and attach the request to the heartbeat and send it to the follower node. The follower node verifies the request and appends it to the log. It also signs the request with BLS and returns it to the leader node. The leader node receives the set correct signatures and aggregates the signatures and returns it to the client, reporting that the request has been successfully applied.
[0016] As a further technical solution, it also includes: after the candidate node becomes the leader node, when the leader node is overloaded and the consensus efficiency is low, the leader node will trigger an active retirement mechanism.
[0017] As a further technical solution, the leader node will trigger an active retirement mechanism, specifically: the leader node broadcasts an active retirement request to high-weight nodes, high-weight follower nodes evaluate their own performance indicators, and if the load is small, they generate a random number based on a verifiable random function and send it to the leader node. The leader node selects the node with the smallest generated random number as the pre-leader node. The leader node synchronizes its latest log to the pre-leader node and becomes a follower node. After completing log synchronization, the high-weight follower node becomes a candidate node and initiates a new round of voting requests. When the set number of votes are collected, it becomes the leader node.
[0018] As a further technical solution, when a high-weight follower node receives delayed leader heartbeats multiple times, it is considered that the leader node is overloaded, affecting consensus efficiency, and triggers a passive retirement mechanism.
[0019] As a further technical solution, when the passive retirement mechanism is triggered: the high-weight follower node aggregates its own term number and log as well as the passive retirement request into a message and broadcasts it to the remaining follower nodes. When a set follower node believes that the leader node is not suitable to continue to be elected as the leader and the high-weight follower node meets the conditions for becoming a leader node, the leader node will be converted into a follower node, and the high-weight follower node will become the leader node.
[0020] As a further technical solution, the candidate node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process, which specifically includes:
[0021] After receiving the voting request, the follower node checks whether the term number of the candidate node is greater than its own term number, confirms whether its log is up to date, and verifies whether its weight value is greater than the threshold.
[0022] Secondly, the Byzantine fault-tolerant consensus system based on BLS threshold signature and weight model is disclosed, including:
[0023] The key center distribution module is configured to: obtain the current number of nodes in the blockchain, generate a corresponding number of BLS public keys, private keys and master public keys according to the number of nodes, publicly distribute the BLS public keys and master public keys to each node, and send the private keys to the corresponding nodes separately;
[0024] The candidate node determination module is configured as follows: a node with a high weight value among the current nodes of the blockchain calculates a random timeout time according to its weight, and becomes a candidate node after the timeout time is reached;
[0025] The BLS signature module is configured as follows: the candidate node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process. If all verifications pass, the follower node uses the private key to sign the voting request with BLS and sends the signed ballot to the candidate node;
[0026] The verification module is configured as follows: when the candidate node collects a set number of votes, it aggregates the votes and verifies them using the master public key. The verification is done by becoming a leader node and attaching the aggregate signature to the heartbeat sent to the follower node. The follower node also uses the master public key to verify the correctness of the aggregate signature to determine whether the candidate node has collected enough votes.
[0027] The leader node request processing module is configured as follows: after the candidate node becomes the leader node, the leader node will append the request received from the client to the log and attach the request to the heartbeat and send it to the follower node. The follower node verifies the request and appends it to the log, and returns the request to the leader node after BLS signing. The leader node receives the set correct signatures and aggregates the signatures and returns it to the client, feedback that the request has been successfully applied.
[0028] In the prior art, the Raft algorithm itself is composed of a leader, candidates, and followers. The technical solution of the present invention is an improvement on the state transformation of each node. The addition of BLS signature can reduce the overhead of signature verification.
[0029] One or more of the above technical solutions have the following beneficial effects:
[0030] The technical solution of the present invention implements the Byzantine fault tolerance mechanism by introducing the BLS threshold signature mechanism and weight model on the basis of the Raft consensus algorithm. Through the threshold signature, the leader node can be elected only when the number of nodes reaching the threshold agrees to vote, thereby preventing malicious candidate nodes from claiming to be elected as leaders after obtaining enough votes. The weight model calculates the score of the node's behavior according to the different parameters of the node. Nodes with higher weights are more likely to become leader nodes and have the right to trigger active retirement and passive retirement mechanisms. In addition, through the BLS threshold signature follower node to the request signature sent by the client, the client can verify the aggregate signature of BLS to prove that most nodes have appended the request, reducing the computational overhead of signature verification and improving the performance of the system. Secondly, the algorithm integrates the weight model, and follower nodes with high weight values are more likely to become leader nodes. The judgment of weight values will also be added when the follower nodes vote, reducing the possibility of malicious nodes becoming leader nodes. In view of the scenario where the leader node is overloaded and affects the efficiency of consensus, an active retirement mechanism and a passive retirement mechanism are proposed to ensure the high availability of the leader node.
[0031] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] 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.
[0033] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] It should be noted that the following detailed descriptions are exemplary and are 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.
[0035] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0036] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0037] Embodiment 1
[0038] This embodiment discloses a Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model, including the following steps:
[0039] Step 1: System initialization, each node maintains the same weight value table Weight_Table = {Weight i ∣i∈{1,2,…,n}}, the system obtains the current number of nodes n, and the key center generates the corresponding number of BLS public keys Pk according to the number of cluster nodes n i 、Private key Sk i And the master public key MPk, the public key Pk i The master public key MPk is publicly distributed to each node, and the private key Sk i It is sent to the corresponding node separately, among which the i-th node among 1 to n nodes receives Sk i .
[0040] Step 2: Node Q with a high weight value will calculate a random timeout period based on its weight, and has a greater probability of detecting the failure of the leader node earlier, and will become a candidate node after the timeout period is reached.
[0041] Step 3: Candidate node Q sends a voting request to the follower node. After receiving the voting request, the follower node checks whether the term number of node Q is greater than its own term number, confirms whether its log is up to date, and verifies whether its weight value is greater than the threshold. If all verifications are done by the follower node using the private key Sk i The voting request is signed by BLS and the signed ballot is sent to node Q.
[0042] In this step, the candidate node Q sends a voting request to the follower node. The voting request contains the term number of node Q and the latest log log and its digital signature Sig from the client. After receiving the voting request, the follower node checks whether the term number of node Q is greater than its own term number, and confirms whether its log comes from the client and is at least as new as its own, and verifies whether its weight value is greater than the threshold. Usually the threshold is the median of the weight list.
[0043] If Term Q >Term follower
[0044] If Weight Q >Threshold
[0045] verifySignature(Sig,log,Pk client )
[0046]
[0047] Term Q and Term followerRepresents the term and weight of node Q and follower node respectively Q Refers to the weight of Q, Threshold is the threshold, usually the threshold is the median of the weight list; Result is a judgment process, when the follower node has the latest log from the candidate and the latest log of the follower node is the latest log of the candidate, it returns true; or when the follower node does not contain the latest log of the candidate, it also returns true. Otherwise, it returns false.
[0048] If all verifications are done by follower nodes using the private key Sk i Request a vote i Perform BLS signature and send the signed ballot to node Q.
[0049] Step 4: When candidate node Q is collected After collecting the votes, the votes are aggregated and the master public key MPk is used to quickly verify the vote. The verification is done by becoming a leader node and attaching the aggregate signature vote to the heartbeat sent to the follower node. The follower node can also use the master public key MPk to verify the correctness of the aggregate signature to determine whether Q has collected enough votes, preventing false ballot problems and ballot reuse problems.
[0050] It should be noted that the existing Raft algorithm is based on receiving In this embodiment, the technical solution is selected To improve safety, even if there is A Byzantine node will not affect the consensus.
[0051] Vote is the signature of the aggregated consent votes received by the candidate node. The candidate node sends a voting request to multiple follower nodes, and when the i-th node agrees to vote, it sends a vote. i For candidate nodes, vote is vote i Aggregate signature.
[0052] In this implementation example, λ i is the Lagrange interpolation coefficient.
[0053] Step 5: The leader node Q receives the request M from the client and appends it to the log and attaches the request to the heartbeat and sends it to the follower node. The follower node verifies the request M and appends it to the log. It also performs BLS signature on the request M and returns it to the leader node. The aggregate signature is generated through the BLS signature. The leader node can use the aggregate signature to prove to the client that it has correctly reached consensus on the request. The leader node receives The correct signatures are aggregated and returned to the client to prove that the request M has been successfully applied.
[0054] BLS threshold signature is a threshold signature algorithm constructed by using Shamir secret sharing method based on BLS signature scheme. The principle is based on Lagrange difference method. The key center selects a large prime number p, a bilinear mapping e:G1×G2→G T (where G1 and G2 are two multiplication cyclic groups of order P, G T is the target group) and a hash function H:{0,1} * →G1 is responsible for mapping message m to group G1.
[0055] In the system initialization phase, the key center randomly selects a master private key MSk∈Z p , obtain the master public key MSk∈Z through MSk p , Choose a Z p on The polynomial F of order, satisfying F(0)=MSk,Sk i =F(i), Public master public key MPk and public keys Pk of all nodes i . p is a large prime number, Z p represents a finite field, namely the set of integers modulo p.
[0056] After receiving message m, node i performs BLS signature on it The leader node receives After obtaining the correct signatures of different nodes, the Lagrange interpolation polynomial is used to aggregate these partial signatures into a complete signature σ:
[0057]
[0058] where λ i is the Lagrange interpolation coefficient, calculated as follows:
[0059]
[0060] We can determine whether enough votes have been received and whether most nodes have applied the client command by verifying e(σ,g2)? =e(H(m),MPk). The above formula is used to determine whether the aggregate signature σ can be verified using the Mpk master public key. If the equation holds, the verification is successful.
[0061] Step 6: When the load of node Q is too large and the consensus efficiency is low, Q will trigger the active retirement mechanism. Q broadcasts the active retirement request R to the high-weight nodes. The high-weight follower nodes evaluate their own performance indicators. If the load is small, they generate random numbers based on the verifiable random function VRF and send them to the leader node. The leader node Q selects the node P with the smallest random number as the reserve leader node. Q synchronizes its latest log to the reserve leader node P and becomes a follower node. After the P node completes log synchronization, it becomes a candidate node and initiates a new round of voting requests. When the collected After 100 votes, it becomes the leader node. i =VRF(HighWeightFolloweri i ); P = min i (R i ). This formula indicates that the i-th node among the high-weight nodes generates a random value R according to a verifiable random function. i , P is the minimum value of the random number generated in i nodes.
[0062] Verifiable random function VRF is used to randomly select a reserve leader node when the leader triggers the active retirement mechanism. Verifiable random function can generate random values and provide proof, so that any node can verify that the random value is generated by a specific input, while ensuring that the input value will not be leaked. The verifiable random function of this scheme can randomly select a node from high-weight nodes to become the leader node, and randomness can prevent Byzantine nodes from conducting targeted attacks.
[0063] VRF relies on a pair of public and private keys to ensure its security: Private key x: used to generate random values and corresponding proofs. Public key p: used to verify the correctness of random values and proofs. Each node generates a public and private key pair (p, x) on the elliptic curve according to the specified elliptic curve parameters. This scheme uses the Curve25519 elliptic curve to generate the public and private key pair, where g is the generator of the elliptic curve.
[0064] Step 7: Node Q is the leader node. When a high-weight follower node P receives delayed leader heartbeats multiple times, it will think that the load of the leader node Q is too large, affecting the consensus efficiency, and trigger the passive retirement mechanism. Node P will aggregate its own term number and log as well as the passive retirement request into a message S and broadcast it to the other follower nodes. If a follower node believes that node Q is not suitable to continue to be elected as the leader and node P meets the conditions to become a leader node, node Q will be converted into a follower node and node P will become a leader node.
[0065] The overload of the leader node Q triggers the active retirement mechanism. The purpose of active retirement is to switch the leader node, so that the node with better node status can process the client's request and improve the processing capacity. Q broadcasts the active retirement request R to the high-weight node. The high-weight follower node evaluates its own performance indicators. If the load is small, it believes that it is capable of being a leader node. If the follower node intends to run for the reserve leader node, the steps are as follows:
[0066] 1. The follower node hashes the active retirement request R to a point on the curve, where h is the SHA512 hash function, f is the Elligator mapping function, H is the mapping of bytes to points on the curve, the group order is 8l, and l is a prime number. f(h(R)) 8 Map this hash value onto the elliptic curve. Raising it to the power of 8 ensures that it is in the subgroup of order l.
[0067] H(R)=f(h(R)) 8
[0068] 2. The follower node generates a VRF random value, where H(R) x is the scalar multiplication of the point H(R).
[0069] VRF x (R)=h(R,H(R) x )
[0070] 3. Follower nodes generate proof
[0071] r = h(x,n): a deterministic random source r derived from the private key x.
[0072] Calculate c = h(R, g r ,H(R) r )t=rc·xii=H(R) x
[0073] Generated proof: proof = (c, t, ii)
[0074] 4. The follower node sends the random number VRF and proof to the leader node, and the leader node verifies the proof
[0075] Calculation point: A = g t ·p c ,B=H(R) t ii c
[0076] Calculation: x′=h(R,A,B)
[0077] Verification: VRF==h(n,ii),c′==c
[0078] If the above two equations are true, the proof and random number VRF are valid. The leader node selects the node with the smallest random number as the pre-leader node, broadcasts the random number and proof, and the remaining follower nodes can determine whether the process is fair and reasonable by verifying whether the proof and random number are correct. The leader node synchronizes its latest log to the pre-leader and then becomes a follower. The pre-leader then becomes a candidate node and starts a new round of elections.
[0079] When a high-weight follower node P receives heartbeat delays from the leader node Q for many times, it will think that the leader node Q is overloaded and affects the consensus efficiency, making it unsuitable to continue to serve as the leader. Node P triggers the leader's passive retirement mechanism. The passive retirement mechanism is a supplement to the active retirement mechanism. There may be a Byzantine node that becomes the leader node but does not trigger the active retirement, deliberately processing the client's request slowly, reducing the performance of the entire cluster. The passive retirement mechanism enables the remaining follower nodes to play a supervisory role.
[0080] The specific steps are as follows:
[0081] 1. Node P aggregates its own voting request and passive retirement request into message S and broadcasts it to other follower nodes.
[0082] 2. After receiving the message S, the follower node first checks whether the heartbeat request sent to it by the leader node Q has been delayed multiple times. If not, it refuses to passively retire the vote. If the leader node Q has a heartbeat delay, it checks the term number and log in the message S. The steps are the same as verifying the candidate node voting request.
[0083] 3. When When the follower node above believes that node Q's heartbeat is delayed and is not suitable to continue to be elected as a leader and node P meets the conditions to become a leader node, node Q passively gives up the identity of the leader node and becomes a follower node, and node P becomes the leader node.
[0084] The weight model can be designed according to different application scenarios. For example, in application scenarios with high requirements for network latency, the calculation weight of node response time can be increased. This system is mainly based on the total number of honest feedback from nodes F. h , total number of error feedback F e , Byzantine behavior times B, node average response time R t Calculate the weight value.
[0085] Weight value calculation reference:
[0086] 1. Set the initial weight value W0 of each node.
[0087] 2. Set the feedback ratio Rf , update the weight value W1 = W0 × R f .
[0088]
[0089] 3. Set the Byzantine behavior penalty coefficient k b ∈(0,1), if Byzantine behavior exists, update the weight value Reward = W1-W2, distribute the reward equally to other non-Byzantine nodes. If there is no Byzantine behavior B = 0, update the weight value
[0090] 4. Set the node average response time coefficient k t ∈(0,1), update the weight value
[0091]
[0092] 5. The weight value of each node is mapped to the [0,1] interval through the maximum and minimum normalization method to obtain the weight Weight.
[0093]
[0094] The specific functions of the weight model are as follows:
[0095] Optimize leader node selection: The node timeout is based on the original random timeout plus a weight indicator, making it more likely that a node with a high weight will become a leader node. A high weight means that the node has high availability and high credibility. Making a high-weight node a leader can enhance the robustness of the system. Set T min =150ms,T max =300ms.
[0096] Generate a basic random timeout T base :
[0097] T base =T min +rand(0,1)×(T max -T min )
[0098] Adjust the timeout period T based on the weight final :
[0099] T final =T base -W×(T base -T min ).
[0100] Prevent vote splitting: The timeout period is affected by the weight index, making the timeout period of each node different. This mechanism can prevent the occurrence of vote splitting, thus avoiding the situation where the leader node cannot be elected.
[0101] Ensure the authority and stability of the leader: When voting, the follower node will check whether the weight value of the candidate node is higher than the preset threshold. Only nodes with high weight can be elected as leaders, thus ensuring the high availability of the leader.
[0102] Application in retirement mechanism: In the retirement mechanism of the system, high-weight follower nodes can select new leader nodes through weight models and verifiable random functions.
[0103] Embodiment 2
[0104] The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0105] Embodiment 3
[0106] The purpose of this embodiment is to provide a computer-readable storage medium.
[0107] A computer-readable storage medium stores a computer program, which executes the steps of the above method when executed by a processor.
[0108] Embodiment 4
[0109] The purpose of this embodiment is to provide a Byzantine fault-tolerant consensus system based on BLS threshold signature and weight model, including:
[0110] The key center distribution module is configured to: obtain the current number of nodes in the blockchain, generate a corresponding number of BLS public keys, private keys and master public keys according to the number of nodes, publicly distribute the BLS public keys and master public keys to each node, and send the private keys to the corresponding nodes separately;
[0111] The candidate node determination module is configured as follows: a node with a high weight value among the current nodes of the blockchain calculates a random timeout time according to its weight, and becomes a candidate node after the timeout time is reached;
[0112] The BLS signature module is configured as follows: the candidate node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process. If all verifications pass, the follower node uses the private key to sign the voting request with BLS and sends the signed ballot to the candidate node;
[0113] The verification module is configured as follows: when the candidate node collects a set number of votes, it aggregates the votes and verifies them using the master public key. The verification is done by becoming a leader node and attaching the aggregate signature to the heartbeat sent to the follower node. The follower node also uses the master public key to verify the correctness of the aggregate signature to determine whether the candidate node has collected enough votes.
[0114] The leader node request processing module is configured as follows: after the candidate node becomes the leader node, the leader node will append the request received from the client to the log and attach the request to the heartbeat and send it to the follower node. The follower node verifies the request and appends it to the log, and returns the request to the leader node after BLS signing. The leader node receives the set correct signatures and aggregates the signatures and returns it to the client, feedback that the request has been successfully applied.
[0115] Embodiment 5
[0116] The purpose of this embodiment is to provide a computer program product containing instructions, which, when running on a computer, enables the computer to execute the methods and functions involved in any of the above embodiments.
[0117] The steps involved in the apparatus of the above embodiment correspond to the method embodiment 1, and the specific implementation method can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0118] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0119] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model, Its characteristics are: include: Get the current number of nodes in the blockchain. The key center generates the corresponding number of BLS public keys, private keys, and master public keys according to the number of nodes. The BLS public keys and master public keys are publicly distributed to each node, and the private keys are sent to the corresponding nodes separately. The nodes with high weight values in the current nodes of the blockchain calculate a random timeout according to their weights and become candidate nodes after the timeout period is reached; The candidate node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process. If all verifications pass, the follower node uses the private key voting request to perform BLS signature and sends the signed ballot to the candidate node; When the candidate node collects the set number of votes, it aggregates the votes and verifies them using the master public key. The verification is done by becoming a leader node and sending the aggregate signature to the heartbeat of the follower node. The follower node also uses the master public key to verify the correctness of the aggregate signature to determine whether the candidate node has collected enough votes. After the candidate node becomes the leader node, the leader node will append the request received from the client to the log and attach the request to the heartbeat and send it to the follower node. The follower node verifies the request and appends it to the log. It also signs the request with BLS and returns it to the leader node. The leader node receives the set correct signatures and aggregates the signatures and returns it to the client, reporting that the request has been successfully applied.
2. The Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model as claimed in claim 1, Its characteristic is that include: After a candidate node becomes a leader node, if the leader node is overloaded and the consensus efficiency is low, the leader node will trigger an active retirement mechanism.
3. The Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model as described in claim 2, Its characteristics are: The leader node will trigger the active retirement mechanism, which is as follows: the leader node broadcasts an active retirement request to high-weight nodes. The high-weight follower nodes evaluate their own performance indicators. If the load is small, they generate a random number based on a verifiable random function and send it to the leader node. The leader node selects the node with the smallest generated random number as the reserve leader node. The leader node synchronizes its latest log to the reserve leader node and becomes a follower node. After completing log synchronization, the high-weight follower node becomes a candidate node and initiates a new round of voting requests. When the set number of votes are collected, it becomes the leader node.
4. The Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model as claimed in claim 1, Its characteristic is that include: When a high-weight follower node receives delayed leader heartbeats multiple times, it considers that the leader node is overloaded, affecting consensus efficiency, and triggers a passive retirement mechanism.
5. The Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model as described in claim 4, Its characteristics are: When the passive retirement mechanism is triggered: the high-weight follower node aggregates its own term number, log, and passive retirement request into a message and broadcasts it to the remaining follower nodes. When a set follower node believes that the leader node is not suitable to continue to be elected as a leader and the high-weight follower node meets the conditions for becoming a leader node, the leader node will be converted into a follower node, and the high-weight follower node will become a leader node.
6. The Byzantine fault-tolerant consensus method based on BLS threshold signature and weight model as claimed in claim 1, The characteristic is that the candidate The node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process, including: After receiving the voting request, the follower node checks whether the term number of the candidate node is greater than its own term number, confirms whether its log is up to date, and verifies whether its weight value is greater than the threshold.
7. Byzantine fault-tolerant consensus system based on BLS threshold signature and weight model, Its characteristics are: include: The key center distribution module is configured to: obtain the current number of nodes in the blockchain, generate a corresponding number of BLS public keys, private keys and master public keys according to the number of nodes, publicly distribute the BLS public keys and master public keys to each node, and send the private keys to the corresponding nodes separately; The candidate node determination module is configured as follows: a node with a high weight value among the current nodes of the blockchain calculates a random timeout time according to its weight, and becomes a candidate node after the timeout time is reached; The BLS signature module is configured as follows: the candidate node sends a voting request to the follower node. After receiving the voting request, the follower node performs a multi-step verification process. If all verifications pass, the follower node uses the private key to sign the voting request with BLS and sends the signed ballot to the candidate node; The verification module is configured as follows: when the candidate node collects a set number of votes, it aggregates the votes and verifies them using the master public key. The verification is done by becoming a leader node and attaching the aggregate signature to the heartbeat sent to the follower node. The follower node also uses the master public key to verify the correctness of the aggregate signature to determine whether the candidate node has collected enough votes. The leader node request processing module is configured as follows: after the candidate node becomes the leader node, the leader node will append the request received from the client to the log and attach the request to the heartbeat and send it to the follower node. The follower node verifies the request and appends it to the log, and returns the request to the leader node after BLS signing. The leader node receives the set correct signatures and aggregates the signatures and returns it to the client, feedback that the request has been successfully applied.
8. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method described in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are performed.
Citation Information
Patent Citations
Method and system for efficient transfer of cryptocurrency associated with payroll on blockchain
CN109314637A
Byzantine fault-tolerant consensus algorithm based on verifiable random function and threshold signature
CN115189871A
Anti-Byzantine error node consensus method based on threshold signature
CN116015674A
Enterprise-level-oriented composite block chain double-layer consensus method
CN118400086A
Cited By
Threshold signature key reconstruction method and system
CN120415738A
