CN116545765B - Node consensus method, device, equipment and medium of block chain network - Google Patents

Node consensus method, device, equipment and medium of block chain network Download PDF

Info

Publication number
CN116545765B
CN116545765B CN202310760183.6A CN202310760183A CN116545765B CN 116545765 B CN116545765 B CN 116545765B CN 202310760183 A CN202310760183 A CN 202310760183A CN 116545765 B CN116545765 B CN 116545765B
Authority
CN
China
Prior art keywords
block
period
random number
chain network
node
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.)
Active
Application number
CN202310760183.6A
Other languages
Chinese (zh)
Other versions
CN116545765A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310760183.6A priority Critical patent/CN116545765B/en
Publication of CN116545765A publication Critical patent/CN116545765A/en
Application granted granted Critical
Publication of CN116545765B publication Critical patent/CN116545765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • 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/40Network security protocols
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a node consensus method, device, equipment and medium of a blockchain network, relates to the technical field of computers, in particular to a blockchain technology, and can be used for cloud computing and cloud services. The specific implementation scheme is as follows: any potential block-out node in the service chain network acquires the verifiable random number of the period from the beacon chain network in any block-out period of the service chain network; wherein the verifiable random number is generated by consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network; determining whether the random number is a block outlet node of the period according to the verifiable random number of the period; if yes, a block of the period is generated. According to the technology disclosed by the invention, the stability and the safety of the service chain network are improved.

Description

Node consensus method, device, equipment and medium of block chain network
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to blockchain technology, which may be used for cloud computing and cloud services.
Background
Blockchains are a completely new distributed infrastructure and computing paradigm that utilizes block-chained data structures to validate and store data, distributed node consensus algorithms to generate and update data, cryptography to secure data transmission and access control, and intelligent contracts composed of automated script code to program and manipulate data.
The blockchain technology has the advantages of decentralization, non-tamperable information, traceability, collective autonomy and the like, and is gradually and widely focused by various industries.
Disclosure of Invention
The disclosure provides a node consensus method, device, equipment and medium of a blockchain network with better security.
According to an aspect of the present disclosure, there is provided a node consensus method of a blockchain network, applied to any potential outgoing node in a service chain network, including:
in any block-out period of the service chain network, obtaining the verifiable random number of the period from the beacon chain network; wherein the verifiable random number is generated by consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network;
determining whether the random number is a block outlet node of the period according to the verifiable random number of the period;
if yes, a block of the period is generated.
According to another aspect of the present disclosure, there is also provided a node consensus method of a blockchain network, applied to blockchain nodes in a beacon chain network, including:
generating verifiable random numbers corresponding to different block-out periods of a service chain network through consensus; the public trust of the beacon chain network is higher than that of the service chain network;
And in any block-out period of the service chain network, sending the verifiable random number of the period to the potential block-out node of the service chain network, so that when the corresponding potential block-out node determines itself to be the block-out node of the period according to the verifiable random number of the period, the block of the period is generated.
According to another aspect of the present disclosure, there is also provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the node consensus methods of a blockchain network provided by embodiments of the present disclosure.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform any one of the node consensus methods of the blockchain network provided by the embodiments of the present disclosure.
According to the technology disclosed by the invention, the stability and the safety of the service chain network are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1A is a block chain network system block diagram of one embodiment of the present disclosure;
FIG. 1B is a flow chart of a node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 2 is a flow chart of another node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 3 is a flow chart of another node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 4 is a flow chart of another node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 5 is a flow chart of another node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 6 is a flow chart of another node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 7 is a flow chart of another node consensus method of a blockchain network in an embodiment of the present disclosure;
FIG. 8 is a flow chart of a method of node consensus for a public chain network in an embodiment of the present disclosure;
FIG. 9 is a block diagram of a node consensus apparatus of a blockchain network in an embodiment of the present disclosure;
FIG. 10 is a block chain network node consensus device block diagram of another embodiment of the present disclosure;
fig. 11 is a block diagram of an electronic device for implementing a node consensus method of a blockchain network in accordance with embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the running process of the blockchain network, in any block-out period, each blockchain node of the blockchain network is constructed, and the block-out node in the period is selected to finish block-out according to a certain consensus mechanism. In the prior art, a POS (Proof of equity) mechanism is generally adopted to avoid the problem of resource waste caused by a POW (Proof of Work) mechanism. However, the block-out node and the block-out sequence selected under the POS consensus are predictable, if the performance of the block-out node is not strong enough or the security protection capability is not enough, an attacker can pertinently perform network attack on the block-out node about to block out, so that the block-out node fails, the condition that the network is unavailable is caused, and the stability and the security of the blockchain network are affected.
In view of this, the disclosure provides a brand-new consensus mechanism for selecting a block-out node in a blockchain network, and by introducing a blockchain network with higher public confidence in the process of selecting the block-out node, the randomness and the security of the blockchain network with relatively weak public confidence are increased, so that the unpredictability of the selection of the block-out node is increased, and the stability and the security of the blockchain network with relatively weak public confidence are improved.
For ease of understanding, a brief description of the blockchain network system involved in this disclosure will first be presented.
Referring to the blockchain network system shown in fig. 1A, it includes a traffic chain network 10 and a beacon chain network 20. Wherein potential blocking nodes in the traffic chain network 10 are communicatively coupled to at least some of the blocking chain nodes in the beacon chain network 20. The public trust of the beacon chain network is higher than that of the service chain network.
The blockchain nodes in the beacon chain network 20 commonly generate verifiable random numbers corresponding to different block-out periods of the service chain network 10;
in any block-out period of the service chain network 10, any potential block-out node in the service chain network 10 acquires a verifiable random number of the period from the beacon chain network 20, and determines whether the potential block-out node is the block-out node of the period according to the verifiable random number of the period; if yes, a block of the period is generated.
Wherein the potential out-of-block nodes may be at least some of the blockchain nodes in the blockchain network 10. When the potential out-blocking node is a part of the block chain nodes in the service chain network 10, the potential out-blocking node can be selected from the service chain network 10 based on a node selection mechanism. The node selection mechanism may be implemented by at least one node consensus mechanism in the prior art, for example, may be a POS mechanism.
It can be appreciated that by selecting at least some nodes from the block link points of the traffic chain network as potential egress nodes, data interaction with the beacon chain network is performed, reducing the number of nodes interacting with the beacon chain network, and thus reducing the amount of network communication bandwidth occupation. In addition, the potential block-out nodes replace the full quantity nodes in the service chain network and serve as the selection range of the subsequent block-out nodes, so that the operation energy consumption for selecting the block-out nodes is reduced.
It should be noted that fig. 1A illustrates only the number of blockchain nodes in the service chain network 10 and the beacon chain network 20, the ratio of the blockchain nodes in the service chain network 10, and the communication relationship between the different nodes, which should not be construed as a specific limitation.
It should be noted that the potential block-out nodes may be determined according to a preset selection period, where the preset selection period may be obtained by commonly identifying each block link point in the service chain network. The preset selection period and the block-out period can be the same, or the preset selection period is larger than the block-out period, so that the potential block-out node in the same block-out period is prevented from changing, and the stability and accuracy of the block-out node selection result are prevented from being affected. For example, the period length of the preset selected period may be an integer multiple of the period length of the output block period.
In one particular implementation, the service chaining network may be a public chaining network; the beacon chain network can be a alliance chain network, so that the scene of the selection of the block outlet nodes of the public chain network is assisted based on the alliance chain network, and the security of the public chain network operation process is improved.
The embodiment of the disclosure provides a node consensus method and a node consensus device for each blockchain network on the basis of the blockchain system shown in fig. 1A, which are suitable for the situation of selecting the block-out nodes in the business chain network with relatively weak public confidence. The node consensus method of each blockchain network provided by the embodiments of the present disclosure may be performed by a node consensus device, which may be implemented by software and/or hardware and specifically configured in an electronic device carrying blockchain nodes.
In the following, a detailed description will be given of a node consensus method of the blockchain network based on the blockchain network system shown in fig. 1A.
Referring to fig. 1B, a node consensus method of a blockchain network is applied to any potential block-out node in a service chain network, and includes:
s101, in any block-out period of the service chain network, obtaining the verifiable random number of the period from the beacon chain network.
Wherein the verifiable random number is generated by the consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network.
Wherein a service chain network may be understood as a blockchain network for implementing one or some service functions; the beacon chain network can be understood as a blockchain network which is used as a beacon of the service chain network to provide data (such as verifiable random numbers) for the service chain network and assist the service chain network to realize service functions in the operation process of the service chain network.
It can be understood that, because the public trust of the beacon chain network is higher than that of the service chain network, the beacon chain network generates a verifiable random number to assist in node consensus of the service chain network, and the security of the service chain network operation process is improved while the calculation difficulty of the block-out nodes of the service chain network by other third parties is increased.
The verifiable random number has verifiability and randomness, can be realized based on any verifiable random function (Verifiable Random Function, VRF), and the specific generation mode of the verifiable random number is not limited in the disclosure.
The out-block period is understood as a period for generating a new block in the service chain network, and the period length can be obtained by common knowledge of each block link point in the service chain network.
In order to improve the security of the potential blocking node for acquiring verifiable random numbers in different periods, the node identification of each potential blocking node can be registered in the beacon chain network in advance; correspondingly, when each potential block-out node acquires verifiable random numbers with different periods from the beacon chain network, the beacon chain network determines whether the node is a potential block-out node registered in advance based on the node identification; if yes, feeding back verifiable random numbers of corresponding periods; otherwise, the verifiable random number of the corresponding period is forbidden to be fed back.
To avoid confusion of verifiable random numbers of different periods, the verifiable random numbers of different periods may be stored in association with corresponding period orders in the beacon chain network. Correspondingly, the potential block-out node searches and acquires the verifiable random number of the corresponding period from the beacon chain network based on the period sequence of the verifiable random number to be acquired.
In order to reduce the storage space occupation amount for storing the verifiable random numbers in the beacon chain network and improve the query efficiency of the verifiable random numbers, in an alternative embodiment, the beacon chain network can determine the target block height for storing the verifiable random numbers according to the cycle order of the block-out cycle corresponding to the verifiable random numbers for each verifiable random number; storing the verifiable random number in a target block of a beacon chain network for acquisition; the block height of the target block is the target block height. Correspondingly, the potential block-out node determines the block height of the verifiable random number for storing the period according to the period sequence of the block-out period; and acquiring the verifiable random number of the period from the block corresponding to the block height in the beacon chain network.
It can be understood that, since the verifiable random numbers in different periods are stored in the blocks corresponding to different block heights, and the block heights correspond to the period sequence of the block outputting period, the block positioning of the verifiable random numbers in the beacon chain network in the period can be quickly realized through the period sequence, the searching traversal of each block is not needed to be sequentially carried out, and the searching efficiency of the verifiable random numbers is obviously improved.
In one particular implementation, the verifiable random number may be issued in a smart contract of the beacon chain network; correspondingly, the verifiable random number is searched and obtained from the issued intelligent contract, so that the searching efficiency of the verifiable random number is further improved.
S102, determining whether the random number is a block-out node in the period according to the verifiable random number in the period.
It can be understood that the block-out node in the period is determined based on the verifiable random number in the period, the randomness of the verifiable random number and the public confidence of the beacon chain network for generating the verifiable random number are respectively increased, so that the unpredictability and the credibility of the verifiable random number are respectively increased, and the calculation difficulty of the block-out node calculation by other third parties is increased. In addition, the verifiability of the random number can be verified, the occurrence of the condition that the verifiable random number is false is avoided, and the accuracy of the determination result of the block-out node is further improved.
The method can determine whether the potential block-out node is the block-out node in the period according to the verifiable random number in the period based on the preset judging function, and only the unique potential block-out node corresponding to the same verifiable random number is required to be ensured to be used as the block-out node in the period.
And S103, if yes, generating a block of the period.
Aiming at a certain potential block outlet node, if the potential block outlet node is judged to be the block outlet node of the period, generating a block of the period by the potential block outlet node, and completing the block outlet operation of a new block; if the potential block-out node is judged not to be the block-out node in the period, the potential block-out node is forbidden to generate the block in the period, the next block-out period is waited, and the selection of the block-out node in the new period is carried out.
The embodiment of the disclosure generates verifiable random numbers with different block-out periods for a service chain network with lower public confidence through a beacon chain network with higher public confidence, and determines the block-out nodes with corresponding periods based on the verifiable random numbers with different block-out periods. The data security and reliability of the out-of-block node determination process is increased due to the verifiability of the verifiable random number, and the public trust of the beacon chain network that generated the verifiable random number. In addition, the randomness of the random number can be verified, the unpredictability is added to the determination process of the block-out node of the service chain network, so that the calculation difficulty of the block-out node calculation process of other parties is increased, the block-out node of a certain block-out period is prevented from being calculated by other third parties, network attack is carried out on the block-out node, the condition that the network is unavailable due to failure of node block-out is caused, and the safety and the stability of the operation process of the service chain network are enhanced.
Based on the above technical solutions, the embodiments of the present disclosure further provide an optional embodiment, in which the determination mechanism of the block-out node in the present period is optimized and improved. It should be noted that, in the embodiments of the present disclosure, parts not described in detail may be referred to related expressions of other embodiments, which are not described herein.
Referring to fig. 2, a node consensus method of a blockchain network includes:
s201, in any block-out period of the service chain network, a verifiable random number of the period is obtained from the beacon chain network.
Wherein the verifiable random number is generated by the consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network.
S202, determining whether the self is the block-out node of the period according to the verifiable random number of the period, the total number of the potential block-out nodes and the number of the self node.
Wherein different verifiable random numbers can be matched with the same or different potential block-out nodes, and the same verifiable random number can only be matched with the same potential block-out node. For example, based on the verifiable random number of the present period, the total number of the potential block-out nodes of the present period is combined to be matched with the node numbers of different potential block-out nodes, so as to determine whether the node is the block-out node of the present period.
In an alternative embodiment, the verifiable random number of the period can be adopted to perform modulo operation on the total number of the potential block-out nodes to obtain a modulo result; and determining whether the self node is a block outlet node of the period according to the matching condition of the modulus result and the self node number.
For example, if the modulo result matches with the own node number, determining that the own node is the block-out node in the period; if the modulus result is not matched with the node number of the modulus result, determining that the modulus result is not the block-out node in the period.
Specifically, each potential out-block node may be sequentially numbered; if the modulus result is consistent with the self node number, the modulus result is matched with the self node number, and the self is determined to be a block outlet node in the period; if the modulus result is inconsistent with the self node number, the modulus result is not matched with the self node number, and the modulus result is determined to be not the block-out node in the period.
It can be understood that the mode of taking the mode and judging the matching condition with the node number is introduced to judge whether the node is the block-out node in the period, so that the operation is convenient, the operation amount is small, the determination efficiency of the block-out node is improved, and the block-out efficiency of the service chain network is improved.
In another alternative embodiment, different preset decision functions may also be set for different block out periods; correspondingly, according to the cycle sequence of the block-out cycle, a preset judging function of the cycle is selected, and based on the preset judging function of the cycle, whether the block-out node is the block-out node of the cycle or not is determined by combining the verifiable random number of the cycle, the total number of potential block-out nodes and the node number of the block-out node. The selection mode of the preset judging function can be obtained by commonly identifying the chain link points of all blocks in the service chain network. The preset determination functions may be set by a technician according to needs or experience, and the specific presentation forms of the preset determination functions and the selection modes thereof are not limited in the disclosure.
It can be appreciated that the above manner further increases the unpredictability of the out-of-block node selection process by presetting the diversity of the decision function.
In yet another alternative embodiment, the verifiable random number of the present period may also be encoded to convert the verifiable random number of the present period into a numerical encoding result of a preset numerical range; performing modular operation on the total number of potential block-out nodes by adopting the numerical coding result to obtain a modular result; and determining whether the self node is a block outlet node of the period according to the matching condition of the modulus result and the self node code.
The preset numerical range can be obtained by commonly identifying each block link point in the service chain network, and the specific range interval of the preset numerical range is not limited in the disclosure. The encoding function used for encoding the verifiable random number may be implemented using at least one encoding function in the prior art, which is not limited in this disclosure.
And S203, if yes, generating a block of the period.
According to the embodiment of the disclosure, the total number of potential block-out nodes and the number of the nodes are introduced, and the verifiable random number of the period is combined to determine whether the node is the block-out node of the period, so that the determination mechanism of the block-out node of the period is further perfected, the certainty of the block-out node of the period is improved, a foundation is laid for smooth block-out of the block of the period, and smooth operation of a service chain network is further ensured.
In an alternative embodiment, after the block of the present period is generated by the block-out node of the present period, the block of the present period may be transmitted to other blockchain nodes in the service chain network by the block-out node of the present period itself for verification.
In another alternative embodiment, after the block of the present period is generated by the block-out node of the present period, the block-out node of the next period may verify and/or issue the received block before generating the block of the new period, so as to ensure the order of the generation and issue processes of different blocks in the service chain network, and reduce the occurrence of the block bifurcation.
Referring to fig. 3, a node consensus method of a blockchain network includes:
s301, in any block-out period of the service chain network, obtaining the verifiable random number of the period from the beacon chain network.
Wherein the verifiable random number is generated by the consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network.
S302, determining whether the random number is a block-out node in the period according to the verifiable random number in the period.
And S303, if yes, generating a block of the period.
S304, obtaining the verifiable random number of the next period from the beacon chain network.
In an alternative embodiment, if verifiable random numbers of different periods are stored in association with corresponding period orders in the beacon chain network, the potential blocking node may look up and acquire the verifiable random number of the next period from the beacon chain network based on the period order of the verifiable random number of the next period.
In another alternative embodiment, if the verifiable random numbers in different periods are respectively stored in the blocks of the block heights corresponding to the period times of the block-out period in the beacon chain network, the block heights of the verifiable random numbers in the next period can be determined according to the period sequence of the next period; the verifiable random number of the next cycle is obtained from the corresponding block height block of the beacon chain network.
It can be understood that, since the verifiable random numbers in different periods are stored in the blocks corresponding to different block heights, and the block heights correspond to the period sequence of the block outputting period, the block positioning of the verifiable random number in the beacon chain network in the period can be realized rapidly through the period sequence, the searching traversal of each block is not needed to be sequentially carried out, and the searching efficiency of the verifiable random number is obviously improved.
S305, determining the block-out node of the next period according to the verifiable random number of the next period.
Wherein different verifiable random numbers can be matched with the same or different potential block-out nodes, and the same verifiable random number can only be matched with the same potential block-out node.
For example, the verifiable random number of the next period can be combined with the total number of the potential block-out nodes of the period to be matched with the node numbers of different potential block-out nodes, so that the specific potential block-out node is determined and taken as the block-out node of the next block-out period.
According to the technical scheme, the total number of potential block outlet nodes and the node numbers of different potential block outlet nodes are introduced, the random number which can be verified in the next period is combined, the block outlet nodes in the next period are determined, the effective prediction of the block outlet nodes in the current period to the block outlet nodes in the next period is realized, the effective positioning is carried out for the execution main body for carrying out verification and/or release of the block in the current period subsequently, and therefore the guarantee is provided for the effective execution of the verification and/or release of the block in the current period by other subsequent nodes.
In an alternative embodiment, the total number of the potential block-out nodes can be subjected to modulo operation by adopting the verifiable random number of the next period to obtain a modulo result; and determining the block outlet node of the next period according to the modular result and the node numbers of different potential block outlet nodes.
For example, the node number that matches the modulo result may be used as the potential out-block node for the next cycle.
Specifically, each potential out-block node may be sequentially numbered; and taking the potential block-out node with the node number consistent with the modulo result as the block-out node of the next period.
It can be understood that the selection of the block outlet node of the next period is performed by introducing the mode taking operation and the mode of judging the matching condition of the node number, so that the block outlet node of the current period accurately positions the block outlet node of the next period, the operation is convenient and fast, the operation amount is small, the positioning efficiency is improved, and a foundation is laid for the follow-up verification and release of the block of the current period.
In another alternative embodiment, different preset decision functions may also be set for different block out periods; correspondingly, a preset judging function of the next period is selected according to the period sequence of the next block-out period, and the determination of the block-out node of the next period is performed based on the preset judging function of the next period by combining the verifiable random number of the next period, the total number of the potential block-out nodes and the node numbers of different potential block-out nodes. The selection mode of the preset judging function can be obtained by commonly identifying the chain link points of all blocks in the service chain network. The preset determination functions may be set by a technician according to needs or experience, and the specific presentation forms of the preset determination functions and the selection modes thereof are not limited in the disclosure.
It can be appreciated that the above manner further increases the unpredictability of the out-of-block node selection process by presetting the diversity of the decision function.
In yet another alternative embodiment, the verifiable random number of the next cycle may also be encoded to convert the verifiable random number of the next cycle into a numerical encoding result of a preset numerical range; performing modular operation on the total number of potential block-out nodes by adopting the numerical coding result to obtain a modular result; and determining the block outlet node of the next period according to the matching condition of the modular result and the node codes of different potential block outlet nodes.
The preset numerical range can be obtained by commonly identifying each block link point in the service chain network, and the specific range interval of the preset numerical range is not limited in the disclosure. The encoding function used for encoding the verifiable random number may be implemented using at least one encoding function in the prior art, which is not limited in this disclosure.
And S306, sending the block of the period to a block outlet node of the next period, so that the block outlet node of the next period verifies and/or issues the received block before generating the block of the new period.
The block outlet node of the period is used for generating a block of the period, so that the block outlet of the period is realized; and the block outlet node of the next period is used for generating a block of the next period, so that the block outlet of the next period is realized. Before the block outlet node of the next period carries out the block outlet of the next period, the block outlet node of the next period verifies and/or issues the block outlet of the period generated by the block outlet node of the period, so that the sequential generation of blocks of different block outlet periods is ensured, the occurrence of block bifurcation in a service chain network is effectively avoided, and the effectiveness and the accuracy of block chains in the service chain network are further ensured.
In an alternative embodiment, at least one block verification manner in the prior art may be adopted to implement accuracy verification, validity verification, and the like for the block. Illustratively, the blocks may be validated based on BFT (Byzantine Fault Tolerance, bayer fault tolerance) or CFT (Crash Fault Tolerance ) consensus mechanisms.
Optionally, the verifying the accuracy of the block may include: executing the transaction request corresponding to each transaction data in the block to obtain new transaction data; determining a transaction identifier of the new transaction data; and according to the consistency of the transaction identification of each new transaction data and the transaction identification of the corresponding transaction data contained in the block, verifying the accuracy of each transaction identification in the block. The new merck tree is constructed by carrying out hash operation on the transaction identifications of the new transaction data in pairs; if the root of the constructed merck tree is consistent with the merck root in the block head of the block, indicating that the accuracy verification of the block is passed; otherwise, the accuracy verification of the block is not passed.
Optionally, the block is subjected to accuracy verification, and at least one of the following may be included: for example, the method may include verifying the accuracy of the results of executing the smart contract for transaction requests that invoke the execution of the smart contract, verifying the accuracy of the amount of resource transfer for transaction requests that have a resource transfer process, and the like.
Optionally, verifying validity of the block may include: determining whether a block identifier of a previous block included in the block is consistent with an actual block identifier of the previous block existing in the blockchain; if the block is consistent, the validity verification of the block is passed; otherwise, the validity verification of the block is not passed.
Optionally, the validity verification is performed on the block, which may further include signing a block-out node in the block, validity verification, and the like.
Because the block-out nodes corresponding to the blocks with different block-out periods are determined based on the verifiable random numbers with corresponding periods, in order to effectively identify the generation node of the block and the coincidence condition of the block-out nodes with corresponding periods, the block is prevented from being generated by the non-consensus block-out node.
Illustratively, the block-out node of the present period adds the verifiable random number of the present period to the block when generating the block of the present period; correspondingly, other blockchain nodes in the service chain network, such as a blockout node in the next period, can acquire verifiable random numbers of blockout periods corresponding to the blocks from the beacon chain network; and verifying the validity of the block according to the consistency of the obtained verifiable random number and the verifiable random number contained in the block. Specifically, if the two are consistent, the block is generated by a correct block outlet node, and the validity of the block is verified; if the two are inconsistent, the block is not generated by the correct block-out node, and the validity verification of the block is not passed.
According to the technical scheme, the verifiable random number adopted in the determination process of the block outlet node of the period is added into the block of the period, so that whether the block of the period is generated by the commonly recognized block outlet node can be effectively recognized, the occurrence of the situation that the actual block outlet node is inconsistent with the commonly recognized block outlet node is avoided, the situation that the block chain is bifurcated is caused, and the effectiveness of the operation process of the service chain network and the stability of the constructed block chain are effectively improved.
Based on the above technical solutions, the present disclosure further provides an optional embodiment, in which randomness is introduced on the verifiable random number acquisition opportunity, so as to ensure that different potential block-out nodes can sequentially perform competition of the block-out nodes in the present period. It should be noted that, in the embodiments of the present disclosure, parts not described in detail may be referred to related expressions of other embodiments, which are not described herein.
Referring to fig. 4, a node consensus method of a blockchain network includes:
s401, in any block-out period of the service chain network, starting random countdown in the period.
S402, after the countdown is completed, the verifiable random number of the period is obtained from the beacon chain network.
Wherein the verifiable random number is generated by the consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network.
S403, determining whether the random number is a block-out node in the period according to the verifiable random number in the period.
S404, if yes, generating a block of the period.
The random countdown is a countdown with a countdown duration value not fixed. In order to ensure that different potential block-out nodes compete for the sequence of the block-out nodes in the same block-out period, after the block-out nodes in the period are down, the potential block-out nodes in the next period can be replaced and compensated, and the random countdown can be controlled within a certain preset time length. The preset time length can be obtained by commonly identifying each block link point in the service chain network. In an alternative embodiment, the predetermined time period may be determined based on at least one of a period length of the outbound period, a number of potential outbound nodes, and a block size corresponding to a single block.
When the countdown of the potential block-out node is completed, the potential block-out node can communicate with the block chain node in the beacon chain network, and the verifiable random number of the period is obtained from the beacon chain network; and when the countdown of the potential block-out node is not completed, prohibiting the potential block-out node from communicating with the blockchain node in the beacon chain network, thereby avoiding the potential block-out node from acquiring the verifiable random number of the period from the beacon chain network.
Because random countdown of different potential block-out nodes is usually different, the different potential block-out nodes can sequentially acquire verifiable random numbers of the period from the beacon chain network, and further determine whether the potential block-out nodes are the block-out nodes of the period. Under the condition that the block outlet node in the period fails to smoothly finish the block outlet due to network failure or downtime caused by other reasons, the block outlet node in the period cannot smoothly output the block. Then, when the first random countdown of the next block-out period is completed, the competition of the block-out nodes of the next period is entered, and at this time, the block-out nodes of the next period replace the block-out nodes which do not smoothly complete the block-out, the block-out operation is executed, and the abnormal bottom of the block-out nodes of the previous period is realized.
According to the embodiment of the disclosure, when the block outlet nodes are determined in different block outlet periods, a random countdown mechanism is introduced, so that when the randomness of the selection of the block outlet nodes is increased, and under the condition that the block outlet nodes in a certain block outlet period are down and the like and cannot smoothly output blocks, the selection of the block outlet nodes in a new period can be realized under the condition that the random countdown of the new block outlet period is started, the abnormal block outlet nodes in the previous period are replaced for block outlet, the block outlet pocket bottom under the abnormal condition of the block outlet nodes in a certain period is realized, the smooth operation of a service chain network is ensured, and the stability of the operation process of the service chain network is improved.
On the basis of introducing the countdown of the random number, the block produced by the block outlet node of the previous period can be received by the block outlet node of a certain block outlet period before the block outlet is carried out by the block outlet node of the period, and verification and/or release of the block produced by the previous period is realized in the countdown process of the random number, so that the order of the blocks produced by different block outlet periods is ensured, and the occurrence of bifurcation is avoided.
In an alternative embodiment, waiting for blocks to be verified sent by other blockchain nodes in the service chain network in a random countdown process; the block to be verified is generated by a block outlet node of the previous period; if the block to be verified is obtained, verifying the block to be verified; the blocks to be verified that pass verification are distributed before the blocks of the period are generated. The method has the advantages that verification and release of blocks produced by the block outlet node in the previous period can be realized before the block outlet by the block outlet node in the later period, the ordering of the blocks produced in different block outlet periods is ensured, the situation that the block chain is bifurcated due to the fact that the block outlet is not required to occur is avoided, and the stability of a service chain network is further ensured.
For example, at least one block verification mode in the prior art can be adopted to realize accuracy verification, validity verification and the like of the block to be verified. For example, the block to be verified may be verified based on a BFT consensus mechanism or a CFT consensus mechanism.
Optionally, performing accuracy verification on the block to be verified may include: executing the transaction request corresponding to each transaction data in the block to be verified to obtain new transaction data; determining a transaction identifier of the new transaction data; and according to the consistency of the transaction identification of each new transaction data and the transaction identification of the corresponding transaction data contained in the block to be verified, verifying the accuracy of each transaction identification in the block to be verified. The new merck tree is constructed by carrying out hash operation on the transaction identifications of the new transaction data in pairs; if the root of the constructed merck tree is consistent with the merck root in the block head of the block to be verified, indicating that the accuracy verification of the block to be verified is passed; otherwise, the accuracy verification of the block to be verified is not passed.
Optionally, the verifying the accuracy of the block to be verified may further include at least one of the following: verification of accuracy of results of execution of the smart contract for transaction requests that invoke execution of the smart contract, verification of accuracy of amounts of resource transfer for transaction requests for which a resource transfer process exists, and the like.
Optionally, verifying the validity of the block to be verified may include: determining whether a block identifier of a previous block included in the block to be verified is consistent with an actual block identifier of the previous block existing in the blockchain; if the validity of the block to be verified is consistent, the validity verification of the block to be verified is indicated to pass; otherwise, the validity verification of the block to be verified is not passed.
Optionally, the validity verification is performed on the block to be verified, and the method can further comprise signature of a block outlet node in the block to be verified, validity verification and the like.
Under the condition that the block to be verified carries the verifiable random number of the previous period, the verifiable random number of the previous period can be obtained from the beacon chain network; and verifying the validity of the block to be verified according to the obtained verifiable random number and the verifiable random number carried in the block to be verified.
If the verifiable random number of the previous period obtained from the beacon chain network is consistent with the verifiable random number carried in the block to be verified, the block to be verified is generated by the correct block-out node of the previous period, so that the validity of the block to be verified is verified; if the verifiable random number of the previous period obtained from the beacon chain network is inconsistent with the verifiable random number carried in the block to be verified, the block to be verified is generated by the wrong block outlet node of the previous period, so that the validity verification of the block to be verified is not passed.
It can be understood that by means of the verifiable random number carried in the block to be verified and the verifiable random number generated by the beacon chain network in the corresponding period, whether the block to be verified is generated by the correct block outlet node can be effectively identified, the situation that the block chain bifurcation occurs in the service chain network due to the malicious block is avoided, and the stability of the service chain network operation process is ensured.
In the above, any potential block-out node in the service chain network is taken as an execution main body, and the node consensus method of the block chain network is described in detail. Hereinafter, a node consensus method of the blockchain network will be described in detail with respect to blockchain nodes in the beaconing chain network as an execution subject. It should be noted that, in the present side execution body, a part is not described in detail, and the description of the related embodiments of the front side execution body may be referred to, which is not described herein.
Referring to fig. 5, a method for node consensus of a blockchain network is applied to blockchain nodes in a beacon chain network, and includes:
s501, generating verifiable random numbers corresponding to different block-out periods of a service chain network in a consensus mode.
The public trust of the beacon chain network is higher than that of the service chain network.
S502, in any block-out period of the service chain network, sending the verifiable random number of the period to the potential block-out node of the service chain network, so that when the corresponding potential block-out node determines itself to be the block-out node of the period according to the verifiable random number of the period, the block of the period is generated.
Wherein a service chain network may be understood as a blockchain network for implementing one or some service functions; the beacon chain network can be understood as a blockchain network which is used as a beacon of the service chain network to provide data (such as verifiable random numbers) for the service chain network and assist the service chain network to realize service functions in the operation process of the service chain network.
It can be understood that, because the public trust of the beacon chain network is higher than that of the service chain network, the beacon chain network generates a verifiable random number to assist in node consensus of the service chain network, and the security of the service chain network operation process is improved while the calculation difficulty of the block-out nodes of the service chain network by other third parties is increased.
The block chain nodes in the beacon chain network generate corresponding verifiable random numbers of different block outlet periods of the service chain network based on a preset consensus mechanism. The preset consensus mechanism can be set by a technician at the early stage of constructing the beacon chain network, and the specific consensus mode of the preset consensus mechanism is not limited in the disclosure. For example, a POS consensus mechanism or the like may be employed.
The verifiable random number has verifiability and randomness, can be realized based on any VRF, and the specific generation mode of the verifiable random number is not limited in the present disclosure.
In an alternative embodiment, for any block-out period of the service chain network, the current reference information adopted in the period can be commonly recognized as signature information by the block chain nodes in the beacon chain network; based on the preset VRF, according to the signature information of the period, a verifiable random number of the period is generated.
Because each block-out period requires the block chain nodes in the beacon chain network to carry out the consensus of the signature information, the generation efficiency of the verifiable random number is affected. To overcome the above problem, in another alternative embodiment, the verifiable random numbers corresponding to different block-out periods may be generated based on the verifiable random number of the previous period, that is, the verifiable random number of the previous period, as the current reference information of the verifiable random number of the present period. For the first block-out period, the verifiable random number of the last period is initial reference information obtained by the common identification of all block link points in the beacon chain network.
That is, only when the verifiable random number corresponding to the first block-out period of the service chain network is generated, the initial reference information is commonly recognized by each block link point in the beacon chain network and is used as the current reference information of the first block-out period; when the verifiable random number corresponding to the non-first block-out period of the service chain network is generated, the verifiable random number of the previous period is directly adopted as the current reference information of the verifiable random number of the current period. The method has the advantages that when the verifiable random number of the non-first block-out period is generated, each block chain node of the beacon chain network does not need to be passed through any more, the complex consensus mechanism is adopted to generate the current reference information, the consensus process is reduced, and the generation efficiency of the verifiable random number of the non-first block-out period is improved.
In order to improve the security of the potential blocking node for acquiring verifiable random numbers in different periods, the node identification of each potential blocking node can be registered in the beacon chain network in advance; correspondingly, when each potential block-out node acquires verifiable random numbers with different periods from the beacon chain network, the beacon chain network determines whether the node is a potential block-out node registered in advance based on the node identification; if yes, feeding back verifiable random numbers of corresponding periods; otherwise, the verifiable random number of the corresponding period is forbidden to be fed back.
To avoid confusion of verifiable random numbers of different periods, the verifiable random numbers of different periods may be stored in association with corresponding period orders in the beacon chain network. Correspondingly, the potential block-out node searches and acquires the verifiable random number of the corresponding period from the beacon chain network based on the period sequence of the verifiable random number to be acquired.
In order to reduce the storage space occupation amount for storing the verifiable random numbers in the beacon chain network and improve the query efficiency of the verifiable random numbers, in an alternative embodiment, the beacon chain network can determine the target block height for storing the verifiable random numbers according to the cycle order of the block-out cycle corresponding to the verifiable random numbers for each verifiable random number; storing the verifiable random number in a target block of a beacon chain network for acquisition; the block height of the target block is the target block height. Correspondingly, the potential block-out node determines the height of a target block for storing the verifiable random number of the period according to the period sequence of the block-out period; acquiring a verifiable random number of the period from a target block of a beacon chain network; the block height of the target block is the target block height.
It can be understood that, since the verifiable random numbers in different periods are stored in the blocks corresponding to different block heights, and the block heights correspond to the period sequence of the block outputting period, the block positioning of the verifiable random numbers in the beacon chain network in the period can be quickly realized through the period sequence, the searching traversal of each block is not needed to be sequentially carried out, and the searching efficiency of the verifiable random numbers is obviously improved.
In one particular implementation, the verifiable random number may be issued in a smart contract of the beacon chain network; correspondingly, the potential block-out node in the service chain network performs searching and obtaining of the verifiable random number from the issued intelligent contract, so that the searching efficiency of the verifiable random number is further improved.
The embodiment of the disclosure generates verifiable random numbers with different block-out periods for a service chain network with lower public confidence through a beacon chain network with higher public confidence, and determines the block-out nodes with corresponding periods based on the verifiable random numbers with different block-out periods. The data security and reliability of the out-of-block node determination process is increased due to the verifiability of the verifiable random number, and the public trust of the beacon chain network that generated the verifiable random number. In addition, the randomness of the random number can be verified, the unpredictability is added to the determination process of the block-out node of the service chain network, so that the calculation difficulty of the block-out node calculation process of other parties is increased, the block-out node of a certain block-out period is prevented from being calculated by other third parties, network attack is carried out on the block-out node, the condition that the network is unavailable due to failure of node block-out is caused, and the safety and the stability of the operation process of the service chain network are enhanced.
Based on the above technical solutions, the embodiments of the present disclosure further provide an optional embodiment, in which, in a case that a block generated by a block output node in a current period in a service chain network is verified and/or issued by a block output node in a next period, positioning of the block output node in the next period is assisted. It should be noted that, in the embodiments of the present disclosure, parts not described in detail may be referred to related expressions of other embodiments, which are not described herein.
Referring to fig. 6, a node consensus method of a blockchain network includes:
s601, generating verifiable random numbers corresponding to different block-out periods of a service chain network in a consensus way; the public trust of the beacon chain network is higher than that of the service chain network.
S602, in any block-out period of the service chain network, sending the verifiable random number of the period to the potential block-out node of the service chain network, so that when the corresponding potential block-out node determines itself to be the block-out node of the period according to the verifiable random number of the period, the block of the period is generated.
And S603, sending the verifiable random number of the next period to the potential block outlet node, so that the potential block outlet node determines the block outlet node of the next period according to the verifiable random number of the next period, and verifying and/or issuing the block produced in the current period before generating the block of the new period by the block outlet node of the next period.
Wherein different verifiable random numbers can be matched with the same or different potential block-out nodes, and the same verifiable random number can only be matched with the same potential block-out node.
The block chain node in the beacon chain network sends the verifiable random number of the next period to the block outlet node of the current period in the service chain network; the block outlet node of the current period in the service chain network determines the block outlet node of the next period according to the verifiable random number of the next period; the block outlet node of the period sends the block of the period generated by the node to the block outlet node of the next period; the block-out node of the next cycle verifies and/or issues the block generated in the current cycle before generating the block of the new cycle.
It should be noted that, how the block-out node in the present period determines the block-out node in the next period according to the verifiable random number in the next period, and how the block-out node in the next period verifies the block generated in the present period may refer to the related contents of other embodiments, which are not described herein.
It is noted that, the block-out node in the present period is configured to generate a block in the present period, so as to realize the block-out in the present period; and the block outlet node of the next period is used for generating a block of the next period, so that the block outlet of the next period is realized. Before the block outlet node of the next period carries out the block outlet of the next period, the block outlet node of the next period verifies and/or issues the block outlet of the period generated by the block outlet node of the period, so that the sequential generation of blocks of different block outlet periods is ensured, the occurrence of block bifurcation in a service chain network is effectively avoided, and the effectiveness and the accuracy of block chains in the service chain network are further ensured.
On the basis of the technical schemes, randomness can be introduced on the verifiable random number acquisition occasion of the period so as to ensure that each potential block-out node in the service chain network can sequentially compete for the block-out node of the period.
Referring to fig. 7, a node consensus method of a blockchain network includes:
s701, generating verifiable random numbers corresponding to different block-out periods of a service chain network in a consensus way; the public trust of the beacon chain network is higher than that of the service chain network.
S702, in any block-out period of the service chain network, sending the verifiable random number of the period to a potential block-out node in the service chain network, which completes random countdown of the period, so that the corresponding potential block-out node generates a block of the period when determining itself to be the block-out node of the period according to the verifiable random number of the period.
The random countdown is a countdown with a countdown duration value not fixed. In order to ensure that different potential block-out nodes compete for the sequence of the block-out nodes in the same block-out period, after the block-out nodes in the period are down, the potential block-out nodes in the next period can be replaced and compensated, and the random countdown can be controlled within a certain preset time length. The preset time length can be obtained by commonly identifying each block link point in the service chain network. In an alternative embodiment, the predetermined time period may be determined based on at least one of a period length of the outbound period, a number of potential outbound nodes, and a block size corresponding to a single block.
Because random countdown of different potential block-out nodes is usually different, the different potential block-out nodes can sequentially acquire verifiable random numbers of the period from the beacon chain network, and further determine whether the potential block-out nodes are the block-out nodes of the period. Under the condition that the block outlet node in the period fails to smoothly finish the block outlet due to network failure or downtime caused by other reasons, the block outlet node in the period cannot smoothly output the block. Then, when the first random countdown of the next block-out period is completed, the competition of the block-out nodes of the next period is entered, and at this time, the block-out nodes of the next period replace the block-out nodes which do not smoothly complete the block-out, the block-out operation is executed, and the abnormal bottom of the block-out nodes of the previous period is realized.
It can be appreciated that when the above technical solution determines the block-out node in different block-out periods, a random countdown mechanism is introduced, so that when the randomness of the selection of the block-out node is increased, and the block-out node in a certain block-out period is down, under the condition that the block-out node cannot smoothly output due to shutdown and the like, the selection of the block-out node in a new period can be realized under the condition that the random countdown of the new block-out period is started, the abnormal block-out node in the previous period is replaced for block-out, the block-out pocket bottom under the abnormal condition of the block-out node in a certain period is realized, and the smooth operation of the service chain network is ensured, thereby improving the stability of the operation process of the service chain network.
On the basis of introducing the countdown of the random number, the block produced by the block outlet node of the previous period can be received by the block outlet node of a certain block outlet period before the block outlet is carried out by the block outlet node of the period, and verification and/or release of the block produced by the previous period is realized in the countdown process of the random number, so that the order of the blocks produced by different block outlet periods is ensured, and the occurrence of bifurcation is avoided.
In an alternative embodiment, after receiving the block to be verified sent by other blockchain nodes in the service chain network in the random countdown process of the period of the potential block-out node, the verifiable random number of the previous period is sent to the potential block-out node, so that the potential block-out node performs validity verification on the block to be verified according to the obtained verifiable random number and the verifiable random number carried in the block to be verified.
If the verifiable random number of the previous period obtained from the beacon chain network is consistent with the verifiable random number carried in the block to be verified, the block to be verified is generated by the correct block-out node of the previous period, so that the validity of the block to be verified is verified; if the verifiable random number of the previous period obtained from the beacon chain network is inconsistent with the verifiable random number carried in the block to be verified, the block to be verified is generated by the wrong block outlet node of the previous period, so that the validity verification of the block to be verified is not passed.
It can be understood that whether the block to be verified is generated by the correct block-out node is realized by the verifiable random number carried in the block to be verified and the verifiable random number generated by the beacon chain network in the corresponding period, so that the situation of block chain bifurcation caused by malicious output of the block in the service chain network is avoided, and the stability of the service chain network operation process is ensured.
Based on the above technical solutions, the present disclosure further provides a preferred embodiment, and in this preferred suitable example, a public chain network is used as a service chain network, and a alliance chain network is used as a beacon chain network, so as to describe a node consensus method of the public chain network in detail.
A method of node consensus for joining a public chain network as shown in fig. 8, comprising:
s801, each block chain node in the public chain network selects a preset number of block chain link points as potential block outlet nodes based on a POS mechanism according to a preset selection period.
The preset selection period and the preset number can be obtained by commonly identifying the chain link points of all blocks in the public chain network.
S802, registering node identifiers of all the potential block-out nodes in the alliance chain network.
S803, the block-out node of the alliance chain network takes the verifiable random number of the previous block-out period of the public chain network as the signature content of the period to generate the verifiable random number of the public chain network in the period.
The signature content of the first block-out period is initialization information obtained by consensus of all block link points in the alliance chain network.
Alternatively, the verifiable random number of the public-chain network in the present period can be generated based on a Schnorr (a knowledge proof algorithm based on discrete logarithm problem) signature.
To further improve the communication efficiency, optionally, a verifiable random number of the public-link network in the present period may be generated based on a BLS (Boneh-Lynn-shack) threshold signature algorithm.
S804, storing verifiable random numbers of different block-out periods of the public chain network in blocks with corresponding periodic sequences and corresponding block heights.
S805, a potential block-out node in the public chain network starts random countdown when a block-out period arrives, and waits for blocks transmitted by other potential block-out nodes.
S806, judging whether a block is received after the countdown is completed; if yes, then execute S807; otherwise, S808 is performed.
S807, obtaining a verifiable random number of a previous period from the alliance chain network, verifying the validity of the received block according to the verifiable random number, performing other consensus verification on the block, and issuing the received block to the public chain network under the condition that verification is passed. Execution continues with S808.
The other consensus verification may be CFT consensus verification or BFT consensus verification, among others. In one particular implementation, the consensus verification employs a BFT consensus mechanism to prevent node aversion.
Illustratively, verifying the validity of the received block according to the verifiable random number may include: if the verifiable random number carried in the block is consistent with the obtained verifiable random number, the validity of the block is verified.
By way of example, other consensus verifications may include at least one of verification of the correctness of the merkel tree, verification of the correctness of the amount of resource transfer in the resource transfer process, verification of the correctness of the results of the operation of the smart contract, verification of the validity of the signature information in the block, and the like.
S808, obtaining the verifiable random number of the period from the alliance chain network. Execution continues with S809.
S809, determining whether the random number is the block-out node in the period according to the verifiable random number. If yes, then execute S810; otherwise, S811 is performed.
S810, generating a block of the period, acquiring a verifiable random number of the next period from the alliance chain network, determining a block outlet node of the next period according to the verifiable random number, and then transmitting the block of the period to the block outlet node of the next period for verification and release. Execution returns to S811.
S811, resetting the random number countdown; execution returns to S805.
Illustratively, making the out-of-block node determination of the out-of-block period based on the verifiable random number of the out-of-block period may include: the verifiable random number of the block-out period is adopted, and the total number of the potential block-out nodes is subjected to modular operation, so that a modular result is obtained; and taking the potential block-out node corresponding to the node number consistent with the modulo result as the block-out node of the period.
It should be noted that, the specific values of the preset selection period and the block-out period are not limited in this disclosure, and only the preset selection period is required to be ensured to be greater than the block-out period. In order to avoid the change of the potential block-out node corresponding to the same block-out period, the period length of the preset selection period can be set to be an integer multiple of the period length of the block-out period. In addition, the generation time of verifiable random numbers corresponding to different block-out periods is not limited, and the potential block-out nodes only need to ensure that the verifiable random numbers of a certain block-out period are generated in advance when the verifiable random numbers of the corresponding period need to be acquired.
As an implementation of the node consensus method of each blockchain network, the disclosure further provides an optional embodiment of an execution device for implementing the node consensus method of each blockchain network.
Referring to fig. 9, a node consensus device 900 of a blockchain network is configured at any potential outbound node in the blockchain network, and includes: the random number acquisition module 901, the out-of-block node determination module 902, and the block generation module 903 may be verified. Wherein,
the verifiable random number acquisition module 901 is used for acquiring the verifiable random number of the period from the beacon chain network in any block-out period of the service chain network; wherein the verifiable random number is generated by consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network;
the block-out node determining module 902 is configured to determine whether the block-out node is a block-out node in the present period according to the verifiable random number in the present period;
the block generating module 903 is configured to generate a block of the current period if yes.
The embodiment of the disclosure generates verifiable random numbers with different block-out periods for a service chain network with lower public confidence through a beacon chain network with higher public confidence, and determines the block-out nodes with corresponding periods based on the verifiable random numbers with different block-out periods. The data security and reliability of the out-of-block node determination process is increased due to the verifiability of the verifiable random number, and the public trust of the beacon chain network that generated the verifiable random number. In addition, the randomness of the random number can be verified, the unpredictability is added to the determination process of the block-out node of the service chain network, so that the calculation difficulty of the block-out node calculation process of other parties is increased, the block-out node of a certain block-out period is prevented from being calculated by other third parties, network attack is carried out on the block-out node, the condition that the network is unavailable due to failure of node block-out is caused, and the safety and the stability of the operation process of the service chain network are enhanced.
In an alternative embodiment, the block-out node determining module 902 is specifically configured to:
and determining whether the self is the block-out node in the period according to the verifiable random number in the period, the total number of the potential block-out nodes and the self node number.
In an alternative embodiment, the block-out node determining module 902 specifically includes:
the modular unit is used for performing modular operation on the total number of the potential block-out nodes by adopting the verifiable random number in the period to obtain a modular result;
and the block-out node determining unit is used for determining whether the block-out node is the block-out node in the period according to the matching condition of the modulus result and the node number of the block-out node.
In an alternative embodiment, the block generating module 903 is specifically configured to:
and generating a block comprising the verifiable random number of the period, so that other block link points in the service chain network verify the validity of the block of the period according to the verifiable random number of the period.
In an alternative embodiment, wherein:
the verifiable random number acquisition module 901 is further configured to acquire a verifiable random number of a next period from the beacon chain network;
The block-out node determining module 903 is further configured to determine a block-out node of the next period according to the verifiable random number of the next period;
the apparatus 900 further includes a block sending module, configured to send the block of the present period to the block-out node of the next period, so that the block-out node of the next period verifies and/or issues the received block before generating the block of the new period.
In an alternative embodiment, the block-out node determining module 903 is further specifically configured to:
and determining the block-out node of the next period according to the verifiable random number of the next period, the total number of the potential block-out nodes and the node numbers of different potential block-out nodes.
In an alternative embodiment, the block-out node determining module 903 specifically includes:
the modular unit is used for performing modular operation on the total number of the potential block-out nodes by adopting the verifiable random number of the next period to obtain a modular result;
and the block-out node determining unit is used for taking the potential block-out node matched with the node number of the modular result as the block-out node of the next period.
In an alternative embodiment, the verifiable random number acquisition module 901 includes:
The countdown starting unit is used for starting random countdown in any block-out period of the service chain network;
and the verifiable random number acquisition unit is used for acquiring the verifiable random number of the period from the beacon chain network after the countdown is completed.
In an alternative embodiment, wherein the apparatus 900 further comprises:
the block acquisition module is used for waiting for the blocks to be verified sent by other block chain nodes in the service chain network in the random countdown process; the block to be verified is generated by a block outlet node of the previous period;
the block verification module is used for verifying the block to be verified if the block to be verified is obtained;
and the block issuing module is used for issuing the block to be verified which passes verification before generating the block of the period.
In an alternative embodiment, the block to be verified carries the verifiable random number of the previous period; the block verification module comprises:
a verifiable random number acquisition unit, configured to acquire a verifiable random number of a previous period from the beacon chain network;
and the validity verification unit is used for verifying the validity of the block to be verified according to the obtained verifiable random number and the verifiable random number carried in the block to be verified.
In an alternative embodiment, the verifiable random number acquisition module 901 includes:
the block height determining unit is used for determining the target block height of the verifiable random number for storing the period according to the period sequence of the block discharging period;
a verifiable random number acquisition unit, configured to acquire a verifiable random number of the present period from a target block of the beacon chain network; the block height of the target block is the target block height.
In an alternative embodiment, the potential out-of-block nodes are at least some of the nodes obtained from the blockchain nodes of the business chain network.
In an alternative embodiment, the service chaining network is a public chaining network; the beacon chain network is a alliance chain network.
The node consensus device of the block chain network can execute the node consensus method of the block chain network provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of executing the node consensus method of each block chain network.
As an implementation of the node consensus method of each blockchain network, the disclosure further provides another alternative embodiment of an execution device for implementing the node consensus method of each blockchain network.
Referring to fig. 10, a node consensus apparatus 1000 of a blockchain network, configured for blockchain nodes in a beacon chain network, includes: a verifiable random number generation module 1001 and a verifiable random number transmission module 1002. Wherein,
a verifiable random number generation module 1001, configured to generate verifiable random numbers corresponding to different block-out periods of the service chain network in a consensus manner; the public trust of the beacon chain network is higher than that of the service chain network;
and the verifiable random number sending module 1002 is configured to send, to a potential block-out node of the service chain network, a verifiable random number of the period in any block-out period of the service chain network, so that when the corresponding potential block-out node determines itself to be the block-out node of the period according to the verifiable random number of the period, a block of the period is generated.
The embodiment of the disclosure generates verifiable random numbers with different block-out periods for a service chain network with lower public confidence through a beacon chain network with higher public confidence, and determines the block-out nodes with corresponding periods based on the verifiable random numbers with different block-out periods. The data security and reliability of the out-of-block node determination process is increased due to the verifiability of the verifiable random number, and the public trust of the beacon chain network that generated the verifiable random number. In addition, the randomness of the random number can be verified, the unpredictability is added to the determination process of the block-out node of the service chain network, so that the calculation difficulty of the block-out node calculation process of other parties is increased, the block-out node of a certain block-out period is prevented from being calculated by other third parties, network attack is carried out on the block-out node, the condition that the network is unavailable due to failure of node block-out is caused, and the safety and the stability of the operation process of the service chain network are enhanced.
In an alternative embodiment, the verifiable random number transmission module 1002 is further configured to:
and sending the verifiable random number of the next period to the potential block outlet node so that the potential block outlet node determines the block outlet node of the next period according to the verifiable random number of the next period, and verifying and/or issuing the block produced in the current period before generating the block of the new period by the block outlet node of the next period.
In an alternative embodiment, the verifiable random number sending module 1002 is specifically configured to:
and in any block-out period of the service chain network, sending the verifiable random number of the period to a potential block-out node in the service chain network, wherein the random countdown of the period is completed.
In an alternative embodiment, the verifiable random number transmission module 1002 is further configured to:
and after receiving the blocks to be verified sent by other block chain nodes in the service chain network in the random countdown process of the period, sending the verifiable random number of the previous period to the potential block outlet node so that the potential block outlet node performs validity verification on the blocks to be verified according to the obtained verifiable random number and the verifiable random number carried in the blocks to be verified.
In an alternative embodiment, the apparatus 1000 further comprises:
the block height determining module is used for determining the target block height for storing the verifiable random numbers according to the cycle sequence of the block outlet cycle corresponding to the verifiable random numbers;
a verifiable random number storage module for storing the verifiable random number into a target block of the beacon chain network for acquisition; the block height of the target block is the target block height.
In an alternative embodiment, verifiable random numbers corresponding to different block-out periods are generated based on the verifiable random number of the previous period;
and the verifiable random number of the last period corresponding to the first block-out period is initial reference information obtained by the common identification of all block link points in the beacon chain network.
In an alternative embodiment, the service chaining network is a public chaining network; the beacon chain network is a alliance chain network.
The node consensus device of the block chain network can execute the node consensus method of the block chain network provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of executing the node consensus method of each block chain network.
In the technical scheme of the disclosure, the related verifiable random number of different block-out periods, the total number of potential block-out nodes, the node numbers of the potential block-out nodes, the collection, storage, use, processing, transmission, provision, disclosure and other treatments of the blocks of different block-out periods and the like all conform to the regulations of related laws and regulations, and the public order is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 11 illustrates a schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 11, the apparatus 1100 includes a computing unit 1101 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
Various components in device 1100 are connected to I/O interface 1105, including: an input unit 1106 such as a keyboard, a mouse, etc.; an output unit 1107 such as various types of displays, speakers, and the like; a storage unit 1108, such as a magnetic disk, optical disk, etc.; and a communication unit 1109 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 1109 allows the device 1100 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 1101 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1101 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the node consensus method of a blockchain network. For example, in some embodiments, the node consensus method of the blockchain network may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1108. In some embodiments, some or all of the computer programs may be loaded and/or installed onto device 1100 via ROM 1102 and/or communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the node consensus method of a blockchain network described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the node consensus method of the blockchain network in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
Cloud computing (cloud computing) refers to a technical system that a shared physical or virtual resource pool which is elastically extensible is accessed through a network, resources can comprise servers, operating systems, networks, software, applications, storage devices and the like, and resources can be deployed and managed in an on-demand and self-service mode. Through cloud computing technology, high-efficiency and powerful data processing capability can be provided for technical application such as artificial intelligence and blockchain, and model training.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions provided by the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (25)

1. A node consensus method of a block chain network is applied to any potential block-out node in a service chain network, and comprises the following steps:
in any block-out period of the service chain network, obtaining the verifiable random number of the period from the beacon chain network; wherein the verifiable random number is generated by consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network;
determining whether the random number is a block outlet node of the period according to the verifiable random number of the period;
if yes, generating a block of the period;
wherein, in any block-out period of the service chain network, the verifiable random number in the period is obtained from the beacon chain network, which comprises the following steps:
starting random countdown in any block-out period of the service chain network;
after the countdown is completed, the verifiable random number of the period is obtained from the beacon chain network.
2. The method of claim 1, wherein the determining whether itself is the egress node of the present period based on the verifiable random number of the present period comprises:
and determining whether the self is the block-out node in the period according to the verifiable random number in the period, the total number of the potential block-out nodes and the self node number.
3. The method of claim 1, wherein the generating the block of time periods comprises:
and generating a block comprising the verifiable random number of the period, so that other block link points in the service chain network verify the validity of the block of the period according to the verifiable random number of the period.
4. The method of claim 1, wherein the method further comprises:
acquiring a verifiable random number of the next period from the beacon chain network;
determining a block outlet node of the next period according to the verifiable random number of the next period;
and sending the blocks of the period to the block outlet nodes of the next period, so that the block outlet nodes of the next period verify and/or issue the received blocks before generating the blocks of the new period.
5. The method of claim 4, wherein the determining the out-of-block node for the next cycle based on the verifiable random number for the next cycle comprises:
and determining the block-out node of the next period according to the verifiable random number of the next period, the total number of the potential block-out nodes and the node numbers of different potential block-out nodes.
6. The method of claim 1, wherein the method further comprises:
Waiting for blocks to be verified sent by other block chain nodes in the service chain network in a random countdown process; the block to be verified is generated by a block outlet node of the previous period;
if the block to be verified is obtained, verifying the block to be verified;
and before generating the blocks of the period, issuing the blocks to be verified which pass verification.
7. The method of claim 6, wherein the block to be verified carries a verifiable random number of a previous cycle; the verifying the block to be verified comprises the following steps:
acquiring the verifiable random number of the previous period from the beacon chain network;
and verifying the validity of the block to be verified according to the obtained verifiable random number and the verifiable random number carried in the block to be verified.
8. The method according to any of claims 1-7, wherein said obtaining the verifiable random number of the present period from the beacon chain network comprises:
determining the target block height of the verifiable random number for storing the period according to the period sequence of the block-out period;
acquiring a verifiable random number of the period from a target block of the beacon chain network; wherein the block height of the target block is the target block height.
9. The method of any of claims 1-7, wherein the potential out-of-block nodes are at least some nodes obtained from each blockchain node of the traffic chain network.
10. A node consensus method for a blockchain network, applied to blockchain nodes in a beacon chain network, comprising:
generating verifiable random numbers corresponding to different block-out periods of a service chain network through consensus; the public trust of the beacon chain network is higher than that of the service chain network;
in any block-out period of the service chain network, sending the verifiable random number of the period to the potential block-out node of the service chain network, so that when the corresponding potential block-out node determines itself to be the block-out node of the period according to the verifiable random number of the period, a block of the period is generated;
wherein, in any block-out period of the service chain network, sending the verifiable random number of the period to the potential block-out node of the service chain network comprises:
and in any block-out period of the service chain network, sending the verifiable random number of the period to a potential block-out node in the service chain network, wherein the random countdown of the period is completed.
11. The method of claim 10, wherein the method further comprises:
and sending the verifiable random number of the next period to the potential block outlet node so that the potential block outlet node determines the block outlet node of the next period according to the verifiable random number of the next period, and verifying and/or issuing the block produced in the current period before generating the block of the new period by the block outlet node of the next period.
12. The method of claim 10, wherein the method further comprises:
and after receiving the blocks to be verified sent by other block chain nodes in the service chain network in the random countdown process of the period, sending the verifiable random number of the previous period to the potential block outlet node so that the potential block outlet node performs validity verification on the blocks to be verified according to the obtained verifiable random number and the verifiable random number carried in the blocks to be verified.
13. The method of any of claims 10-12, wherein the method further comprises:
for each verifiable random number, determining the height of a target block storing the verifiable random number according to the cycle sequence of the block-out cycle corresponding to the verifiable random number;
Storing the verifiable random number in a target block of the beacon chain network for acquisition; wherein the block height of the target block is the target block height.
14. The method according to any of claims 10-12, wherein verifiable random numbers corresponding to different out-of-block periods are generated based on verifiable random numbers of a previous period;
and the verifiable random number of the last period corresponding to the first block-out period is initial reference information obtained by the common identification of all block link points in the beacon chain network.
15. A node consensus device of a blockchain network, configured at any potential out-block node in the blockchain network, comprising:
the verifiable random number acquisition module is used for acquiring the verifiable random number of the period from the beacon chain network in any block-out period of the service chain network; wherein the verifiable random number is generated by consensus of each block link point in the beacon chain network; the public trust of the beacon chain network is higher than that of the service chain network;
the block-out node determining module is used for determining whether the block-out node is a block-out node in the period according to the verifiable random number in the period;
The block generation module is used for generating a block with a period if the block is yes;
wherein, the verifiable random number acquisition module includes:
the countdown starting unit is used for starting random countdown in any block-out period of the service chain network;
and the verifiable random number acquisition unit is used for acquiring the verifiable random number of the period from the beacon chain network after the countdown is completed.
16. The apparatus of claim 15, wherein the block-out node determining module is specifically configured to:
and determining whether the self is the block-out node in the period according to the verifiable random number in the period, the total number of the potential block-out nodes and the self node number.
17. The apparatus of claim 15, wherein the block generation module is specifically configured to:
and generating a block comprising the verifiable random number of the period, so that other block link points in the service chain network verify the validity of the block of the period according to the verifiable random number of the period.
18. The apparatus of claim 15, wherein:
the verifiable random number acquisition module is also used for acquiring the verifiable random number of the next period from the beacon chain network;
The block-out node determining module is further used for determining a block-out node of the next period according to the verifiable random number of the next period;
the device also comprises a block sending module, which is used for sending the blocks of the period to the block outlet nodes of the next period, so that the block outlet nodes of the next period verify and/or issue the received blocks before generating the blocks of the new period.
19. A node consensus apparatus for a blockchain network, configured for blockchain nodes in a beaconing chain network, comprising:
the verifiable random number generation module is used for generating verifiable random numbers corresponding to different block-out periods of the service chain network in a consensus mode; the public trust of the beacon chain network is higher than that of the service chain network;
the verifiable random number sending module is used for sending the verifiable random number of the period to the potential block outlet node of the service chain network in any block outlet period of the service chain network, so that the corresponding potential block outlet node can generate a block of the period when determining the corresponding potential block outlet node to be the block outlet node of the period according to the verifiable random number of the period;
the verifiable random number sending module is specifically configured to:
And in any block-out period of the service chain network, sending the verifiable random number of the period to a potential block-out node in the service chain network, wherein the random countdown of the period is completed.
20. The apparatus of claim 19, wherein the verifiable random number transmission module is further configured to:
and sending the verifiable random number of the next period to the potential block outlet node so that the potential block outlet node determines the block outlet node of the next period according to the verifiable random number of the next period, and verifying and/or issuing the block produced in the current period before generating the block of the new period by the block outlet node of the next period.
21. The apparatus of claim 20, wherein the verifiable random number transmission module is further configured to:
and after receiving the blocks to be verified sent by other block chain nodes in the service chain network in the random countdown process of the period, sending the verifiable random number of the previous period to the potential block outlet node so that the potential block outlet node performs validity verification on the blocks to be verified according to the obtained verifiable random number and the verifiable random number carried in the blocks to be verified.
22. The apparatus of any of claims 19-21, wherein the apparatus further comprises:
the block height determining module is used for determining the target block height for storing the verifiable random numbers according to the cycle sequence of the block outlet cycle corresponding to the verifiable random numbers;
a verifiable random number storage module for storing the verifiable random number into a target block of the beacon chain network for acquisition; wherein the block height of the target block is the target block height.
23. The apparatus of any of claims 19-21, wherein verifiable random numbers corresponding to different out-of-block periods are generated based on a verifiable random number of a previous period;
and the verifiable random number of the last period corresponding to the first block-out period is initial reference information obtained by the common identification of all block link points in the beacon chain network.
24. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the node consensus method of the blockchain network of any of claims 1-14.
25. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the node consensus method of the blockchain network according to any of claims 1-14.
CN202310760183.6A 2023-06-26 2023-06-26 Node consensus method, device, equipment and medium of block chain network Active CN116545765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310760183.6A CN116545765B (en) 2023-06-26 2023-06-26 Node consensus method, device, equipment and medium of block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310760183.6A CN116545765B (en) 2023-06-26 2023-06-26 Node consensus method, device, equipment and medium of block chain network

Publications (2)

Publication Number Publication Date
CN116545765A CN116545765A (en) 2023-08-04
CN116545765B true CN116545765B (en) 2023-12-19

Family

ID=87454415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310760183.6A Active CN116545765B (en) 2023-06-26 2023-06-26 Node consensus method, device, equipment and medium of block chain network

Country Status (1)

Country Link
CN (1) CN116545765B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886693A (en) * 2019-03-13 2019-06-14 百度在线网络技术(北京)有限公司 Common recognition implementation method, device, equipment and the medium of block catenary system
CN115941329A (en) * 2022-12-08 2023-04-07 上海零数众合信息科技有限公司 Block link point consensus method, device, equipment and storage medium
CN116051276A (en) * 2022-11-13 2023-05-02 李军 Block chain-based decentralised digital asset trading system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10929352B2 (en) * 2018-05-29 2021-02-23 Oracle International Corporation Securing access to confidential data using a blockchain ledger

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886693A (en) * 2019-03-13 2019-06-14 百度在线网络技术(北京)有限公司 Common recognition implementation method, device, equipment and the medium of block catenary system
CN116051276A (en) * 2022-11-13 2023-05-02 李军 Block chain-based decentralised digital asset trading system
CN115941329A (en) * 2022-12-08 2023-04-07 上海零数众合信息科技有限公司 Block link point consensus method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
浅谈区块链技术及应用价值;李双远;张明齐;;吉林化工学院学报(03);全文 *

Also Published As

Publication number Publication date
CN116545765A (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN109361740B (en) Block generation method, device, equipment and medium of block chain
CN108984645B (en) Block chain processing method, device, equipment and storage medium
CN111163182B (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
CN111741026B (en) Cross-chain transaction request processing method, device, equipment and storage medium
CN110535970B (en) Evidence storing and processing method, device, equipment and medium of judicial chain
EP3857850A1 (en) High throughput blockchain consensus systems and methods with low finalization time
CN111737365B (en) Storage certificate processing method, device, equipment and storage medium
EP3889867A1 (en) Block chain-based asset processing method, device, apparatus and storage medium
CN112650764A (en) Cross-chain data processing method, device, equipment and storage medium
CN112738253B (en) Block chain-based data processing method, device, equipment and storage medium
CN111260474B (en) Asset transaction method, device, equipment, system and storage medium of cross-blockchain
US20210272075A1 (en) Methods and devices for controlling a mining pool for multiple blockchain networks
CN112636929B (en) Group service implementation method, device, equipment and storage medium
CN114422155B (en) Proposal consensus execution method, block chain system, device and storage medium
CN110866740A (en) Processing method and device for block chain transaction request, electronic equipment and medium
US20220217004A1 (en) Systems and methods for non-parallelised mining on a proof-of-work blockchain network
CN111147242A (en) Block generation method and device, electronic equipment and storage medium
CN116545765B (en) Node consensus method, device, equipment and medium of block chain network
CN115964755B (en) Data authorization and verification method, device, equipment and storage medium
CN113935069B (en) Data verification method, device and equipment based on block chain and storage medium
CN113420275B (en) Data connection processing method, related device and computer program product
CN110585717A (en) Information processing method and device
CN111339571A (en) Block chain key management method, device, equipment and storage medium
CN114362969B (en) Data verification method, device and equipment based on block chain and storage medium
KR102553441B1 (en) Representative and canditate selection method of blockchain network using comtitive bidding and blockchain network

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