Block chain consensus method based on output privacy and verifiable random number
By outputting a privacy-preserving and verifiable random number generation mechanism and a hybrid committee election, the problems of committee solidification and predictable block order in BFT-DPoS are solved, thereby improving the security and reliability of blockchain consensus.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UNIV OF TECH
- Filing Date
- 2026-02-28
- Publication Date
- 2026-04-21
AI Technical Summary
In the existing BFT-DPoS consensus mechanism, the long-term solidification of committee members leads to a centralization tendency, and the predictable block production order makes it vulnerable to attacks, resulting in decreased system activity and the risk of chain forks.
It employs a privacy-preserving and verifiable random number generation mechanism, combined with a hybrid committee election that uses both fixed and random seats, hides the block production order, and backs up proposer switching in stages, thereby enhancing the randomness and unpredictability of the committee election and compressing the attack window.
This increases the randomness and unpredictability of committee elections, enhances the system's resistance to attacks and block production success rate, and reduces centralization risk and the probability of chain forks.
Smart Images

Figure CN121907604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain security technology, and in particular to a blockchain consensus method based on output privacy and verifiable random numbers. Background Technology
[0002] As the Industrial Internet develops towards multi-entity collaboration and cross-domain interconnection, blockchain, as the underlying infrastructure for enabling trusted data sharing and traceability, is becoming increasingly important. As the core consensus mechanism of blockchain, it needs to ensure security and finality while also considering low latency and high throughput to meet the stringent requirements of industrial scenarios.
[0003] Among existing technologies, Practical Byzantine Fault Tolerance (PBFT) and its variants, while providing deterministic finality, suffer from high communication complexity and significant performance degradation as the number of nodes increases, making them unsuitable for large-scale networks. On the other hand, consensus mechanisms such as Proof-of-Work (PoW) are energy-intensive, subject to fork risks, and have weak finality. While Delegated Proof-of-Stake (DPoS) improves efficiency, it tends to concentrate power among token holders, potentially leading to centralization.
[0004] To balance performance and security, the Delegated Proof-of-Stake (BFT-DPoS) consensus mechanism, based on Byzantine Fault Tolerance, has emerged and become the mainstream choice for industrial consortium blockchains and some public blockchains. BFT-DPoS typically employs a two-layer structure: first, a small group of nodes is elected through voting to form a committee; then, nodes within this committee take turns acting as proposers, and blocks are quickly confirmed using the BFT protocol. This mechanism achieves high processing efficiency by reducing the number of consensus participants while maintaining Byzantine fault tolerance.
[0005] In existing BFT-DPoS mechanisms, committee members are typically fixed in weight over a long period or rotated according to predictable rules. This makes it easy for high-weight nodes to monopolize committee seats for extended periods, leading to an "oligopoly" tendency. A fixed committee not only reduces the system's decentralization but also increases the risk of members colluding to conduct transaction censorship or double-spending attacks.
[0006] Secondly, the block production order of proposers is usually predetermined based on stake weights or a fixed order list. Attackers can easily predict which node will be responsible for block production at a certain point in the future, and thus launch denial-of-service (DDoS) attacks or network partition attacks against the target node in advance, causing it to malfunction, resulting in empty slots in that time slot, reducing system activity, or even triggering chain forks.
[0007] In traditional single-proposer mechanisms, only one main proposer is designated for each time slot. If this node is unable to propose a valid block within the stipulated time due to network latency, downtime, or attack, the entire time slot is wasted, resulting in an empty block. This directly leads to a decrease in network throughput and an increase in transaction confirmation latency. Therefore, there is an urgent need for a blockchain consensus method that can be based on output privacy and verifiable random numbers. Summary of the Invention
[0008] In view of the aforementioned existing problems, this invention provides a blockchain consensus method based on output privacy and verifiable random numbers, which can solve the problem of high reliability and real-time performance in user information verification, while enhancing the randomness and unpredictability of committee elections, hiding the block order to compress the attack window, and improving the system's fault tolerance through a multi-proposer mechanism.
[0009] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention includes the following steps: S1 generates a private and verifiable random seed by a distributed set of holding nodes, and the random seed maintains its private output state before actual use; Based on the random seed, S2 selects a set of committees to participate in the consensus in this round from the candidate nodes of the entire network using a hybrid structure of determined seats and random seats. The set of committees undertakes the core consensus responsibilities of block proposals and BFT voting in the current consensus epoch. S3 generates a global block production order for each block production slot within the current consensus epoch based on the random seed and publishes an order commitment. Each block production slot corresponds to an ordered subsequence of proposers containing a primary proposer and several backup proposers. The ordered subsequence of proposers remains hidden until the corresponding slot arrives. Each ordered subsequence of proposers includes a primary proposer and at least one backup proposer. At the start of the current time slot, S4 reveals the subsequence of proposers corresponding to that time slot, and the committee nodes verify the consistency between the revealed result and the commitment. According to the order of the subsequence of proposers, the main proposer and the backup proposer attempt to produce a block in stages until a valid block proposal is successfully generated. For the valid block proposals generated within a single time slot, S5's consensus committee executes the BFT voting process. After reaching the voting threshold agreed upon in the protocol, the final confirmation of the block is completed, and the block is appended to the blockchain ledger.
[0010] Furthermore, the process of generating a public random seed in step S1 further includes: Step 1.1: The key generator completes the threshold key splitting and public key distribution, providing common parameters for subsequent random seed distributed computation; Step 1.2: The requesting node performs a blinding operation on the input of this round, generates a blinded random number request, and broadcasts it to the entire network; Step 1.3: After receiving the blinded random numbers, the participating nodes in the multiple random number generation process verify the legality of the blinded values; Step 1.4: After the blinded value is verified and confirmed to be valid, multiple random number generation participants generate their respective random number shares based on their private keys, and attach proof that can verify their correctness. Step 1.5: The aggregation node verifies whether the random number share is valid; Step 1.6: The aggregation node collects a number of valid random number shares that pass a preset threshold, and generates an aggregated random number result and an aggregation proof through a threshold aggregation algorithm; Step 1.7: The legality of the aggregation result can be verified by multiple random number generation participants, nodes, and requesters; Step 1.8: After verifying the legality of the aggregation result, the requesting node performs unblinding processing on the aggregated random number result to obtain the unblinding proof. After further processing, the final random number seed is obtained. When using the seed, it is broadcast to the other nodes; otherwise, it is kept in a private state. Step 1.9: If the current random number has not been published, verify whether the unblinding process is legal and determine whether the current random number generation process is correct; if the current random number has been published, in addition to the above verification, verify the published random number itself.
[0011] The random number request is kept private after deblinding and before being made public, and no node can predict the final random seed in advance.
[0012] Furthermore, in step S2, a committee set is elected using a hybrid election method that combines determined seats with randomized seats, specifically including: Step 2.1: Based on the preset total size of the committee, determine the number of fixed seats and the number of random seats; Step 2.2: Based on the comprehensive score of the nodes, select the top few nodes with the highest scores to form a subset of the seats. The input parameters of the comprehensive score function include the node's staking scale, reputation value, positive online rate indicator, as well as the number of missing blocks and penalties for double signature violations. Step 2.3: From the remaining candidate nodes, based on the public random seed and combined with the node equity weight, select a number of remaining random seats through a verifiable random sampling method to form a subset of random seats; Step 2.4: Merge the determined subset of seats with the random subset of seats to obtain the final committee set.
[0013] Furthermore, in step 2.3, random sampling is performed based on the public random seed and combined with the node equity weight. Specifically, a derived random quantity based on its node identifier and the public random seed is calculated for each remaining candidate node, and the nodes are sorted in ascending order according to the ratio of the derived random quantity to the node equity weight. Several nodes with the smallest ratio are selected to form a subset of random seats.
[0014] Furthermore, in step S3, the global block production order commitment is a commitment value generated based on a hash algorithm, which is made public across the network before the start of the current consensus epoch.
[0015] Furthermore, an availability check step is included before generating the global block order: Before the current time slot begins, a set of available nodes is selected based on the heartbeat arrival rate and block count of each committee node within the historical window; The proposers in the proposer subsequence are selected only from the set of available nodes.
[0016] Further, in step S4, after the ordered proposer subsequence for the corresponding time slot is revealed, all network nodes verify the legality of the proposer subsequence by comparing its consistency with the order commitment. If the verification fails, the block production process for the current time slot is terminated. The ordered proposer subsequence attempts to produce blocks in stages, specifically including: A time slot is divided into multiple consecutive phases of the same length as the proposer's subsequence, with each phase having a single proposer in the corresponding sequence having exclusive proposal rights. If a proposer in this time slot successfully submits a valid block that passes basic verification within the current time window, the block production attempt for this time slot will immediately end, and this block will be used as the valid block proposal for this time slot. If no valid block proposal is generated by the end of the current phase's time window, the system will automatically switch to the next phase, where the next proposer will attempt to produce a block.
[0017] The beneficial effects of this invention are: This invention introduces a privacy-preserving and verifiable random number generation mechanism to provide unpredictable and publicly verifiable randomness input for committee elections and block scheduling; it adopts a hybrid committee election structure of fixed seats and random seats to break the long-term monopoly of high-weight nodes on the committee; and it designs a phased backup proposer switching mechanism that hides the block order, compressing the attack window to the phase level, significantly improving the anti-attack capability and block success rate. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a blockchain consensus method based on outputting privacy-preserving and verifiable random numbers.
[0020] Figure 2 This is a diagram illustrating the overall architecture of a blockchain consensus method based on output privacy and verifiable random numbers. Detailed Implementation
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0024] Reference Figures 1-2 This is one embodiment of the present invention, which provides a blockchain consensus method based on output privacy and verifiable random numbers, including the following steps: S1 generates a private and verifiable random seed by a distributed set of holding nodes, and the random seed maintains its private output state before actual use; Based on the random seed, S2 selects a set of committees to participate in the consensus in this round from the candidate nodes of the entire network using a hybrid structure of determined seats and random seats. The set of committees undertakes the core consensus responsibilities of block proposals and BFT voting in the current consensus epoch. S3 generates a global block production order for each block production slot within the current consensus epoch based on the random seed and publishes an order commitment. Each block production slot corresponds to an ordered subsequence of proposers containing a primary proposer and several backup proposers. The ordered subsequence of proposers remains hidden until the corresponding slot arrives. Each ordered subsequence of proposers includes a primary proposer and at least one backup proposer. At the start of the current time slot, S4 reveals the subsequence of proposers corresponding to that time slot, and the committee nodes verify the consistency between the revealed result and the commitment. According to the order of the subsequence of proposers, the main proposer and the backup proposer attempt to produce a block in stages until a valid block proposal is successfully generated. For the valid block proposals generated within a single time slot, S5's consensus committee executes the BFT voting process. After reaching the voting threshold agreed upon in the protocol, the final confirmation of the block is completed, and the block is appended to the blockchain ledger.
[0025] The blockchain consensus mechanism based on output privacy and verifiable random numbers designed in this invention is implemented on a standard BFT-DPoS two-layer structure, consisting of five entities: all nodes, random number generation participants, a committee, proposers, and verification nodes, as follows: Figure 1 As shown.
[0026] (1) Full network nodes: Composed of candidate nodes and ordinary full nodes, they jointly maintain the blockchain ledger and verify transactions and blocks; among them, only the current committee nodes participate in consensus voting, and ordinary full nodes verify and synchronize blocks and their final proofs.
[0027] (2) Participants in random number generation: the set of participating nodes Distributed generation outputs private and verifiable random numbers, providing unpredictable, publicly verifiable, and bias-resistant randomness input for committee elections and block scheduling; the random outputs remain private before use and are revealed only when needed.
[0028] (3) Committee: A fixed-size set of candidates from the entire network, elected by a combination of fixed and random seats, to undertake core consensus responsibilities such as proposals and BFT voting in each consensus epoch, in order to alleviate the solidification of the committee and reduce the risk of collusion.
[0029] (4) Proposers: Before the start of each epoch, a hidden proposal sequence is generated for each slot based on a random number; each slot corresponds to a sub-sequence containing the main proposer and several backup proposers, and the identity of the proposer of the current sub-sequence is gradually revealed as the slot is reached. The main proposer is responsible for generating and broadcasting block proposals; when it fails to successfully submit a valid proposal within the specified time window, a phase switch is triggered, and the backup proposers take over in turn, thereby achieving rapid disaster recovery and continuous block production within the same slot.
[0030] (5) Committee validators: The remaining members of the committee, excluding the current proposer, are responsible for receiving and validating block proposals, voting on / signing valid proposals and broadcasting the voting results; when the votes reach the protocol threshold, the block is submitted and receives final confirmation.
[0031] The operation process is as follows Figure 1 As shown, it can be summarized as follows: (1) Generating random numbers: First, a random seed for this round is generated using a privacy-preserving and verifiable random source. Each participating node performs distributed computation on the requests based on its key share and aggregates the random outputs. The relevant proofs are uploaded to the blockchain to support public verification. To reduce the risk of targeted attacks caused by the random number being predicted before use, the random seed maintains output privacy before actual use and is only revealed when necessary.
[0032] (2) Hybrid committee election: Using the random seed generated in step (1), a committee is elected from all nodes. One part consists of the determined seats obtained by sorting by pledge / score, and the other part consists of random seats driven by the random seed and extracted by weight.
[0033] (3) Random block order generation and hiding: Based on the random seed generated in step (1), the global block order of the current epoch is generated and hidden, where each slot corresponds to an ordered subsequence of proposers. Before the start of each slot, a usable set is constructed by heartbeat detection and missing block statistics; then, at the start of each slot, the current ordered subsequence of proposers is revealed in stages, and the attack window is converged to the stage length.
[0034] (4) Phased multi-proposer block production: Divide a slot into several consecutive phases: phase By the proposer The proposer has exclusive right to submit proposals; if no valid proposal that has passed basic verification and completed dissemination is observed within the time window of this phase, a phase switch is triggered, and the next proposer takes over.
[0035] (5) BFT voting confirmation of finality: Once a valid candidate block is generated at a certain stage, the committee performs BFT voting on it and completes the final confirmation, and the block is added to the chain. The proposed mechanism mainly optimizes the formation of the committee and the block production schedule, without changing the BFT finality semantics and security threshold.
[0036] This method can be divided into three main parts: a privacy-preserving and verifiable random source design, a hybrid committee election, and a phased backup proposer switching mechanism that hides the block production order. The general process is shown in the attached figure. Figure 2 As shown.
[0037] (1) Initialization This is executed during the key generator's initialization phase. The key generator randomly selects the global private key. Using Shamir to divide into Generate group public key And calculate for each node Serves as the public key for each node; publishes the group's public key. and the public keys of each node .
[0038] (2) Blinding treatment This phase is performed by the requester. First, the requester uses a random number seed. Calculate the summary value And select a random number. ,calculate Afterwards, the requester executes... Algorithm generation prove This proof is used to verify Finally, the requester sets the state. Broadcast blind output Give it to other nodes.
[0039] (a) Select a random number ,calculate ; (b) Calculation and Generate proof .
[0040] (3) Blinded verification The remaining nodes are receiving Afterwards, verification Is it valid? First, node resolution. ,implement Determine if it is legal. The algorithm is as follows.
[0041] (a) Calculation ; (b) Judgment Check if the equation is true. If the equation is true, return 1, indicating that... If valid, proceed to the next step; otherwise, return 0, indicating invalidity.
[0042] (4) Share generation Each node is based on its own private key Calculate the individual shares of random numbers First, based on the received ,implement generate prove This proof is used to verify .in, The algorithm is shown below. Then, the node outputs... To the aggregator.
[0043] (a) Random selection ,calculate = , = ; (b) Calculation and ; (c) Broadcast ; (5) Quota pre-verification The aggregator receives the data sent by each node. Then, for each node and Execute as follows The calculations are verified one by one.
[0044] (a) Calculation ; (b) Perform the verification equation and Check if all are true. If all are true, output 1, indicating that all validations passed and proceed to the next step; otherwise, output 0, indicating that the validations failed.
[0045] (6) Threshold aggregation Based on all verified The aggregator generates the aggregation proof by performing the following computational process. First, the aggregator calculates using Lagrange interpolation. Then, the aggregator performs the following process to generate the aggregation proof.
[0046] (a) For each node Select random number ,calculate and Then, generate the challenge. ,same Send it to each node at the same time; (b) Each node generates a challenge after receiving it. And send it to the aggregator; (c) The aggregator receives data from each node. ,generate ; (d) Aggregator generates aggregation proof and broadcast Give it to each node.
[0047] (7) Aggregate verification Each node received the aggregation proof Then, execute the following: The process determines whether the proof is valid.
[0048] (a) Calculation Execute the verification equation and Check if the conditions are met. If all conditions are met, the verification is successful; otherwise, it is invalid and should be discarded.
[0049] (8) Unblocking The requester verifies the aggregate proof Then, perform the deblinding generation process as described in the calculation. and generate
[0050] (a) Calculation ; (b) Calculate the selection of random numbers ,calculate , c= and ; (c) Generate proof And broadcast it to other nodes.
[0051] (d) Output the final VRF value when needed. .
[0052] (9) Verification When the VRF is not publicly available, execute the following: Process Validation and .
[0053] (a) Calculate c = ; (b) Perform the verification equation and If all conditions are met, the verification passes and the next step is executed; otherwise, the verification fails.
[0054] Once the VRF is made public, other nodes can perform the following process to complete external verification.
[0055] (a) : Verify blinded values With input The relationship.
[0056] (b) : Verify aggregation results The correctness of the statement.
[0057] (c) Verification of unblinding results The correctness of the statement.
[0058] (d) Inspection Does this hold true? If so, then publish the random number. It is legal; otherwise, it is illegal.
[0059] In a hybrid committee election mechanism, this embodiment provides a hybrid committee election method for selecting a fixed-size committee from a set of candidate nodes at the beginning of each consensus epoch. The input to this method includes: a set of candidate nodes. (where each element is a candidate node), committee size (Indicates the total number of members to be elected by this committee), number of random seats (Indicates the number of seats drawn randomly), Epoch Index (Indicates the current round number), public random seed (Random input generated from a privacy-preserving and verifiable random source and revealed when needed), domain-separated labels (Used to isolate the same random seed for different purposes), node identifier (representing candidate nodes) Unique identifier), node equity weight (representing candidate nodes) The pledge or composite weights (used for weighted sampling), and the scoring function. And its parameters (used to determine the seat order). This method outputs a set of committees. .
[0060] (1) Seat allocation First, determine the "fixed number of seats" and the "random number of seats." Indicates the total size of the committee; Indicates the number of random seats. If not directly given... Then it can be based on the random proportion parameter Calculate the number of random seats as follows in This indicates the floor function. The number of seats is then calculated and determined. in This indicates the number of seats, which forms the basis for ensuring the performance and stability of the committee. (2) Determine the seat selection For the candidate node set Each candidate node Calculate the overall score ,Right now in To achieve a comprehensive scoring function, positive indicators such as node staking, reputation, and online rate can be combined with penalty items such as missing blocks and double signatures to obtain a unified scoring value. Represents a node The scoring results. Then, all candidate nodes are sorted by... Sort from largest to smallest and select the top-ranked items. Each node constitutes a definite subset of seats. in Indicates the determination of a subset of the committee. Indicates "take the previous one" Set operations for "name".
[0061] (3) Random seat selection First, remove nodes that have already secured a seat from the candidate set to obtain the remaining candidate set. in This represents the candidate pool participating in the random seat competition. Subsequently, for any remaining candidate node... Based on a public random seed Epoch Index Domain separation tag and node identifier Calculate derived pseudorandom quantities in Represents a secure hash function. Indicates bit string concatenation; Map the hash to Uniform random numbers; That is, uniformly random numbers. Because After being revealed, it is made public to the entire network, so any node can access the same... Consistent recalculation This ensures the openness, verifiability, and consistency of random seat elections.
[0062] Furthermore, to incorporate node equity weights into the random sampling process and increase the probability of selecting nodes with higher weights, a weighted ranking index is constructed for each node. ,For example in Represents a node The equity or overall weight (such as the pledge size or the overall weight of "pledge + credit + online rate"). When When it is larger, The value tends to be smaller, making it easier to select under the subsequent "minimum" rule, thus achieving a "weighted" random selection. Then, for all... of Sort in ascending order and select smallest Each node constitutes a subset of random seats. in Denotes a subset of the random committee. This means "take the smallest one". The method uses sampling without replacement, meaning each node is selected at most once, thus avoiding duplicate random seats. The technical effect of this step is to introduce random rotation while ensuring recalculation and verifiability, reducing the risk of long-term committee rigidity and pre-emptive targeted attacks.
[0063] (4) Merge output The final committee will be obtained by merging the determined subset of seats with the random subset of seats. in For the output committee assembly, This represents the union operation on sets. The output committee... As this era The core node set that participates in the proposal and BFT voting confirmation, and then enters the subsequent hidden block production order and phased backup proposer switching process.
[0064] I. A phased backup proposal switching mechanism to hide the block production order In the era Inside, the committee assembled As a core participant in the consensus, the subscript Indicates the current epoch number, set The elements are committee nodes. For each block output slot... Its start time is The time slot length is The time slot is divided into A series of consecutive stages, in which The number of stages; the time window length for each stage is... The input also includes a random seed for this epoch. (Random input generated by a random source and verifiable externally), heartbeat observation window Heart rate threshold Maximum number of missing blocks and relaxing thresholds and The output is: valid block proposals generated within this time slot. , or null value This indicates that no valid proposals were generated in that time slot.
[0065] (1) Can be constructed using sets In the observation window Within, for each committee node Statistical analysis of heart rate Compared with historical missing block count ,in This indicates the proportion of heartbeats observed at that node. This indicates the cumulative number of times this node has recently experienced block shortages or failed to submit timely proposals. (Based on a threshold.) and Available sets for constructing this time slot in Indicates in time slot The set of available nodes allowed to participate in the allocation of proposal sequences. The threshold for heart rate arrival. This represents the maximum allowed number of missing blocks. If ( (If the number of elements in the set is 0), then the heartbeat threshold will be adjusted to 0. And recalculate If still Then the upper limit of missing blocks will be adjusted to And recalculate If still Then let .
[0066] (2) Revealing the proposer's subsequence and consistency verification In the era Release a sequence commitment to the public before it begins ,in Indicates the era The commitment value generated from the mapping information of all time slot proposers within the time slot. Arrival time slot. start time At that time, the ordered subsequence of proposers corresponding to that time slot is revealed. in Represents an era time slot List of proposers Main proposer, As a backup proposer. Regarding the revealed... Execution and Commitment Consistency verification is performed. If the verification passes, the process proceeds to the next step; if the verification fails, the sequence is discarded and the current time slot process is terminated, and the output is displayed. .
[0067] (3) Proposal in stages Index by Stage to The proposal process is executed sequentially. (Stage) The proposer is recorded as Its phase time window is During this time window, if the identity of this node is equal to... Then this node constructs a block proposal. And broadcast, in which the block proposal This is the candidate block data structure. Meanwhile, committee nodes continuously receive candidate blocks within this phase's time window. If any candidate block is observed for the first time within this phase's time window, a decision phase begins. Success, record this block as The process proceeds immediately to step four; if no candidate block proposals are observed by the end of the phase window, the phase is then determined. Failure and proceed to the next stage .
[0068] (4) Output If any stage exists Successfully obtained a valid candidate block proposal Then output As a time slot The outcome of the proposal; if all stages to If all attempts fail, output an empty value.
[0069] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A blockchain consensus method based on output privacy and verifiable random numbers, implemented based on the BFT-DPoS consensus architecture, characterized in that: Includes the following steps: S1 generates a private and verifiable random seed by a distributed set of holding nodes, and the random seed maintains its private output state before actual use; Based on the random seed, S2 selects a set of committees to participate in the consensus in this round from the candidate nodes of the entire network using a hybrid structure of determined seats and random seats. The set of committees undertakes the core consensus responsibilities of block proposals and BFT voting in the current consensus epoch. S3 generates a global block production order for each block production slot within the current consensus epoch based on the random seed and publishes an order commitment. Each block production slot corresponds to an ordered subsequence of proposers containing a primary proposer and several backup proposers. The ordered subsequence of proposers remains hidden until the corresponding slot arrives. Each ordered subsequence of proposers includes a primary proposer and at least one backup proposer. At the start of the current time slot, S4 reveals the subsequence of proposers corresponding to that time slot, and the committee nodes verify the consistency between the revealed result and the commitment. According to the order of the subsequence of proposers, the main proposer and the backup proposer attempt to produce a block in stages until a valid block proposal is successfully generated. For the valid block proposals generated within a single time slot, S5's consensus committee executes the BFT voting process. After reaching the voting threshold agreed upon in the protocol, the final confirmation of the block is completed, and the block is appended to the blockchain ledger.
2. The blockchain consensus method based on output privacy and verifiable random numbers according to claim 1, characterized in that, The process of generating a public random seed in step S1 further includes: Step 1.1: The key generator completes the threshold key splitting and public key distribution, providing common parameters for subsequent random seed distributed computation; Step 1.2: The requesting node performs a blinding operation on the input of this round, generates a blinded random number request, and broadcasts it to the entire network; Step 1.3: After receiving the blinded random numbers, the participating nodes in the multiple random number generation process verify the legality of the blinded values; Step 1.4: After the blinded value is verified and confirmed to be valid, multiple random number generation participants generate their respective random number shares based on their private keys, and attach proof that can verify their correctness. Step 1.5: The aggregation node verifies whether the random number share is valid; Step 1.6: The aggregation node collects a number of valid random number shares that pass a preset threshold, and generates an aggregated random number result and an aggregation proof through a threshold aggregation algorithm; Step 1.7: The legality of the aggregation result can be verified by multiple random number generation participants, nodes, and requesters; Step 1.8: After verifying the legality of the aggregation result, the requesting node performs unblinding processing on the aggregated random number result to obtain the unblinding proof. After further processing, the final random number seed is obtained. When using the seed, it is broadcast to the other nodes; otherwise, it is kept in a private state. Step 1.9: If the current random number has not been published, verify whether the unblinding process is legal and determine whether the current random number generation process is correct; if the current random number has been published, in addition to the above verification, verify the published random number itself. The random number request is kept private after deblinding and before being made public, and no node can predict the final random seed in advance.
3. The blockchain consensus method based on output privacy and verifiable random numbers according to claim 1, characterized in that, In step S2, a committee set is elected using a hybrid election method that combines determined seats with random seats. Specifically, this includes: Step 2.1: Based on the preset total size of the committee, determine the number of fixed seats and the number of random seats; Step 2.2: Based on the comprehensive score of the nodes, select the top few nodes with the highest scores to form a subset of the seats. The input parameters of the comprehensive score function include the node's staking scale, reputation value, positive online rate indicator, as well as the number of missing blocks and penalties for double signature violations. Step 2.3: From the remaining candidate nodes, based on the public random seed and combined with the node equity weight, select a number of remaining random seats through a verifiable random sampling method to form a subset of random seats; Step 2.4: Merge the determined subset of seats with the random subset of seats to obtain the final committee set.
4. The blockchain consensus method based on output privacy and verifiable random numbers according to claim 3, characterized in that, In step 2.3, random sampling is performed based on the public random seed and combined with the node equity weight. Specifically, a derived random quantity based on its node identifier and the public random seed is calculated for each remaining candidate node. The nodes are then sorted in ascending order according to the ratio of the derived random quantity to the node equity weight, and a subset of random seats is selected from the nodes with the smallest ratio.
5. The blockchain consensus method based on output privacy and verifiable random numbers according to claim 1, characterized in that, In step S3, the global block production order commitment is a commitment value generated based on a hash algorithm and is made public across the network before the start of the current consensus epoch.
6. The blockchain consensus method based on output privacy and verifiable random numbers according to claim 1, characterized in that, Before generating the global block order, an availability check step is also included: Before the current time slot begins, a set of available nodes is selected based on the heartbeat arrival rate and block count of each committee node within the historical window; The proposers in the proposer subsequence are selected only from the set of available nodes.
7. The blockchain consensus method based on output privacy and verifiable random numbers according to claim 1, characterized in that, In step S4, after the ordered subsequence of proposers for the corresponding time slot is revealed, all network nodes verify the legality of the proposer subsequence by comparing its consistency with the order commitment. If the verification fails, the block production process for the current time slot is terminated. The ordered subsequence of proposers attempts to produce blocks in stages, specifically including: dividing a time slot into multiple consecutive stages of equal length to the proposer subsequence, with each stage having a single proposer in the corresponding sequence having exclusive proposal rights; If a proposer in this time slot successfully submits a valid block that passes basic verification within the current time window, the block production attempt for this time slot will immediately end, and this block will be used as the valid block proposal for this time slot. If no valid block is produced by the end of the current phase's time window, the system will automatically switch to the next phase, where the next proposer will attempt to produce a block.