Blockchain consensus method, apparatus, device, medium, and program product
By employing a ciphertext-based conjecture information processing and verification mechanism in the blockchain, the contradiction between resource consumption and scalability in existing consensus algorithms is resolved, achieving improved adaptability on consortium blockchains and public blockchains, ensuring block security and randomness, and expanding the application scope of blockchain.
Patent Information
- Application Number
- CN202310595439.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-05-24
AI Technical Summary
Existing blockchain consensus algorithms struggle to balance low resource consumption and high scalability. Public blockchain consensus methods consume high resources but have good scalability, while consortium blockchain consensus methods have poor scalability but low resource consumption, lacking adaptability.
A blockchain consensus method is adopted, which collects conjectured information in encrypted form, performs first and second verification processes, decrypts the conjectured value after receiving the decryption key, and selects the builder of the next block. It is applicable to consortium blockchains and public blockchains. The builder is selected by matching degree calculation and combined with reward and penalty mechanisms to ensure the security and randomness of the block.
It implements a consensus method that is more adaptable to consortium blockchains and public blockchains, reduces resource consumption, supports larger-scale blockchain networks, improves security and scalability, and is suitable for a wider range of application scenarios.
Smart Images

Figure CN116566583B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, and more specifically to a blockchain consensus method, apparatus, device, medium, and program product. Background Technology
[0002] As a distributed, decentralized system, blockchain's network nodes are independent and dispersed. Therefore, this system must rely on a mechanism to achieve data consistency.
[0003] The consensus algorithms used in existing technologies are difficult to balance the low resource consumption and high scalability of blockchain networks. Summary of the Invention
[0004] In view of the above problems, this disclosure provides blockchain consensus methods, apparatuses, devices, media, and program products that improve scalability while reducing resource consumption.
[0005] According to a first aspect of this disclosure, a blockchain consensus method is provided, wherein the blockchain includes multiple participating nodes, and during the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the builder, and the method includes: collecting guess information from the multiple guessers, wherein the guess information includes a guess value in ciphertext form; organizing and recording the guess information into the current block according to a preset block structure; performing a first verification process based on the guess information; performing a second verification process based on the current block; receiving a decryption key from the guessers; decrypting the guess value based on the decryption key if the first verification process and the second verification process pass; and selecting the builder of the next block from the multiple guessers based on the decrypted guess value.
[0006] According to embodiments of this disclosure, the conjecture information further includes: the ID of the previous block, the ID of the current blockchain builder, the digital signature of the conjecturer, and the token held by the conjecturer. The preset block organization structure includes at least a conjecture domain. The step of organizing according to the preset block structure and recording the conjecture information into the current block includes: storing the conjecture information in the conjecture domain.
[0007] According to embodiments of this disclosure, the first verification process based on the conjecture information includes: for consortium blockchains: determining whether the digital signature of the conjecturer is a specified digital signature, wherein the specified digital signature is granted the right to participate in blockchain construction; and / or determining whether the number of times the conjecturer has acted as a builder consecutively is greater than a first threshold; for public blockchains: determining whether the number of tokens held by the conjecturer is greater than a second threshold; and / or determining whether the coin age of the tokens held by the conjecturer is greater than a third threshold; and / or determining whether the number of times the conjecturer has acted as a builder consecutively is greater than a fourth threshold.
[0008] According to embodiments of this disclosure, the second verification process based on the current block includes: for consortium blockchains: determining whether the number of speculative information in the current blockchain is greater than or equal to a fifth threshold; and / or determining whether the ratio of the number of speculators in the current blockchain to the total number of speculators is greater than a sixth threshold; for public blockchains: determining whether the number of speculative information in the current blockchain is greater than or equal to a seventh threshold; and / or determining whether the total number of tokens held by speculators in the current block is greater than an eighth threshold; and / or determining whether the ratio of the total number of tokens held by speculators in the current block to the total number of tokens is greater than a ninth threshold; and / or determining whether the total token age of speculators in the current block is greater than a tenth threshold.
[0009] According to an embodiment of this disclosure, the step of selecting the builder of the next block from the plurality of guessers based on the decrypted guess value includes: calculating the matching degree based on the full set of guess information in the guess domain and the guess information of any guesser; and selecting the guesser with the highest matching degree as the builder of the next block.
[0010] According to an embodiment of this disclosure, the step of calculating the matching degree based on all the conjecture information in the conjecture domain and the conjecture information of any conjecturer includes: performing a hash calculation on all the conjecture information in the conjecture domain to obtain a block digest; performing a hash calculation on the conjecture information of any conjecturer to obtain a conjecture digest; and calculating the matching degree based on the block digest and the conjecture digest.
[0011] According to embodiments of this disclosure, after performing a first verification process based on the conjecture information and after performing a second verification process based on the current block, the method further includes: rewarding the conjecturer if the first verification process passes; and / or rewarding the builder if the second verification process passes; and / or penalizing the conjecturer if the decryption key of the conjecturer is not received in a timely manner.
[0012] According to an embodiment of this disclosure, after performing the second verification process based on the current block, the method further includes: propagating the current block via a network-wide broadcast.
[0013] According to an embodiment of this disclosure, receiving the decryption key from the guesser includes: receiving the decryption key, wherein the decryption key is disseminated by the guesser via a network-wide broadcast.
[0014] According to a second aspect of this disclosure, a blockchain consensus method is provided, wherein the blockchain includes multiple participating nodes, and during the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the guessers, and the method includes: generating guess information, wherein the guess information includes at least a guess value, the guess value being in ciphertext form; sending the guess information to the builder; and after the builder records the guess information into the current block, sending a decryption key, wherein the decryption key is used to decrypt the guess value to obtain a decrypted guess value, wherein the decrypted guess value is used to select the builder of the next block from the multiple guessers.
[0015] According to embodiments of this disclosure, sending the decryption key includes: sending the decryption key to the entire network via broadcast.
[0016] According to an embodiment of this disclosure, after sending the decryption key, the method further includes: receiving a block from the builder, the block including a conjecture domain, the conjecture domain including multiple conjecture information, the conjecture information including a conjecture value, the conjecture value existing in ciphertext form; and receiving the decryption key from other conjecturers, the decryption key being used to decrypt the conjecture value to plaintext form.
[0017] A third aspect of this disclosure provides a blockchain consensus device, wherein the blockchain includes multiple participating nodes, and during the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder, and the blockchain consensus method is applied to the builder. The device includes: a guess collection module for collecting guess information from the multiple guessers, wherein the guess information includes a guess value in encrypted form; a guess storage module for organizing and recording the guess information into the current block according to a preset block structure; a first verification module for performing a first verification process based on the guess information; a second verification module for performing a second verification process based on the current block; a key receiving module for receiving the decryption key from the guessers; a decryption module for decrypting the guess value based on the decryption key if the first verification process and the second verification process pass; and a builder selection module for selecting the builder of the next block from the multiple guessers based on the decrypted guess value.
[0018] According to embodiments of this disclosure, the conjecture information further includes: the ID of the previous block, the ID of the current blockchain builder, the digital signature of the conjecturer, and the token held by the conjecturer. The preset block organization structure includes at least a conjecture domain, and the conjecture storage module is used to store the conjecture information in the conjecture domain.
[0019] According to embodiments of this disclosure, the first verification module is configured to: for consortium blockchains, determine whether the guesser's digital signature is a specified digital signature, wherein the specified digital signature is granted the right to participate in blockchain construction; and / or determine whether the number of times the guesser has acted as a builder consecutively is greater than a first threshold; for public blockchains, determine whether the number of tokens held by the guesser is greater than a second threshold; and / or determine whether the token age held by the guesser is greater than a third threshold; and / or determine whether the number of times the guesser has acted as a builder consecutively is greater than a fourth threshold.
[0020] According to embodiments of this disclosure, the second verification module is configured to: for consortium blockchains, determine whether the number of speculative information in the current blockchain is greater than or equal to a fifth threshold; and / or determine whether the ratio of the number of speculators in the current blockchain to the total number of speculators is greater than a sixth threshold; for public blockchains, determine whether the number of speculative information in the current blockchain is greater than or equal to a seventh threshold; and / or determine whether the total number of tokens held by speculators in the current block is greater than an eighth threshold; and / or determine whether the ratio of the total number of tokens held by speculators in the current block to the total number of tokens is greater than a ninth threshold; and / or determine whether the total token age held by speculators in the current block is greater than a tenth threshold.
[0021] According to an embodiment of this disclosure, the builder selection module is used to calculate the matching degree based on all the conjecture information in the conjecture domain and the conjecture information of any conjecturer; and to select the conjecturer with the highest matching degree as the builder of the next block.
[0022] According to an embodiment of this disclosure, the builder selection module is configured to perform hash calculations on all conjecture information in the conjecture domain to obtain a block digest; perform hash calculations on the conjecture information of any conjecturer to obtain a conjecture digest; and calculate the matching degree based on the block digest and the conjecture digest.
[0023] According to embodiments of this disclosure, the apparatus further includes a reward and punishment module, configured to reward the guesser if the first verification process passes; and / or reward the builder if the second verification process passes; and / or punish the guesser if the guesser's decryption key is not received in a timely manner.
[0024] According to an embodiment of this disclosure, the apparatus further includes a block broadcasting module for propagating the current block via a network-wide broadcast.
[0025] According to an embodiment of this disclosure, the key receiving module is used to receive the decryption key, which is disseminated by the guesser via a network-wide broadcast.
[0026] A fourth aspect of this disclosure provides a blockchain consensus device, wherein the blockchain includes multiple participating nodes, and during the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder, the blockchain consensus method is applied to the guessers, and the device includes: a guess generation module for generating guess information, wherein the guess information includes at least a guess value, the guess value being in ciphertext form; a guess sending module for sending the guess information to the builder; and a key sending module for sending a decryption key after the builder records the guess information into the current block, wherein the decryption key is used to decrypt the guess value to obtain a decrypted guess value, wherein the decrypted guess value is used to select the builder of the next block from the multiple guessers.
[0027] According to embodiments of this disclosure, the key sending module is used to send the decryption key to the entire network in a broadcast manner.
[0028] According to an embodiment of this disclosure, the apparatus further includes a monitoring module for receiving a block from the builder, the block including a conjecture domain, the conjecture domain including multiple conjecture information, the conjecture information including a conjecture value, the conjecture value existing in ciphertext form; and receiving the decryption key from other conjecturers, the decryption key being used to decrypt the conjecture value to plaintext form.
[0029] A fifth aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the aforementioned blockchain consensus method.
[0030] A sixth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the aforementioned blockchain consensus method.
[0031] A seventh aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned blockchain consensus method.
[0032] In the embodiments disclosed herein, at least the following beneficial effects can be achieved:
[0033] 1. The received conjecture value exists in encrypted form. After the conjecture value falls into the block, the decryption key of the conjecturer is received, and the matching value is calculated based on the content of the conjecture value in plaintext. From multiple candidates, the builder of the next block is selected. This ensures that the current builder cannot tamper with the conjecture value, avoids the possibility of the builder cheating and manipulating the election, and ensures that the next builder is truly randomly selected, thus guaranteeing the security of the block.
[0034] 2. The blockchain consensus method disclosed in this embodiment is a phased implementation solution similar to a bidding process, applicable to both consortium blockchains and public blockchains by matching different verification rules. Compared to existing consortium blockchain consensus methods, although its operating efficiency is slightly reduced, it can support larger-scale blockchain networks and reduces the requirements for network reliability and throughput. Compared to existing public blockchain consensus methods, although it increases implementation complexity, it achieves consensus without relying on computing power, resulting in higher efficiency and lower resource consumption. Overall, this method fills the gap between consortium blockchains and public blockchains, has greater adaptability, and expands the application scope of blockchain. Attached Figure Description
[0035] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0036] Figure 1 This diagram illustrates an application scenario of a blockchain consensus method according to embodiments of the present disclosure.
[0037] Figure 2 A flowchart illustrating a blockchain consensus method according to an embodiment of this disclosure is shown schematically;
[0038] Figure 3A A schematic diagram illustrating the organization of the block structure according to an embodiment of the present disclosure is shown.
[0039] Figure 3B This schematically illustrates a different block structure organization according to an embodiment of the present disclosure;
[0040] Figure 4 A flowchart illustrating a first verification process according to an embodiment of the present disclosure is shown schematically;
[0041] Figure 5 A flowchart illustrating a second verification process according to an embodiment of the present disclosure is shown schematically;
[0042] Figure 6 A flowchart illustrating a novel builder selection method according to an embodiment of this disclosure is shown schematically.
[0043] Figure 7 A flowchart illustrating another blockchain consensus method according to an embodiment of this disclosure is shown schematically;
[0044] Figure 8 A flowchart illustrating another blockchain consensus method according to an embodiment of this disclosure is shown schematically;
[0045] Figure 9 A schematic diagram illustrating the full flow of a blockchain consensus method according to an embodiment of this disclosure is provided.
[0046] Figure 10 A schematic block diagram of a blockchain consensus apparatus according to an embodiment of the present disclosure is shown.
[0047] Figure 11 A schematic block diagram of a blockchain consensus device according to embodiments of the present disclosure is shown; and
[0048] Figure 12 A block diagram of an electronic device suitable for implementing a blockchain consensus method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0049] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0050] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0051] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0052] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0053] Before providing a detailed explanation of the embodiments of this disclosure, the technical terms used in the embodiments of this disclosure will be explained one by one:
[0054] Public blockchain: refers to a consensus blockchain that is open to everyone, allowing anyone to read data, send transactions, and have transactions effectively confirmed.
[0055] A consortium blockchain is a blockchain jointly managed by multiple organizations. Each organization manages one or more nodes, and data can only be read, written, and sent by different organizations within the system. Consortium blockchains and their nodes typically have corresponding entity organizations that grant authorization before joining or leaving the network. These organizations form a consortium with shared interests to jointly maintain the healthy operation of the blockchain.
[0056] Consensus algorithm: responsible for maintaining the consistency of the system. In blockchain systems, public chains mainly use the PoW consensus algorithm, consortium chains mainly use the PBFT consensus algorithm, and private chains mainly use the Raft or Paxos consensus algorithm.
[0057] The PBFT algorithm, through master-slave nodes and a view mechanism, ensures a fault tolerance rate of 33%, and its performance is greatly improved compared to PoW. However, its scale is limited by communication overhead.
[0058] The Proof-of-Work (PoW) algorithm uses computing power to compete for the right to record transactions. Nodes participating in the consensus process perform complex calculations that take a reasonable amount of time, and the first node to find the correct result gains the right to build a block. It guarantees that the services and resources are used only when genuine needs are met, by using the time, equipment, and energy invested. While it ensures that blockchain security is maintained by nodes with the majority of computing power through competition for the right to record transactions, its drawback is the sacrifice of efficiency.
[0059] The PBFT consensus method solves the Byzantine Generals Problem under reliable channel conditions. As a deterministic consensus method, its advantage lies in guaranteeing the finality of transactions at the algorithm level. It is suitable for enterprise-level scenarios requiring a small number of nodes, high efficiency, and low latency.
[0060] As a distributed and decentralized system, blockchain's network nodes are independent and dispersed. Therefore, this system must rely on a mechanism to achieve data consistency, rewarding nodes that provide services to the blockchain and punishing malicious nodes. This mechanism is the blockchain consensus mechanism. Consensus methods, as the core technology of blockchain, are its cornerstone and maintain the operation of the blockchain network. Designing and implementing secure and efficient consensus methods can improve transaction throughput and expand its application scenarios while ensuring blockchain security.
[0061] Consensus algorithms can be divided into two categories: one is the public blockchain consensus method represented by Proof-of-Work (PoW), and the other is the consortium blockchain consensus method represented by Practical Byzantine Fault Tolerance (PBFT).
[0062] The Proof-of-Work (PoW) method uses computing power to compete for the right to record transactions. Nodes participating in the consensus process perform complex calculations that take a reasonable amount of time, and the first node to find the correct result gains the right to build a block. The time, equipment, and energy spent guarantee that the relevant services and resources are used only when there is genuine demand.
[0063] The PBFT consensus method solves the Byzantine Generals Problem under reliable channel conditions. As a deterministic consensus method, its advantage lies in guaranteeing the finality of transactions at the algorithm level. It is suitable for enterprise-level scenarios requiring a small number of nodes, high efficiency, and low latency.
[0064] Both public and consortium blockchains currently employ consensus methods that have significant flaws.
[0065] The former type consumes too many resources. Although it can support large-scale blockchain networks and network nodes can freely enter and exit, resulting in high scalability, its transaction throughput is generally low, and it can only support limited application scenarios requiring high security.
[0066] While the latter type improves blockchain processing performance and better supports complex application scenarios based on smart contracts, it is only suitable for smaller blockchain networks and does not support free entry and exit of network nodes, thus sacrificing some aspects of distributed architecture.
[0067] To address the technical problems existing in the prior art, embodiments of this disclosure provide a blockchain consensus method. The blockchain includes multiple participating nodes. During the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the builder. The method includes: collecting guess information from the multiple guessers, wherein the guess information includes a guess value in ciphertext form; organizing and recording the guess information into the current block according to a preset block structure; performing a first verification process based on the guess information; performing a second verification process based on the current block; receiving a decryption key from the guessers; decrypting the guess value based on the decryption key if the first and second verification processes pass; and selecting the builder of the next block from the multiple guessers based on the decrypted guess value.
[0068] In the embodiments disclosed herein, at least the following beneficial effects can be achieved:
[0069] 1. The received conjecture value exists in encrypted form. After the conjecture value falls into the block, the decryption key of the conjecturer is received, and the matching value is calculated based on the content of the conjecture value in plaintext. From multiple candidates, the builder of the next block is selected. This ensures that the current builder cannot tamper with the conjecture value, avoids the possibility of the builder cheating and manipulating the election, and ensures that the next builder is truly randomly selected, thus guaranteeing the security of the block.
[0070] 2. The blockchain consensus method disclosed in this embodiment is a phased implementation solution similar to a bidding process, applicable to both consortium blockchains and public blockchains by matching different verification rules. Compared to existing consortium blockchain consensus methods, although its operating efficiency is slightly reduced, it can support larger-scale blockchain networks and reduces the requirements for network reliability and throughput. Compared to existing public blockchain consensus methods, although it increases implementation complexity, it achieves consensus without relying on computing power, resulting in higher efficiency and lower resource consumption. Overall, this method fills the gap between consortium blockchains and public blockchains, has greater adaptability, and expands the application scope of blockchain.
[0071] Figure 1 The diagram illustrates an application scenario of a blockchain consensus method according to an embodiment of this disclosure.
[0072] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 is used as a medium to provide a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0073] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0074] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0075] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0076] It should be noted that the blockchain consensus method provided in this disclosure can generally be executed by terminal devices 101, 102, 103 or server 105. Correspondingly, the blockchain consensus device provided in this disclosure can generally be located in terminal devices 101, 102, 103 or server 105. The blockchain consensus method provided in this disclosure can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the blockchain consensus device provided in this disclosure can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.
[0077] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0078] The following will be based on Figure 1 The described scene, through Figures 2-9 The blockchain consensus method of the disclosed embodiments is described in detail.
[0079] Figure 2 A flowchart illustrating a blockchain consensus method according to an embodiment of this disclosure is shown schematically.
[0080] like Figure 2 As shown, the blockchain consensus method of this embodiment includes operations S210 to S270, and the blockchain consensus method can be executed by terminal devices 101, 102, 103 or server 105.
[0081] According to embodiments of this disclosure, the blockchain includes multiple participating nodes. During the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder, and the blockchain consensus method is applied to the builder.
[0082] In this context, "guessor" and "builder" are logical concepts referring to the roles played by participating nodes in the current accounting process (block building process) of the blockchain. These roles include one builder, multiple guessers, and other participating nodes. In other words, a blockchain network contains multiple participating nodes; some of these nodes have the intention to run for election and are called guessers, while the selected ones are called builders. It's understandable that multiple guessers compete to be elected as the next block builder. When selecting a builder for the next block building, the previous builder can either continue to run as a competitor or withdraw and become another participating node. Generally, this participant can be terminals 101, 102, and 103, or server 105.
[0083] In operation S210, the conjecture information of the multiple conjecturers is collected, wherein the conjecture information includes conjecture values in ciphertext form.
[0084] In operation S220, the conjecture information is recorded in the current block according to the preset block structure.
[0085] According to embodiments of this disclosure, the conjecture information further includes: the ID of the previous block, the ID of the current blockchain builder, the digital signature of the conjecturer, and the token held by the conjecturer. The preset block organization structure includes at least a conjecture domain. The step of organizing according to the preset block structure and recording the conjecture information into the current block includes: storing the conjecture information in the conjecture domain.
[0086] Specifically, the current block builder collects a sufficient amount of legitimate conjecture information about the current block from the entire network (in encrypted form, some information within the conjecture information), stores this information in the designated area of the block, constructs a legitimate block, and broadcasts the newly constructed block to the entire network. At this point, the conjecture value in the newly constructed block is in ciphertext form. Legitimate conjecture data must at least consist of the following parts: the ID of the previous block, the ID of the current blockchain builder, the conjecture value (ciphertext), the conjecturer's digital signature, and the token held by the conjecturer. The conjecturer's digital signature and the token held by the conjecturer are data required by both consortium blockchains and public blockchains, respectively.
[0087] Taking consortium blockchains as an example, the hypothetical data in consortium blockchains are shown in Table 1 below:
[0088]
[0089] Table 1
[0090] Of course, other types of data, such as timestamps, can be added to the conjecture data as needed. The conjecture value is formed according to the prior agreement in the blockchain. The conjecture value can be a specific number, a range of values, or other pre-agreed forms, which will not be elaborated here.
[0091] Figure 3A A schematic diagram illustrating the block structure organization according to an embodiment of the present disclosure is shown.
[0092] like Figure 3A As shown in the embodiments of this disclosure, in addition to storing conventional block elements such as the ID, transaction data, and digital signature of the previous block, a conjecture field is added to the legitimate block processing. This conjecture field stores conjecture information collected from different conjecturers, storing conjecture values from different conjecturers, denoted as Conjecture 1, Conjecture 2, Conjecture 3, etc. At this time, the conjecture values of the conjecture information stored in the block are in ciphertext form.
[0093] In operation S230, a first verification process is performed based on the conjectured information.
[0094] Specifically, the first verification process verifies the legitimacy of the conjecture itself. Legitimate conjecture data requires verification of the identity and qualifications of the conjecturer before being saved to the block.
[0095] In operation S240, a second verification process is performed based on the current block.
[0096] Specifically, the second verification process verifies the legitimacy of the current block itself. This requires verifying all conjectures stored in the block, i.e., the conjecture domain, to ensure the security of the blockchain operation.
[0097] In fact, the verification of operations S230 to S240 above, in addition to checking the data format, data type, and data quantity, also needs to take corresponding verification measures to prevent multiple nodes from colluding to manipulate the election.
[0098] According to an embodiment of this disclosure, after performing the second verification process based on the current block, the method further includes: propagating the current block via a network-wide broadcast.
[0099] Specifically, the current block records the conjectured value of the conjecture information as ciphertext data. Broadcasting this data ensures that the builder's block carrying the ciphertext is still backed up on other nodes, guaranteeing that the block is not tampered with. Furthermore, the subsequent election of a new builder is monitored, ensuring that the builder and his group will not manipulate the election.
[0100] In operation S250, the decryption key of the guesser is received.
[0101] Specifically, the key algorithm is not specified here.
[0102] According to an embodiment of this disclosure, receiving the decryption key from the guesser includes: receiving the decryption key, wherein the decryption key is disseminated by the guesser via a network-wide broadcast.
[0103] Specifically, when the key is broadcast, other guessers will obtain the key and decrypt the guess value. In this case, it is possible to monitor whether the guess value after plaintext is tampered with.
[0104] In operation S260, if the first verification process and the second verification process pass, the conjectured value is decrypted based on the decryption key.
[0105] Figure 3B The diagram illustrates another block structure organization according to an embodiment of the present disclosure.
[0106] like Figure 3B As shown, using the keys provided by the conjecturers, the conjecture information is decrypted, resulting in blocks containing only plaintext conjecture values. Since the conjecture information contains identifiers, the ciphertext can be directly decrypted one by one using the key.
[0107] In operation S270, based on the decrypted conjecture value, the builder of the next block is selected from the plurality of conjecturers.
[0108] It should be noted that the core idea of this embodiment is to select the next builder by generating an unmanipulated random number. During this process, it is necessary to ensure that the current block builder cannot modify this random number, and that the random number cannot be synthesized according to the current block builder's tendencies. Therefore, the conjecture value in the current block is first made ciphertext. Without the key, the builder cannot tamper with the content of this ciphertext, and the block is broadcast to other nodes before the key is obtained. This ensures that the data used to elect the next builder in the block is not tampered with. Then, the closest conjecturer among the conjecturers is matched using this random number according to certain rules or algorithms as the next block builder. The unmanipulated random number is the set of all conjecture values. Since different conjecturers contribute different conjecture values, the number obtained by combining all conjecture values can be considered an unmanipulated random number.
[0109] According to embodiments of this disclosure, after performing a first verification process based on the conjecture information and after performing a second verification process based on the current block, the method further includes: rewarding the conjecturer if the first verification process passes; and / or rewarding the builder if the second verification process passes; and / or penalizing the conjecturer if the decryption key of the conjecturer is not received in a timely manner.
[0110] Specifically:
[0111] Regarding rewards: Rewards are distributed according to agreed-upon rules to the builder or guesser who constructs a valid block. The reward allocation follows the matching degree output from operation S270, and the reward information is ultimately stored in the transaction area of the next block. For example, a simple distribution method is winner-takes-all: 'a' tokens are deducted from the accounts of all guessers, and the entire reward is given to the correct guesser, i.e., the builder of the next block. This is just a simple example; specific rules can be constructed based on actual circumstances.
[0112] Regarding penalties: For the builder who constructs and broadcasts an illegal block, or the guesser who fails to provide the decryption key in time, penalties can be imposed, such as deducting b tokens from their account. The penalty information will eventually be stored in the transaction area of the next block. After the penalty is imposed, a guesser with the next best match must be selected as the builder of the current block, and the current block must be reconstructed.
[0113] In the embodiments disclosed herein, at least the following beneficial effects can be achieved:
[0114] 1. The received conjecture value exists in encrypted form. After the conjecture value falls into the block, the decryption key of the conjecturer is received, and the matching value is calculated based on the content of the conjecture value in plaintext. From multiple candidates, the builder of the next block is selected. This ensures that the current builder cannot tamper with the conjecture value, avoids the possibility of the builder cheating and manipulating the election, and ensures that the next builder is truly randomly selected, thus guaranteeing the security of the block.
[0115] 2. The blockchain consensus method disclosed in this embodiment is a phased implementation solution similar to a bidding process, applicable to both consortium blockchains and public blockchains by matching different verification rules. Compared to existing consortium blockchain consensus methods, although its operating efficiency is slightly reduced, it can support larger-scale blockchain networks and reduces the requirements for network reliability and throughput. Compared to existing public blockchain consensus methods, although it increases implementation complexity, it achieves consensus without relying on computing power, resulting in higher efficiency and lower resource consumption. Overall, this method fills the gap between consortium blockchains and public blockchains, has greater adaptability, and expands the application scope of blockchain.
[0116] The specific logic of the first and second verification processes in operations S230 to S240 is as follows:
[0117] Figure 4 A flowchart illustrating a first verification process according to an embodiment of the present disclosure is shown schematically.
[0118] like Figure 4 As shown, the first verification processing method of this embodiment includes operations S410 to S420 and operations S430 to S450, and operations S410 to S420 and operations S430 to S450 can at least partially perform the above-mentioned operation S230.
[0119] In operation S410, it is determined whether the guesser's digital signature is a specified digital signature, which is the digital signature that has been granted the right to participate in the construction of the blockchain.
[0120] In operation S420, it is determined whether the number of times the guesser has acted as a builder consecutively is greater than a first threshold.
[0121] In operation S430, it is determined whether the number of tokens held by the guesser is greater than the second threshold.
[0122] In operation S440, it is determined whether the token age held by the guesser is greater than a third threshold.
[0123] In operation S450, it is determined whether the number of times the guesser has acted as the builder consecutively is greater than a fourth threshold.
[0124] It should be noted that the above operations S410 to S420 and operations S430 to S450 are not executed in any particular order.
[0125] Specifically, consortium blockchains can be verified using the following methods:
[0126] ① Conjecturers must obtain one or more designated digital signatures to authorize their participation in blockchain construction;
[0127] ②The builders of the previous N1 consecutive blocks cannot participate in the conjecture of the current block (N1 is a number).
[0128] It should be noted that, for consortium blockchains, the first point ensures the blockchain's closed nature, meaning only designated parties can participate in its operation and maintenance. The second point enhances the randomness of block builder selection, reducing the possibility of collusion.
[0129] Specifically, public blockchains can be verified using the following methods:
[0130] ① The number of tokens held by the guesser must be greater than or equal to N2;
[0131] ② The token age held by the guesser must be greater than or equal to N3 (the calculation method for token age can be found in the PoS algorithm);
[0132] ③The builders of the previous N4 consecutive blocks cannot participate in the conjecture of the current block.
[0133] N2, N3, and N4 are all numbers.
[0134] It should be noted that for public blockchains, the first two points above impose restrictions on the identities of those involved in building the blockchain. The asset requirements also facilitate the imposition of penalties should malicious actions occur. The last point has the same implications as those for consortium blockchains.
[0135] It should be noted that the above verification rules for both consortium blockchains and public blockchains are just examples, and the actual verification rules can be tailored, modified, or added as needed.
[0136] Figure 5 A flowchart illustrating a second verification process according to an embodiment of the present disclosure is shown schematically.
[0137] like Figure 5 As shown, the second verification processing method of this embodiment includes operations S510 to S520 and operations S530 to S560, and operations S510 to S520 and operations S530 to S560 can at least partially perform the above-mentioned operation S240.
[0138] In operation S510, it is determined whether the number of the conjectured information in the current blockchain is greater than or equal to the fifth threshold.
[0139] In operation S520, it is determined whether the ratio of the number of guessers in the current blockchain to the total number of guessers is greater than a sixth threshold.
[0140] In operation S530, it is determined whether the number of the conjectured information in the current blockchain is greater than or equal to the seventh threshold.
[0141] In operation S540, it is determined whether the total number of tokens held by the guesser in the current block is greater than the eighth threshold.
[0142] In operation S550, it is determined whether the ratio of the total number of tokens held by the guesser in the current block to the total number of tokens is greater than the ninth threshold.
[0143] In operation S560, it is determined that the total token age held by the guesser in the current block is greater than the tenth threshold.
[0144] It should be noted that there is no specific order in which operations S510 to S520 and operations S530 to S560 are executed.
[0145] Specifically, consortium blockchains can use the following rules for verification:
[0146] ① The number of conjectures is greater than or equal to N5;
[0147] ② The total number of guessers participating in this block construction accounts for more than N6% of the total number of possible guessers.
[0148] Specifically, public blockchains can use the following rules for verification:
[0149] ② The number of conjectures is greater than or equal to N7;
[0150] ②The total number of tokens held by the guessers who participated in this block construction is greater than or equal to N8;
[0151] ③ The total number of tokens held by the guessers who participated in this block construction accounts for more than or equal to N9% of the total number of tokens;
[0152] ③ The total token age held by the guessers participating in this block construction is greater than or equal to N. 10 .
[0153] Among them, N7, N8, N9, N 10 They're all numbers.
[0154] It should be noted that the verification rules mentioned above, whether for consortium blockchains or public blockchains, are designed to increase the randomness of the guessers and broaden their selection range. By setting relatively high qualification or resource thresholds overall, they aim to prevent collusion by small groups. These rules are merely examples, and in practice, verification rules can be tailored, modified, or added as needed.
[0155] Understandably, after the first and second checks pass, and assuming the data is valid, a matching score is calculated to select a new builder. The logic is as follows:
[0156] Figure 6 A flowchart illustrating a novel builder selection method according to an embodiment of this disclosure is shown schematically.
[0157] like Figure 6 As shown, the new builder selection method of this embodiment includes operations S610 to S620, which can at least partially perform the above-described operation S270.
[0158] In operation S610, the matching degree is calculated based on all the conjecture information in the conjecture domain and the conjecture information of any conjecturer.
[0159] According to an embodiment of this disclosure, the step of calculating the matching degree based on all the conjecture information in the conjecture domain and the conjecture information of any conjecturer includes: performing a hash calculation on all the conjecture information in the conjecture domain to obtain a block digest; performing a hash calculation on the conjecture information of any conjecturer to obtain a conjecture digest; and calculating the matching degree based on the block digest and the conjecture digest.
[0160] In operation S620, the guesser with the highest matching degree is selected as the builder of the next block.
[0161] Specifically, assume the data in the block after decrypting the conjecture value is H; the plaintext conjecture values of c1 (conjecturer 1), c2 (conjecturer 2)...c3 (conjecturer n) are v1, v2...v n We hypothesize that the matching function is F. Then the matching results r1, r2...r n The calculation formula is as follows:
[0162] (r1, r2…r n )=F(H,(v1,v2…v n ), (c1, c2…c n Formula 1
[0163] Where 0 <= r i If the value is less than 1, the one with the largest ri is selected after calculation, and the next blockchain can be constructed. The third parameter of the F function represents the sequential position of the conjecture in the block.
[0164] For example: First, perform a hash operation on the entire block containing only the plaintext conjecture value after decryption to obtain the block digest. Compare the digest with the conjecture value, and select the one with the smallest difference as the correct guess. If there are multiple correct guesses with the smallest difference, select the one that appears first in the block as the correct guess.
[0165] When it is understandable, this blockchain consensus method does not only involve the builders; for the guessers' side, the execution logic is as follows:
[0166] Figure 7 A flowchart illustrating another blockchain consensus method according to an embodiment of this disclosure is shown schematically.
[0167] like Figure 7 As shown, another blockchain consensus method in this embodiment includes operations S710 to S730, which can be executed by terminal devices 101, 102, 103 or server 105.
[0168] According to an embodiment of this disclosure, the blockchain includes multiple participating nodes. During the accounting process of the current block, the multiple participating nodes include multiple guessers and one builder, and the blockchain consensus method is applied to the guessers.
[0169] In operation S710, conjecture information is generated, wherein the conjecture information includes at least a conjecture value, and the conjecture value exists in encrypted form.
[0170] During the operation of S720, a conjecture message is sent to the builder.
[0171] In operation S730, after the builder records the conjecture information into the current block, a decryption key is sent. The decryption key is used to decrypt the conjecture value to obtain the decrypted conjecture value. The decrypted conjecture value is used to select the builder of the next block from the plurality of conjecturers.
[0172] According to embodiments of this disclosure, sending the decryption key includes: sending the decryption key to the entire network via broadcast.
[0173] Figure 8 A flowchart illustrating another blockchain consensus method according to an embodiment of this disclosure is shown schematically.
[0174] like Figure 8 As shown, another blockchain consensus method in this embodiment includes operations S810 to S820, which can be executed after the above-mentioned operation S730.
[0175] In operation S810, a block is received from the builder, the block including a conjecture domain, the conjecture domain including multiple conjecture information, the conjecture information including conjecture values, the conjecture values existing in ciphertext form.
[0176] In operation S820, the decryption key is received from other guessers, the decryption key being used to decrypt the guessed value to plaintext form.
[0177] In the embodiments disclosed herein, at least the following beneficial effects can be achieved:
[0178] 1. The received conjecture value exists in encrypted form. After the conjecture value falls into the block, the decryption key of the conjecturer is received, and the matching value is calculated based on the content of the conjecture value in plaintext. From multiple candidates, the builder of the next block is selected. This ensures that the current builder cannot tamper with the conjecture value, avoids the possibility of the builder cheating and manipulating the election, and ensures that the next builder is truly randomly selected, thus guaranteeing the security of the block.
[0179] 2. The blockchain consensus method disclosed in this embodiment is a phased implementation solution similar to a bidding process, applicable to both consortium blockchains and public blockchains by matching different verification rules. Compared to existing consortium blockchain consensus methods, although its operating efficiency is slightly reduced, it can support larger-scale blockchain networks and reduces the requirements for network reliability and throughput. Compared to existing public blockchain consensus methods, although it increases implementation complexity, it achieves consensus without relying on computing power, resulting in higher efficiency and lower resource consumption. Overall, this method fills the gap between consortium blockchains and public blockchains, has greater adaptability, and expands the application scope of blockchain.
[0180] Figure 9 A schematic diagram illustrating the full flow of a blockchain consensus method according to an embodiment of this disclosure is provided.
[0181] like Figure 9 As shown, the blockchain consensus method in this embodiment includes operations S901 to S913.
[0182] During S901 operation, the application system is initialized.
[0183] In operation S902, the builder collects speculative information about the current block.
[0184] In operation S903, the integrity of the conjectured data is verified.
[0185] In operation S904, the eligibility of the guesser is verified.
[0186] In operation S905, all conjectures are verified. If the verification fails, return to step S902 to continue collecting valid conjectures; otherwise, proceed to the next step.
[0187] In S906 operation, the builder constructs and broadcasts blocks to the entire network.
[0188] In operation S907, the legality of the constructed block is checked. If the constructed block is invalid, a new builder is selected and the process returns to step S902, while a penalty is imposed on the current builder. Otherwise, proceed to the next step.
[0189] In S908 operation, after receiving the newly constructed block, the guesser broadcasts the decryption key of its guess value to the entire network.
[0190] In operation S909, the timeliness of the broadcast key is checked. If the guesser fails to broadcast the key within the specified time, a new builder is selected and the process returns to step S902, while the overdue guesser is penalized; otherwise, proceed to the next step.
[0191] In operation S910, the ciphertext conjecture value data in the block is decrypted to obtain a block containing only the plaintext conjecture value.
[0192] In operation S911, the matching degree of each guesser is calculated according to the agreed rules.
[0193] In operation S912, the builder of the next block is selected.
[0194] In operation S913, rewards and penalties are calculated. One block construction is completed, and the construction of the next block begins.
[0195] Based on the aforementioned blockchain consensus method, this disclosure also provides a blockchain consensus device. The following will combine... Figure 10 and Figure 11 The device is described in detail.
[0196] Figure 10 A schematic block diagram of a blockchain consensus apparatus according to an embodiment of the present disclosure is shown.
[0197] like Figure 10 As shown, the blockchain consensus device 1000 of this embodiment includes a conjecture collection module 1010, a conjecture storage module 1020, a first verification module 1030, a second verification module 1040, a key receiving module 1050, a decryption module 1060, and a builder selection module 1070.
[0198] The conjecture collection module 1010 is used to collect conjecture information from the plurality of conjecturers, wherein the conjecture information includes conjecture values in encrypted form. In one embodiment, the conjecture collection module 1010 can be used to perform the operation S210 described above, which will not be repeated here.
[0199] The conjecture storage module 1020 is used to organize and record the conjecture information into the current block according to a preset block structure. In one embodiment, the conjecture storage module 1020 can be used to perform the operation S220 described above, which will not be repeated here.
[0200] The first verification module 1030 is used to perform a first verification process based on the conjectured information. In one embodiment, the first verification module 1030 can be used to perform the operation S230 described above, which will not be repeated here.
[0201] The second verification module 1040 is used to perform a second verification process based on the current block. In one embodiment, the second verification module 1040 can be used to perform the operation S240 described above, which will not be repeated here.
[0202] The key receiving module 1050 is used to receive the decryption key from the guesser. In one embodiment, the key receiving module 1050 can be used to perform the operation S250 described above, which will not be repeated here.
[0203] The decryption module 1060 is used to decrypt the conjectured value based on the decryption key if the first verification process and the second verification process pass. In one embodiment, the decryption module 1060 can be used to perform the operation S260 described above, which will not be repeated here.
[0204] The builder selection module 1070 is used to select the builder of the next block from the plurality of guessers based on the decrypted guess value. In one embodiment, the builder selection module 1070 can be used to perform the operation S270 described above, which will not be repeated here.
[0205] In the embodiments disclosed herein, at least the following beneficial effects can be achieved:
[0206] 1. The received conjecture value exists in encrypted form. After the conjecture value falls into the block, the decryption key of the conjecturer is received, and the matching value is calculated based on the content of the conjecture value in plaintext. From multiple candidates, the builder of the next block is selected. This ensures that the current builder cannot tamper with the conjecture value, avoids the possibility of the builder cheating and manipulating the election, and ensures that the next builder is truly randomly selected, thus guaranteeing the security of the block.
[0207] 2. The blockchain consensus method disclosed in this embodiment is a phased implementation solution similar to a bidding process, applicable to both consortium blockchains and public blockchains by matching different verification rules. Compared to existing consortium blockchain consensus methods, although its operating efficiency is slightly reduced, it can support larger-scale blockchain networks and reduces the requirements for network reliability and throughput. Compared to existing public blockchain consensus methods, although it increases implementation complexity, it achieves consensus without relying on computing power, resulting in higher efficiency and lower resource consumption. Overall, this method fills the gap between consortium blockchains and public blockchains, has greater adaptability, and expands the application scope of blockchain.
[0208] According to embodiments of this disclosure, the conjecture information further includes: the ID of the previous block, the ID of the current blockchain builder, the digital signature of the conjecturer, and the token held by the conjecturer. The preset block organization structure includes at least a conjecture domain, and the conjecture storage module is used to store the conjecture information in the conjecture domain.
[0209] According to embodiments of this disclosure, the first verification module is configured to: for consortium blockchains, determine whether the guesser's digital signature is a specified digital signature, wherein the specified digital signature is granted the right to participate in blockchain construction; and / or determine whether the number of times the guesser has acted as a builder consecutively is greater than a first threshold; for public blockchains, determine whether the number of tokens held by the guesser is greater than a second threshold; and / or determine whether the token age held by the guesser is greater than a third threshold; and / or determine whether the number of times the guesser has acted as a builder consecutively is greater than a fourth threshold.
[0210] According to embodiments of this disclosure, the second verification module is configured to: for consortium blockchains, determine whether the number of speculative information in the current blockchain is greater than or equal to a fifth threshold; and / or determine whether the ratio of the number of speculators in the current blockchain to the total number of speculators is greater than a sixth threshold; for public blockchains, determine whether the number of speculative information in the current blockchain is greater than or equal to a seventh threshold; and / or determine whether the total number of tokens held by speculators in the current block is greater than an eighth threshold; and / or determine whether the ratio of the total number of tokens held by speculators in the current block to the total number of tokens is greater than a ninth threshold; and / or determine whether the total token age held by speculators in the current block is greater than a tenth threshold.
[0211] According to an embodiment of this disclosure, the builder selection module is used to calculate the matching degree based on all the conjecture information in the conjecture domain and the conjecture information of any conjecturer; and to select the conjecturer with the highest matching degree as the builder of the next block.
[0212] According to an embodiment of this disclosure, the builder selection module is configured to perform hash calculations on all conjecture information in the conjecture domain to obtain a block digest; perform hash calculations on the conjecture information of any conjecturer to obtain a conjecture digest; and calculate the matching degree based on the block digest and the conjecture digest.
[0213] According to embodiments of this disclosure, the apparatus further includes a reward and punishment module, configured to reward the guesser if the first verification process passes; and / or reward the builder if the second verification process passes; and / or punish the guesser if the guesser's decryption key is not received in a timely manner.
[0214] According to an embodiment of this disclosure, the apparatus further includes a block broadcasting module for propagating the current block via a network-wide broadcast.
[0215] According to an embodiment of this disclosure, the key receiving module is used to receive the decryption key, which is disseminated by the guesser via a network-wide broadcast.
[0216] According to embodiments of this disclosure, any multiple modules among the conjecture collection module 1010, conjecture storage module 1020, first verification module 1030, second verification module 1040, key receiving module 1050, decryption module 1060, and builder selection module 1070 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the conjecture collection module 1010, conjecture storage module 1020, first verification module 1030, second verification module 1040, key receiving module 1050, decryption module 1060, and builder selection module 1070 can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or any other reasonable means of integrating or packaging circuits, or implemented in hardware or firmware, or in any one of software, hardware, and firmware implementations, or in a suitable combination of any of these. Alternatively, at least one of the conjecture collection module 1010, conjecture storage module 1020, first verification module 1030, second verification module 1040, key receiving module 1050, decryption module 1060, and builder selection module 1070 can be at least partially implemented as computer program modules, which can perform corresponding functions when the computer program module is run.
[0217] Figure 11 A schematic block diagram of a blockchain consensus apparatus according to an embodiment of the present disclosure is shown.
[0218] like Figure 11 As shown, the blockchain consensus device 1100 of this embodiment includes a conjecture generation module 1110, a conjecture sending module 1120, and a key sending module 1130.
[0219] The conjecture generation module 1110 is used to generate conjecture information, wherein the conjecture information includes at least a conjecture value, and the conjecture value exists in encrypted form. In one embodiment, the conjecture generation module 1110 can be used to perform the operation S710 described above, which will not be repeated here.
[0220] The conjecture sending module 1120 is used to send conjecture information to the builder. In one embodiment, the conjecture sending module 1120 can be used to perform the operation S720 described above, which will not be repeated here.
[0221] The key sending module 1130 is used to send a decryption key after the builder records the conjecture information into the current block. The decryption key is used to decrypt the conjecture value to obtain a decrypted conjecture value, which is then used to select the builder of the next block from among the multiple conjecturers. In one embodiment, the key sending module 1130 can be used to perform the operation S730 described above, which will not be repeated here.
[0222] In the embodiments disclosed herein, at least the following beneficial effects can be achieved:
[0223] 1. The received conjecture value exists in encrypted form. After the conjecture value falls into the block, the decryption key of the conjecturer is received, and the matching value is calculated based on the content of the conjecture value in plaintext. From multiple candidates, the builder of the next block is selected. This ensures that the current builder cannot tamper with the conjecture value, avoids the possibility of the builder cheating and manipulating the election, and ensures that the next builder is truly randomly selected, thus guaranteeing the security of the block.
[0224] 2. The blockchain consensus method disclosed in this embodiment is a phased implementation solution similar to a bidding process, applicable to both consortium blockchains and public blockchains by matching different verification rules. Compared to existing consortium blockchain consensus methods, although its operating efficiency is slightly reduced, it can support larger-scale blockchain networks and reduces the requirements for network reliability and throughput. Compared to existing public blockchain consensus methods, although it increases implementation complexity, it achieves consensus without relying on computing power, resulting in higher efficiency and lower resource consumption. Overall, this method fills the gap between consortium blockchains and public blockchains, has greater adaptability, and expands the application scope of blockchain.
[0225] According to embodiments of this disclosure, the key sending module is used to send the decryption key to the entire network in a broadcast manner.
[0226] According to an embodiment of this disclosure, the apparatus further includes a monitoring module for receiving a block from the builder, the block including a conjecture domain, the conjecture domain including multiple conjecture information, the conjecture information including a conjecture value, the conjecture value existing in ciphertext form; and receiving the decryption key from other conjecturers, the decryption key being used to decrypt the conjecture value to plaintext form.
[0227] According to embodiments of this disclosure, any plurality of modules among the conjecture generation module 1110, conjecture sending module 1120, and key sending module 1130 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the conjecture generation module 1110, conjecture sending module 1120, and key sending module 1130 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the conjecture generation module 1110, the conjecture sending module 1120, and the key sending module 1130 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0228] Figure 12 A block diagram of an electronic device suitable for implementing a blockchain consensus method according to an embodiment of the present disclosure is shown schematically.
[0229] like Figure 12As shown, an electronic device 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage portion 1208 into a random access memory (RAM) 1203. The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0230] RAM 1203 stores various programs and data required for the operation of electronic device 1200. Processor 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Processor 1201 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1202 and / or RAM 1203. It should be noted that the programs may also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0231] According to embodiments of this disclosure, the electronic device 1200 may further include an input / output (I / O) interface 1205, which is also connected to the bus 1204. The electronic device 1200 may also include one or more of the following components connected to the I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1210 as needed so that computer programs read from it can be installed into the storage section 1208 as needed.
[0232] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0233] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 1202 and / or RAM 1203 and / or one or more memories other than ROM 1202 and RAM 1203 described above.
[0234] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.
[0235] When the computer program is executed by the processor 1201, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0236] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1209, and / or installed from the removable medium 1211. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0237] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0238] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0239] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0240] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0241] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A blockchain consensus method, wherein, The blockchain includes multiple participating nodes. During the accounting process of the current block, these multiple participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the builder. The method includes: Collect the conjecture information of the multiple conjecturers, wherein the conjecture information includes conjecture values in ciphertext form; Organize the conjecture information into the current block according to the preset block structure; The first verification process is performed based on the conjectured information; Perform a second verification process based on the current block; Receive the decryption key from the guesser; If the first and second verification processes pass, the conjectured value is decrypted based on the decryption key; and Based on the decrypted conjecture value, the builder of the next block is selected from the plurality of conjecturers; The preset block structure organization includes at least a conjecture domain; The step of selecting the builder of the next block from the plurality of guessers based on the decrypted conjecture value includes: calculating the matching degree based on the full amount of conjecture information in the conjecture domain and the conjecture information of any conjecturer; and selecting the conjecturer with the highest matching degree as the builder of the next block.
2. The method according to claim 1, wherein, The conjectured information also includes: the ID of the previous block, the ID of the current blockchain builder, the digital signature of the conjecturer, and the tokens held by the conjecturer. The step of organizing the conjecture information into the current block according to a preset block structure includes: The conjectured information is stored in the conjecture domain.
3. The method according to claim 2, wherein, The first verification process based on the conjectured information includes: For consortium blockchains: Determine whether the guesser's digital signature is a specified digital signature, wherein the specified digital signature is the one granted the right to participate in the construction of the blockchain; and / or Determine whether the number of times the guesser has acted as a builder consecutively exceeds a first threshold; For public blockchains: Determine whether the number of tokens held by the guesser exceeds the second threshold; and / or Determine whether the token age held by the hypothesizer is greater than a third threshold; and / or Determine whether the number of times the guesser has acted as the builder consecutively is greater than a fourth threshold.
4. The method according to claim 2 or 3, wherein, The second verification process based on the current block includes: For consortium blockchains: Determine whether the amount of the conjectured information in the current blockchain is greater than or equal to the fifth threshold; and / or Determine whether the ratio of the number of guessers in the current blockchain to the total number of guessers is greater than a sixth threshold; For public blockchains: Determine whether the amount of the conjectured information in the current blockchain is greater than or equal to the seventh threshold; and / or Determine whether the total number of tokens held by the guesser in the current block is greater than the eighth threshold; and / or Determine whether the ratio of the total number of tokens held by the guesser in the current block to the total number of tokens is greater than the ninth threshold; and / or It is determined that the total token age held by the guesser in the current block is greater than the tenth threshold.
5. The method according to claim 4, wherein, The calculation of the matching degree based on all the conjecture information in the conjecture domain and the conjecture information of any conjecturer includes: Perform hash calculations on all the conjectured information in the conjecture domain to obtain a block digest; Perform a hash calculation on the conjecture information of any conjecturer to obtain a conjecture digest; and The matching degree is calculated based on the block digest and the conjecture digest.
6. The method according to any one of claims 1-3 and 5, wherein, After performing the first verification process based on the conjectured information, and after performing the second verification process based on the current block, The method further includes: If the first verification process passes, the guesser is rewarded; and / or If the second verification process passes, the builder is rewarded; and / or If the guesser's decryption key is not received in a timely manner, the guesser shall be punished.
7. The method according to any one of claims 1-3 and 5, wherein, After the second verification process is performed based on the current block, The method also includes: propagating the current block via network-wide broadcast.
8. The method according to claim 7, wherein, The receiving of the decryption key from the guesser includes: Receive the decryption key, which was broadcast across the entire network by the guesser.
9. A blockchain consensus method, wherein, The blockchain comprises multiple participating nodes. During the accounting process of the current block, these participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the guessers. The method includes: Generate conjecture information, wherein the conjecture information includes at least a conjecture value, and the conjecture value exists in ciphertext form; Send speculative information to the builder; and After the builder records the conjecture information into the current block, a decryption key is sent. The decryption key is used to decrypt the conjecture value to obtain the decrypted conjecture value. The decrypted conjecture value is used to select the builder of the next block from the multiple conjecturers. The block includes a preset block structure organization, and the block structure organization includes at least a conjecture domain; The builder of the next block is: based on the full set of conjecture information in the conjecture domain and the conjecture information of any conjecturer, calculate the matching degree; and select the conjecturer with the highest matching degree as the builder of the next block.
10. The method according to claim 9, wherein, Sending the decryption key includes: The decryption key is sent to the entire network via broadcast.
11. The method according to claim 10, wherein, After sending the decryption key, the method further includes: Receive a block from the builder, the block including a conjecture domain, the conjecture domain including multiple conjecture information. The conjecture information includes a conjecture value, which is stored in encrypted form; and Receive the decryption key from other guessers, the decryption key being used to decrypt the guessed value to plaintext form.
12. A blockchain consensus device, wherein, The blockchain includes multiple participating nodes. During the accounting process of the current block, these multiple participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the builder. The device includes: A conjecture collection module is used to collect conjecture information from the multiple conjecturers, wherein the conjecture information includes conjecture values in ciphertext form; The conjecture storage module is used to organize and record the conjecture information into the current block according to a preset block structure; The first verification module is used to perform a first verification process based on the conjectured information; The second verification module is used to perform a second verification process based on the current block; A key receiving module is used to receive the decryption key from the guesser; The decryption module is configured to decrypt the conjectured value based on the decryption key if the first verification process and the second verification process pass; and The builder selection module is used to select the builder of the next block from the plurality of guessers based on the decrypted guess value; The preset block structure organization includes at least a conjecture domain; The step of selecting the builder of the next block from the plurality of guessers based on the decrypted conjecture value includes: calculating the matching degree based on the full amount of conjecture information in the conjecture domain and the conjecture information of any conjecturer; and selecting the conjecturer with the highest matching degree as the builder of the next block.
13. A blockchain consensus device, wherein, The blockchain comprises multiple participating nodes. During the accounting process of the current block, these participating nodes include multiple guessers and one builder. The blockchain consensus method is applied to the guessers. The device includes: A conjecture generation module is used to generate conjecture information, wherein the conjecture information includes at least a conjecture value, and the conjecture value exists in encrypted form; The conjecture sending module is used to send conjecture information to the builder; and The key sending module is used to send a decryption key after the builder records the conjecture information into the current block, wherein the decryption key is used to decrypt the conjecture value to obtain the decrypted conjecture value, wherein the decrypted conjecture value is used to select the builder of the next block from the plurality of conjecturers; The block includes a preset block structure organization, and the block structure organization includes at least a conjecture domain; The builder of the next block is: based on the full set of conjecture information in the conjecture domain and the conjecture information of any conjecturer, calculate the matching degree; and select the conjecturer with the highest matching degree as the builder of the next block.
14. An electronic device comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 11.
15. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 11.
16. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Identity recognition and verification method and system based on block chain wallet
CN113487321A
Proof of majority block consensus method for generating and uploading a block to a blockchain
US20200366495A1