CN113472750A - Block generation method, node and block generation system - Google Patents

Block generation method, node and block generation system Download PDF

Info

Publication number
CN113472750A
CN113472750A CN202110621674.3A CN202110621674A CN113472750A CN 113472750 A CN113472750 A CN 113472750A CN 202110621674 A CN202110621674 A CN 202110621674A CN 113472750 A CN113472750 A CN 113472750A
Authority
CN
China
Prior art keywords
block
node
selecting
consensus algorithm
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110621674.3A
Other languages
Chinese (zh)
Other versions
CN113472750B (en
Inventor
李董
张勋
张呈宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202110621674.3A priority Critical patent/CN113472750B/en
Publication of CN113472750A publication Critical patent/CN113472750A/en
Application granted granted Critical
Publication of CN113472750B publication Critical patent/CN113472750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a block generation method, a node and a block generation system, wherein the block generation method comprises the following steps: selecting a block generation node in a block chain; selecting a consensus algorithm by adopting a preset random function; selecting a block verification node in the blockchain; under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain; and if the local node is the block verification node, verifying the generated block, and if the generated block passes verification, broadcasting the generated block in the block chain. In the embodiment of the invention, when the block is generated every time, the block generating node, the consensus algorithm and the block verifying node are reselected instead of generating the block by adopting the fixed block generating node, the consensus algorithm and the block verifying node, so that the possibility of being attacked is reduced.

Description

Block generation method, node and block generation system
Technical Field
The present invention relates to the field of block chains, and in particular, to a block generation method, a node, and a block generation system.
Background
With the development of a period of time, the technology has been well developed for public chains represented by bitcoin and ether house (Ethereum), and for private chains represented by hyper ledger (superhedger) and alliance chains. A new generation of distributed ledger technology represented by Directed Acyclic Graph (DAG) adopted in IOTA is in a rapid development stage.
The core of the blockchain is decentralization, distrust removal, tamper resistance, forgery resistance and traceability, and the blockchain has application value in storage, management and sharing of high-value data.
The current block generation method adopts a single consensus mechanism, so that consensus is easily centralized in one direction, and block generation nodes and verification nodes are fixed, so that a target is established for hacker attack.
Disclosure of Invention
The invention provides a block generation method, a node and a block generation system, which can reduce the possibility of being attacked.
A first aspect of the present invention provides a block generation method, including:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain;
and if the local node is the block verification node, verifying the generated block, and if the generated block passes verification, broadcasting the generated block in the block chain.
In some exemplary embodiments, the selecting a tile generation node in the blockchain comprises:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
In some exemplary embodiments, the node corresponding to the credential satisfying the preset condition includes: n nodes with minimum credentials; wherein N is an integer greater than or equal to 1.
In some exemplary embodiments, the selecting the consensus algorithm by using a preset random function includes:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
In some exemplary embodiments, the selecting a consensus algorithm according to minimal credentials comprises:
selecting a consensus algorithm corresponding to a remainder obtained by dividing the minimum certificate by M;
wherein, M is the number of consensus algorithms included in a preset consensus pool.
In some exemplary embodiments, the selecting a block verification node in the blockchain comprises:
selecting X nodes of a second other node in the blockchain except the block generating node as the block verifying node;
wherein X is greater than or equal to a preset threshold corresponding to the selected consensus algorithm.
A second aspect of the present invention provides a node comprising:
a selection module to:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
the block generation module is used for generating a block according to the selected consensus algorithm under the condition that the node is the block generation node, and sending the generated block to the selected block verification node through the block chain;
and the block verification module is used for verifying the generated block under the condition that the node is the block verification node, and broadcasting the generated block in the block chain under the condition that the generated block passes verification.
In some exemplary embodiments, the selecting node is specifically configured to implement the selecting a block generating node in a block chain by:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
In some exemplary embodiments, the selection module is specifically configured to implement the selecting a consensus algorithm by using a preset random function in the following manner:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
A third aspect of the present invention provides a block generation system, comprising at least one node;
the node is configured to:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain;
and if the local node is the block verification node, verifying the generated block, and if the generated block passes verification, broadcasting the generated block in the block chain.
The invention has the following advantages:
in the embodiment of the invention, when the block is generated every time, the block generating node, the consensus algorithm and the block verifying node are reselected instead of generating the block by adopting the fixed block generating node, the consensus algorithm and the block verifying node, so that the possibility of being attacked is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a block generation method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a node according to another embodiment of the present invention;
fig. 3 is a block diagram of a block generation system according to another embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
As used in this disclosure, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
When the terms "comprises" and/or "comprising … …" are used in this disclosure, the presence of stated features, integers, steps, operations, elements, and/or components are specified, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Embodiments of the present disclosure may be described with reference to plan and/or cross-sectional views in light of idealized schematic illustrations of the present disclosure. Accordingly, the example illustrations can be modified in accordance with manufacturing techniques and/or tolerances.
Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 is a flowchart of a block generation method according to an embodiment of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a block generation method, including:
step 100, selecting a block generation node in the block chain.
In some exemplary embodiments, after selecting the tile generation node in the blockchain, the method further comprises:
broadcasting the block generation node selected by the node in the block chain;
receiving a block generation node selected by a first other node broadcast by the first other node except the node in the block chain;
and under the condition that the block generating node selected by the node is the same as the block generating node selected by the first other node, determining that the block generating node selected by the node is correct.
In some exemplary embodiments, in a case where the block generation node selected by the present node is not the same as the block generation node selected by the at least one first other node, the method further includes:
broadcasting a message for indicating that the selection of the block generation node is wrong in the block chain, and re-executing the step of selecting the block generation node in the block chain.
In the embodiment of the present invention, the node refers to an execution subject of the block generation method according to the embodiment of the present invention.
In some exemplary embodiments, that the block generation node selected by the node is identical to the block generation node selected by a certain first other node means that the block generation node selected by the node is identical to the block generation node selected by a certain first other node.
In some exemplary embodiments, selecting a tile generation node in the blockchain comprises:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
In some exemplary embodiments, the previous block refers to a block located before a block that needs to be generated currently in the block chain.
In some exemplary embodiments, the hash value of the previous block refers to a hash value obtained by performing a hash calculation on at least one of data stored in the previous block and information of the previous block.
In some exemplary embodiments, the current block refers to a block that needs to be generated currently, and the current block sequence number refers to a sequence number obtained by adding 1 to a previous block sequence number.
In some exemplary embodiments, the credential of the local node may be calculated by using a Verifiable Random Function (VRF) according to a private key of the local node, a hash value of a previous block, and a current block number. Of course, other functions or algorithms may be used to calculate the credentials of the node, and the specific use of what function or algorithm to calculate the credentials of the node is not intended to limit the scope of the embodiments of the present invention.
In some example embodiments, the credential of the first other node may be computed using a Verifiable Random Function (VRF) based on a private key of the first other node, a hash value of a previous block, and a current block number. Of course, other functions or algorithms may be used to calculate the credentials of the first other node, and what function or algorithm is specifically used to calculate the credentials of the first other node is not used to limit the protection scope of the embodiments of the present invention.
In some exemplary embodiments, the node corresponding to the credential meeting the preset condition may be set at will according to actual needs, and what kind of conditions are specifically set is not used to limit the protection scope of the embodiments of the present invention. For example, it may be set that the node corresponding to the credential satisfying the preset condition includes: n nodes with minimum credentials; wherein N is an integer greater than or equal to 1.
And 101, selecting a consensus algorithm by adopting a preset random function.
In some exemplary embodiments, after selecting the consensus algorithm by using a preset random function, the method further includes:
broadcasting the consensus algorithm selected by the node in the block chain;
receiving a consensus algorithm selected by a first other node broadcast by the first other node except the node in the block chain;
and under the condition that the consensus algorithm selected by the node is the same as the consensus algorithm selected by the first other node, determining that the consensus algorithm selected by the node is correct.
In some exemplary embodiments, in a case that the consensus algorithm selected by the present node is not the same as the consensus algorithm selected by the at least one first other node, the method further includes:
and broadcasting a message for indicating that the consensus algorithm is selected wrongly in the block chain, and re-executing the step of selecting the consensus algorithm by adopting a preset random function.
In some exemplary embodiments, selecting the consensus algorithm using a preset random function includes:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
In some exemplary embodiments, selecting the consensus algorithm according to the minimum credential comprises:
selecting a consensus algorithm corresponding to a remainder obtained by dividing the minimum certificate by M;
wherein, M is the number of consensus algorithms included in a preset consensus pool.
The embodiment of the present invention does not limit the specific implementation of the random function, and the specific implementation of the random function is not used to limit the protection scope of the embodiment of the present invention.
In some exemplary embodiments, the consensus algorithm in the consensus pool may be a single consensus algorithm or a combined consensus algorithm. The single consensus algorithm may be any one of a workload Proof consensus algorithm of a workload Proof (POW) type, a rights and interests Proof consensus mechanism equity Proof (POS) type algorithm, a trusted Proof of rights (DPOS) consensus algorithm, and a Practical Byzantine Fault Tolerant (PBFT) algorithm, and the combined consensus algorithm may be a combination of two or more of the above consensus algorithms.
Step 102, selecting a block verification node in the block chain.
In some exemplary embodiments, after selecting a block verification node in the blockchain, the method further comprises:
broadcasting the block verification node selected by the node in the block chain;
receiving a block verification node selected by a first other node broadcast by the first other node except the node in the block chain;
and under the condition that the block verification node selected by the node is the same as the block verification node selected by the first other node, determining that the block verification node selected by the node is correct.
In some exemplary embodiments, in a case where the block verification node selected by the present node is not the same as the block verification node selected by the at least one first other node, the method further comprises:
broadcasting a message for indicating that the block verification node selection is wrong in the block chain, and re-executing the step of selecting the block verification node in the block chain.
In some exemplary embodiments, that the block verification node selected by the node is identical to the block verification node selected by a certain first other node means that the block verification node selected by the node is identical to the block verification node selected by a certain first other node.
In some exemplary embodiments, selecting a block verification node in a blockchain comprises:
selecting X nodes of a second other node in the blockchain except the block generating node as the block verifying node;
wherein X is greater than or equal to a preset threshold corresponding to the selected consensus algorithm.
In the embodiment of the invention, the block verification nodes required by each consensus algorithm are different, and the corresponding number of block verification nodes is selected based on the number of the block verification nodes required by the selected consensus algorithm.
And 103, under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain.
And 104, verifying the generated block when the local node is the block verification node, and broadcasting the generated block in the block chain when the generated block is verified.
In the embodiment of the invention, when the block is generated every time, the block generating node, the consensus algorithm and the block verifying node are reselected instead of generating the block by adopting the fixed block generating node, the consensus algorithm and the block verifying node, so that the possibility of being attacked is reduced.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
Fig. 2 is a block diagram of a node according to another embodiment of the present invention.
Referring to fig. 2, another embodiment of the present invention provides a node, including:
a selecting module 201, configured to:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
a block generation module 202, configured to generate a block according to the selected consensus algorithm when the node is the block generation node, and send the generated block to the selected block verification node through the block chain;
a block verification module 203, configured to verify the generated block if the local node is the block verification node, and broadcast the generated block in the block chain if the generated block passes verification.
In some exemplary embodiments, the selecting node 201 is specifically configured to implement the selecting a block generating node in a block chain by:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
In some exemplary embodiments, the node corresponding to the credential satisfying the preset condition includes: n nodes with minimum credentials; wherein N is an integer greater than or equal to 1.
In some exemplary embodiments, the selecting module 201 is specifically configured to implement the selecting consensus algorithm by using a preset random function in the following manner:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
In some exemplary embodiments, the selection module 201 is specifically configured to implement a select consensus algorithm based on minimal credentials in the following manner:
selecting a consensus algorithm corresponding to a remainder obtained by dividing the minimum certificate by M;
wherein, M is the number of consensus algorithms included in a preset consensus pool.
In some exemplary embodiments, the selection module 201 is specifically configured to implement the selection of a block verification node in a block chain by:
selecting X nodes of a second other node in the blockchain except the block generating node as the block verifying node;
wherein X is greater than or equal to a preset threshold corresponding to the selected consensus algorithm.
The specific implementation process of the node according to the embodiment of the present invention is the same as the specific implementation process of the block generation method according to the foregoing embodiment, and is not described herein again.
Fig. 3 is a block diagram of a block generation system according to another embodiment of the present invention.
Referring to fig. 3, another embodiment of the present invention provides a block generation system, including at least one node 301;
the node 301 is configured to:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain;
and if the local node is the block verification node, verifying the generated block, and if the generated block passes verification, broadcasting the generated block in the block chain.
In some exemplary embodiments, node 301 is specifically configured to implement the selecting a chunk generating node in a chunk chain in the following manner:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
In some exemplary embodiments, the node corresponding to the credential satisfying the preset condition includes: n nodes with minimum credentials; wherein N is an integer greater than or equal to 1.
In some exemplary embodiments, the node 301 is specifically configured to implement the consensus algorithm using the preset random function selection in the following manner:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
In some exemplary embodiments, node 301 is specifically configured to implement a consensus by minimum credential selection algorithm in the following manner:
selecting a consensus algorithm corresponding to a remainder obtained by dividing the minimum certificate by M;
wherein, M is the number of consensus algorithms included in a preset consensus pool.
In some exemplary embodiments, node 301 is specifically configured to implement the selection of a block verification node in a block chain in the following manner:
selecting X nodes of a second other node in the blockchain except the block generating node as the block verifying node;
wherein X is greater than or equal to a preset threshold corresponding to the selected consensus algorithm.
The specific implementation process of the block generation system of the embodiment of the present invention is the same as the specific implementation process of the block generation method of the foregoing embodiment, and is not described herein again.
Each module in the present embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, or may be implemented by a combination of a plurality of physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
The present embodiments also provide an electronic device, comprising one or more processors; the storage device stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the block generation method provided in this embodiment, and in order to avoid repeated descriptions, detailed steps of the block generation method are not described herein again.
The present embodiment further provides a computer readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the block generating method provided in the present embodiment, and in order to avoid repeated descriptions, specific steps of the block generating method are not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments instead of others, combinations of features of different embodiments are meant to be within the scope of the embodiments and form different embodiments.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A block generation method, comprising:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain;
and if the local node is the block verification node, verifying the generated block, and if the generated block passes verification, broadcasting the generated block in the block chain.
2. The tile generation method of claim 1, wherein said selecting a tile generation node in a tile chain comprises:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
3. The block generation method according to claim 2, wherein the node corresponding to the credential satisfying the preset condition comprises: n nodes with minimum credentials; wherein N is an integer greater than or equal to 1.
4. The block generation method according to claim 2, wherein said selecting the consensus algorithm using the preset random function comprises:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
5. The tile generation method of claim 4, wherein said selecting a consensus algorithm according to minimal credentials comprises:
selecting a consensus algorithm corresponding to a remainder obtained by dividing the minimum certificate by M;
wherein, M is the number of consensus algorithms included in a preset consensus pool.
6. The tile generation method of claim 1, wherein said selecting a tile verification node in a tile chain comprises:
selecting X nodes of a second other node in the blockchain except the block generating node as the block verifying node;
wherein X is greater than or equal to a preset threshold corresponding to the selected consensus algorithm.
7. A node, comprising:
a selection module to:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
the block generation module is used for generating a block according to the selected consensus algorithm under the condition that the node is the block generation node, and sending the generated block to the selected block verification node through the block chain;
and the block verification module is used for verifying the generated block under the condition that the node is the block verification node, and broadcasting the generated block in the block chain under the condition that the generated block passes verification.
8. The node according to claim 7, wherein the selection node is specifically configured to implement the selection of the chunk generation node in the chunk chain by:
calculating the certificate of the local node according to the private key of the local node, the hash value of the previous block and the serial number of the current block, and broadcasting the certificate of the local node in the block chain;
receiving a certificate of a first other node in the block chain, which is calculated by the first other node except the local node according to a private key of the first other node, the hash value of the previous block and the current block sequence number and is broadcasted in the block chain;
and selecting a node corresponding to the certificate meeting the preset condition from the certificate of the node and the certificates of the first other nodes as a block generation node.
9. The node according to claim 8, wherein the selection module is specifically configured to implement the selection consensus algorithm using a preset random function in the following manner:
selecting a minimum credential among the credentials of the local node and the credentials in the other nodes;
selecting the consensus algorithm according to the minimum credential.
10. A block generation system comprising at least one node;
the node is configured to:
selecting a block generation node in a block chain;
selecting a consensus algorithm by adopting a preset random function;
selecting a block verification node in the blockchain;
under the condition that the node is the block generation node, generating a block according to the selected consensus algorithm, and sending the generated block to the selected block verification node through the block chain;
and if the local node is the block verification node, verifying the generated block, and if the generated block passes verification, broadcasting the generated block in the block chain.
CN202110621674.3A 2021-06-03 2021-06-03 Block generation method, node and block generation system Active CN113472750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110621674.3A CN113472750B (en) 2021-06-03 2021-06-03 Block generation method, node and block generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110621674.3A CN113472750B (en) 2021-06-03 2021-06-03 Block generation method, node and block generation system

Publications (2)

Publication Number Publication Date
CN113472750A true CN113472750A (en) 2021-10-01
CN113472750B CN113472750B (en) 2023-03-24

Family

ID=77872247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110621674.3A Active CN113472750B (en) 2021-06-03 2021-06-03 Block generation method, node and block generation system

Country Status (1)

Country Link
CN (1) CN113472750B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107450981A (en) * 2017-05-31 2017-12-08 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and apparatus
CN109167661A (en) * 2018-09-27 2019-01-08 福建福链科技有限公司 A kind of Byzantine failure tolerance common recognition method and terminal applied to alliance's chain
CN109347917A (en) * 2018-09-14 2019-02-15 北京沃杰知识产权有限公司 Block chain data common recognition processing method, system, storage medium and electronic equipment
CN110210865A (en) * 2019-06-17 2019-09-06 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain
CN111062811A (en) * 2019-12-02 2020-04-24 远光软件股份有限公司 Block chain consensus method, system and storage medium
CN111078787A (en) * 2019-11-11 2020-04-28 重庆邮电大学 Block chain consensus method based on random number mapping
CN111131184A (en) * 2019-12-06 2020-05-08 长沙理工大学 Autonomous adjusting method of block chain consensus mechanism
CN112163856A (en) * 2020-10-09 2021-01-01 北京邮电大学 Consensus method and system for block chain and Internet of things fusion scene
CN112445612A (en) * 2019-08-27 2021-03-05 埃森哲环球解决方案有限公司 AI-based blockchain hybrid consensus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107450981A (en) * 2017-05-31 2017-12-08 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and apparatus
CN109347917A (en) * 2018-09-14 2019-02-15 北京沃杰知识产权有限公司 Block chain data common recognition processing method, system, storage medium and electronic equipment
CN109167661A (en) * 2018-09-27 2019-01-08 福建福链科技有限公司 A kind of Byzantine failure tolerance common recognition method and terminal applied to alliance's chain
CN110210865A (en) * 2019-06-17 2019-09-06 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain
CN112445612A (en) * 2019-08-27 2021-03-05 埃森哲环球解决方案有限公司 AI-based blockchain hybrid consensus
CN111078787A (en) * 2019-11-11 2020-04-28 重庆邮电大学 Block chain consensus method based on random number mapping
CN111062811A (en) * 2019-12-02 2020-04-24 远光软件股份有限公司 Block chain consensus method, system and storage medium
CN111131184A (en) * 2019-12-06 2020-05-08 长沙理工大学 Autonomous adjusting method of block chain consensus mechanism
CN112163856A (en) * 2020-10-09 2021-01-01 北京邮电大学 Consensus method and system for block chain and Internet of things fusion scene

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘昊哲等: "基于信誉度的主从多链区块链共识机制", 《南京理工大学学报》 *

Also Published As

Publication number Publication date
CN113472750B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN107360001B (en) Digital certificate management method, device and system
CN109327528B (en) Node management method and device based on block chain
CN108683539B (en) Block chain network management method, block chain network management device, block chain network management medium and electronic equipment
CN108646983B (en) Processing method and device for storing service data on block chain
CN110245956B (en) Asynchronous multi-chain based block chain transaction confirmation method and system
CN108320155B (en) Method for realizing block chain consensus mechanism
CN108769264B (en) Block chain domain division method
CN111526217A (en) Consensus method and system in block chain
CN108696356B (en) Block chain-based digital certificate deleting method, device and system
CN106650496B (en) Data processing method and device
CN108737105B (en) Method and device for retrieving private key, private key equipment and medium
CN111488134A (en) Public random number generation method and device based on block chain
CN112116349A (en) High-throughput-rate-oriented graph type account book randomization consensus method and device
CN113472750B (en) Block generation method, node and block generation system
CN114090511A (en) File access method, block chain system, electronic device and computer readable medium
CN113420321A (en) Electronic bidding method, bidding node, first bidding node and third party node
CN113542405A (en) Block chain-based network communication system, method, device and storage medium
CN112261427A (en) Malicious node identification method and device and electronic equipment
CN112737793B (en) Method and device for updating block chain domain name configuration
CN114338673A (en) Transaction data processing method, device, equipment, system and storage medium
CN113225191B (en) Generation method and device of consensus node, storage medium and processor
CN112037055B (en) Transaction processing method, device, electronic equipment and readable storage medium
CN112116470B (en) Method and device for creating schema book based on random witnesses
CN111369246B (en) Calling authentication method and device of intelligent contract, electronic equipment and storage medium
EP4173223A1 (en) Verification key generation in distributed networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant