CN113472561B - A blockchain data processing method and device - Google Patents
A blockchain data processing method and device Download PDFInfo
- Publication number
- CN113472561B CN113472561B CN202010247629.1A CN202010247629A CN113472561B CN 113472561 B CN113472561 B CN 113472561B CN 202010247629 A CN202010247629 A CN 202010247629A CN 113472561 B CN113472561 B CN 113472561B
- Authority
- CN
- China
- Prior art keywords
- node
- block
- consensus
- consensus node
- message
- 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
Links
- 238000003672 processing method Methods 0.000 title abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 57
- 238000012545 processing Methods 0.000 claims abstract description 11
- 108091035707 Consensus sequence Proteins 0.000 claims description 49
- 238000012795 verification Methods 0.000 claims description 38
- 230000015654 memory Effects 0.000 claims description 33
- 238000012790 confirmation Methods 0.000 claims description 26
- 238000004891 communication Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 12
- 238000005070 sampling Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 7
- 238000010200 validation analysis Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 101150012579 ADSL gene Proteins 0.000 description 1
- 102100020775 Adenylosuccinate lyase Human genes 0.000 description 1
- 108700040193 Adenylosuccinate lyases Proteins 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000009414 blockwork Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/30—Decision processes by autonomous network management units using voting and bidding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1046—Joining mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/46—Secure multiparty computation, e.g. millionaire problem
- H04L2209/463—Electronic voting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Accounting & Taxation (AREA)
- Mathematical Physics (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a block chain data processing method and equipment thereof, which are used for processing block chain data. The method includes the steps that a first consensus node selects a second consensus node, the first consensus node corresponds to an N-th block, the second consensus node corresponds to an M-th block, M is larger than N, the first consensus node generates first consensus serial number information, and the first consensus serial number information comprises information of the second consensus node, so that a first target node confirms that the first target node belongs to the second consensus node according to the first consensus serial number information. In the embodiment of the application, different blocks are confirmed by selecting different consensus nodes, so that the safety of the block chain system is improved.
Description
Technical Field
The embodiment of the application relates to the field of computers, in particular to a block chain data processing method and equipment thereof.
Background
Blockchain technology is well known today where information technology is evolving at a high rate. Blockchains are a distributed ledger maintained by multiple nodes together, employing a special data structure "blockwork" to record transaction transactions.
An authenticated blockchain, also known as a "private blockchain" or "federated blockchain. Authentication blockchain requires nodes to join the blockchain system through an authentication service and maintain a list of nodes. Thanks to this list of nodes, the authenticated blockchain can agree on the blockcontents and order using a distributed fault-tolerant protocol with higher performance and less power consumption. In an authenticated blockchain, some special nodes are set as consensus nodes. These consensus nodes run a distributed consistency protocol responsible for negotiating about the content and order of the blocks, and other nodes are responsible for collecting user transactions only, storing acknowledgement blocks, and executing user transactions.
In the existing authentication type blockchain, a part of nodes are preset and fixed to serve as consensus nodes, and when the consensus nodes are deployed on a public network, attacks of illegal third parties are met, because the consensus nodes are preset and fixed, the illegal third parties can easily find the fixed consensus nodes and develop directional attacks, once the number of the attacked nodes in the fixed consensus nodes exceeds the number which can be born by a consensus protocol, the system can not continue to serve, and the safety of the blockchain system is affected.
Disclosure of Invention
The embodiment of the application provides a block chain data processing method and equipment thereof, which are used for confirming different blocks through different consensus nodes in the block chain data processing, so that the difficulty of attacking the consensus nodes by an illegal third party is increased, and the safety of a block chain system is improved.
The first aspect of the application provides a data processing method.
In the proposal of a round of blocks, the first consensus node of the current round of blocks selects the second consensus node of the following blocks, namely when the first consensus node corresponds to the Nth block, the second consensus node corresponds to the Mth block, and M is larger than N.
After the first consensus node elects the second consensus node, the first consensus node generates first consensus sequence number information, wherein the first consensus sequence number information comprises information of the second consensus node, and a first target node in other multiple nodes in the blockchain can confirm that the first target node belongs to the second consensus node according to the first consensus sequence number information.
In the embodiment of the application, the second consensus node for confirming the Mth block is selected through the first consensus node, so that when the Mth block is confirmed, confirmation can be carried out through the second consensus node, namely different blocks are confirmed through different consensus nodes, the difficulty of illegal third party attack on the consensus node is increased, and the safety of the blockchain system is improved.
In a first implementation manner of the first aspect of the present application, after the first consensus node generates the first sequence number information, the first consensus node generates an nth block by acquiring a local unacknowledged user transaction, and the nth block includes the first consensus sequence number information, and the first consensus node generates a first proposal message, where the first proposal message is used to acknowledge the nth block, and the first proposal message includes the nth block, and the first consensus node sends the first proposal message to other nodes in the blockchain after generating the first proposal message.
In the embodiment of the application, the first consensus serial number information is packed into the N-th block of the current block and is sent to other nodes, so that the process of confirming the block in each round can select the following consensus nodes, and the fault tolerance of the scheme is improved.
According to the first aspect of the embodiment of the present application or the first implementation manner of the first aspect of the embodiment of the present application, in a second implementation manner of the first aspect of the embodiment of the present application, the first consensus node encrypts the first consensus sequence number information to obtain the second consensus sequence number information, when the first consensus node generates the first proposal message, the nth block is packed into the first proposal message, and the nth block includes the second consensus sequence number information, and indirectly, the first proposal message includes the second consensus sequence number information.
In the embodiment of the application, the security of the first consensus serial number information is improved by encrypting the first consensus serial number information.
According to the first aspect of the embodiment of the present application, the first implementation manner of the first aspect of the embodiment of the present application, or the second implementation manner of the first aspect of the embodiment of the present application, in a third implementation manner of the first aspect of the embodiment of the present application, the first common node encrypts the first common sequence number information by using the public key of the elected second common node to obtain the second common sequence number information, where the public key of the second common node is the sequence number of the second common node.
In the embodiment of the application, the security of the first consensus serial number information is improved by encrypting the first consensus serial number information through the public key of the second consensus node.
According to a first aspect of the present application, a first implementation manner of the first aspect, or a third implementation manner of the first aspect, in a fourth implementation manner of the first aspect of the present application, the first consensus node elects a first proposal node, the first proposal node is used for submitting a second proposal message, the second proposal message is used for confirming an M-block, i.e. the first proposal node is used for confirming an M-block, and the first proposal node belongs to a second consensus node.
In the embodiment of the application, the first consensus node elects the first proposal node for submitting the second proposal message, thereby improving the realizability of the proposal.
According to a first aspect of the embodiment, a first implementation manner of the first aspect, or a fourth implementation manner of the first aspect of the embodiment, in a fifth implementation manner of the first aspect of the embodiment, the first consensus node selects a plurality of first proposal candidate nodes from the nodes of the blockchain, the plurality of first proposal candidate nodes are selected by internal selection, and the first proposal node is selected, that is, the first proposal node belongs to the plurality of first proposal candidate nodes.
In the embodiment of the application, the first consensus node selects the first proposal node by selecting a plurality of first proposal candidate nodes, and then the first proposal node is selected by the plurality of first proposal candidate nodes, thereby improving the fault tolerance of the scheme.
According to a first aspect of the embodiment of the present application, a first implementation manner of the first aspect, or a fifth implementation manner of the first aspect of the embodiment of the present application, in a sixth implementation manner of the first aspect of the present application, the first common node elects a first receiving node, where the first receiving node is used to confirm the mth block, and the second common node includes the first receiving node.
In the embodiment of the application, the first consensus node confirms the Mth block by electing the first receiving node, namely, different blocks are confirmed by different receiving nodes in each round of block confirmation, thereby improving the safety of the block chain.
According to the first aspect of the embodiment of the present application, the first implementation manner of the first aspect, or the sixth implementation manner of the first aspect of the embodiment of the present application, in a seventh implementation manner of the first aspect of the present application, the first consensus node elects the first receiving node by means of a random sampling function.
In the embodiment of the application, the first consensus node elects the first receiving node in a random sampling function mode, and can randomly and uniformly elect the receiving node in the block chain.
According to the first aspect of the embodiment of the present application, the first implementation manner of the first aspect, or the seventh implementation manner of the first aspect of the embodiment of the present application, in an eighth implementation manner of the first aspect of the present application, when a new first newly added node needs to be added to the blockchain, the first newly added node may find a node in the blockchain to initiate a joining request, when the first newly added node receives the joining request of the first newly added node, the first newly added node may send a verification request to a verification server, the verification request is used to verify the first newly added node, the verification server may verify the first newly added node after receiving the verification request, and when the verification passes, the verification server may send first newly added information to the first newly added node, where the first newly added information includes information of the new first newly added node. The first consensus node then generates a first new transaction message, the first new transaction message including information of the first new node, and the first consensus node sends the first new transaction message to other nodes in the blockchain, so that the other nodes in the blockchain can also store the first new transaction message, and in the proposal of the next round of blocks, the first new transaction message can be quickly confirmed, and the first new node can be quickly added in the blockchain.
In the embodiment of the application, the first consensus node can improve the difficulty of adding an illegal third party into the blockchain by verifying the information of the first newly added node to the verification server, thereby improving the security of the blockchain.
According to the first aspect of the present application, the first implementation manner of the first aspect, or the eighth implementation manner of the first aspect of the present application, in a ninth implementation manner of the first aspect of the present application, after the first added node determines to join the blockchain, if the public key of the first added node does not appear in the subsequent transactions of L blocks, the first added node is marked as a failed node by other nodes in the blockchain, that is, is deleted from the blockchain, and L may be a positive integer greater than or equal to 1.
In the embodiment of the application, the effective period of the first newly added node is limited, so that the node which is inactive in the blockchain for a long time is disabled, and the occupation of the blockchain resource is avoided.
According to the first aspect, the first implementation manner of the first aspect, or the ninth implementation manner of the first aspect, in a tenth implementation manner of the first aspect, after the first common node sends the first proposal message to other nodes in the blockchain, the first common node receives P first reply messages, where the P first reply messages are sent to the first common node by other nodes in the blockchain, and the first common node parses the P first reply messages to obtain I second reply messages, where the I second reply messages are valid acknowledgement messages, and the I valid acknowledgement messages are less than or equal to the P first reply messages.
If I is greater than the preset threshold, the first consensus node updates the block state of the nth block to a confirmation state, and the first consensus node generates a first confirmation message indicating the block state of the nth block, and sends the first confirmation message to other nodes in the blockchain so that the other nodes can confirm the state of the nth block through the first confirmation message.
In the embodiment of the application, when the recovery quantity of the effective confirmation message is larger than the preset threshold value, the state of the N block is determined, and the stability of the block chain is ensured.
According to the first aspect of the embodiment, the first implementation manner of the first aspect, or the tenth implementation manner of the first aspect of the embodiment, in an eleventh implementation manner of the first aspect of the application, after the first common node sends the first proposal message to other nodes in the blockchain, the first common node receives P first reply messages, where the P first reply messages are sent to the first common node by other nodes in the blockchain, and the first common node parses the P first reply messages to obtain I second reply messages, where the I second reply messages are valid acknowledgement messages, and the I valid acknowledgement messages are less than or equal to the P first reply messages.
If I is smaller than the preset threshold, the first consensus node updates the block status of the nth block to be in doubt, and the first consensus node generates a first acknowledgement message indicating the block status of the nth block, and sends the first acknowledgement message to other nodes in the blockchain, so that other nodes can acknowledge the state of the nth block through the first acknowledgement message.
In the embodiment of the application, when the recovery quantity of the effective confirmation message is smaller than the preset threshold value, the state of the N block is determined to be in doubt state, so that the stability of the block chain is ensured.
According to the first aspect, the first implementation manner of the first aspect, or the eleventh implementation manner of the first aspect, in the twelfth implementation manner of the first aspect, the first proposal message further includes a message of an in-doubt block, the message of the in-doubt block indicates that a block state of an H-th block is an in-doubt block, H is smaller than N, that is, the H-th block is a block before the N-th block, after the first proposal message is sent by the first consensus node to other nodes in the blockchain, the first consensus node receives P first reply messages, which are sent by other nodes in the blockchain to the first consensus node, and the first consensus node parses the P first reply messages to obtain I second reply messages, which are valid acknowledgement messages, and the I valid acknowledgement messages are smaller than or equal to the P first reply messages.
The first consensus node updates the block status of the H-th block according to the I second reply messages.
In the embodiment of the application, when the suspicious block exists in the blockchain, the block state of the suspicious block is confirmed through the reply message of other nodes in the blockchain when the Nth block is confirmed, so that the feasibility of the scheme is improved.
According to the first aspect of the embodiment, the first implementation manner of the first aspect, or the twelfth implementation manner of the first aspect of the embodiment, in a thirteenth implementation manner of the first aspect of the embodiment, if the acknowledgement message of the H-th block exists in the I second reply messages, the first consensus node updates the block state of the H-th block to be the acknowledgement state.
In the embodiment of the application, the block state of the suspicious block is confirmed through the reply messages of other nodes in the block chain, so that the feasibility of the scheme is improved.
According to the first aspect of the embodiment of the present application, the first implementation manner of the first aspect, or the thirteenth implementation manner of the first aspect of the embodiment of the present application, in a fourteenth implementation manner of the first aspect of the present application, if no acknowledgement message of the H-th block exists in the I second reply messages, and the difference between N and H is greater than a preset threshold, the first consensus node updates the block state of the H-th block to be the acknowledgement state.
In the embodiment of the application, the H block is determined to be the block in the confirmation state by the difference value between N and H being larger than the preset threshold value, so that the feasibility of the scheme is improved.
According to the first aspect of the embodiment of the present application, the first implementation manner of the first aspect, or the fourteenth implementation manner of the first aspect of the embodiment of the present application, in a fifteenth implementation manner of the first aspect of the present application, if no acknowledgement message of the H-th block exists in the I first reply messages, and the difference between N and H is smaller than a preset threshold, the first consensus node updates the block state of the H-th block to be in doubt.
In the embodiment of the application, the difference value between N and H is smaller than the preset threshold value to confirm that the H block is the block in the suspicious state, thereby improving the feasibility of the scheme.
The second aspect of the present application provides a data processing method.
The first target node receives a first proposal message sent by a first consensus node, wherein the first proposal message comprises information of an N-th block and a second consensus sequence number, the information of the second consensus sequence number is obtained by encrypting the information of the first consensus sequence number, the first consensus sequence number comprises information of the second consensus node, the second consensus node is obtained by electing the first consensus node, the second consensus node is an consensus node of an M-th block and is used for determining the M-th block, and M is larger than N.
The first target node decrypts the second common serial number information to obtain decryption information, and the first target node determines that the first target node is the common node of the Mth block through the decryption information.
In the embodiment of the application, the first target node determines that the first target node is the consensus node of the Mth block by analyzing the second consensus serial number information, so that the Mth block can be confirmed through the first target node, namely, different blocks are confirmed through different nodes in each round, and the safety of the block chain system is improved.
According to a first implementation manner of the second aspect of the present embodiment, before the first target node receives the first proposal message sent by the first consensus node, the first target node does not receive the proposal request of the Q block within a preset period of time T, and adds a blank Q block locally, and marks the block state of the Q block as an in-doubt block.
In the embodiment of the application, if the first target node does not receive the proposal message of a certain block within a certain time, a blank doubtful block is locally added, so that the fault tolerance of the scheme is improved.
According to the second aspect of the embodiment of the present application or the first implementation manner of the second aspect of the embodiment of the present application, in a second implementation manner of the second aspect of the embodiment of the present application, the first target node sends a third reply message to the first consensus node with a probability of W, where the third reply message does not include information for confirming the nth block, and the W is greater than 0.
In the embodiment of the application, the first target node sends the message which does not contain the N block for confirming to the first consensus node through the probability of W, so that the probability that an illegal third party acquires the consensus node in the block chain through intercepting the message can be reduced, and the safety of the block chain system is further improved.
According to the second aspect of the embodiment of the present application or the second implementation manner of the second aspect of the embodiment of the present application, in a third implementation manner of the second aspect of the embodiment of the present application, the second common serial number information is obtained by encrypting the first common serial number information with the public key of the first target node, when the first target node decrypts with the private key stored in the trusted execution environment TEE of the first target node, the decryption information can be obtained, and then the first target node confirms that the first target node belongs to the second common node.
In the embodiment of the application, the first target node decrypts the second consensus serial number information through the private key stored in the TEE to confirm that the first target node belongs to the second consensus node, thereby improving the safety of the scheme.
A third aspect of an embodiment of the present application provides a computer apparatus.
The member module is used for electing a second consensus node, the first consensus node corresponds to the Nth block, the second consensus node corresponds to the Mth block, and M is larger than N;
and the consensus module is used for generating first consensus sequence number information which comprises information of a second consensus node, and the information of the second consensus node is used for confirming that the target node belongs to the second consensus node.
Optionally, the computer device further comprises:
the block chain core module is used for generating an N-th block, wherein the N-th block comprises first consensus serial number information;
The blockchain kernel module is further configured to generate a first proposal message, the first proposal message being used to acknowledge the nth block;
and the network module is used for sending the first proposal message.
Optionally, the consensus module is further configured to encrypt the first consensus sequence number information to obtain second consensus sequence number information;
the first proposal message includes second consensus sequence number information.
Optionally, the public key is used to encrypt the first public key sequence number information to obtain the second public key sequence number information, and the public key is the sequence number of the second public key node.
Optionally, the member module is specifically configured to elect a first proposal node, the first proposal node is configured to submit a second proposal message, the second proposal message is configured to confirm the mth block, and the first proposal node belongs to the second consensus node.
Optionally, the member module is specifically configured to elect a plurality of first proposal candidate nodes, the plurality of first proposal candidate nodes being configured to elect a first proposal node, the plurality of first proposal candidates including the first proposal node.
Optionally, the member module is specifically configured to elect a first receiving node, where the first receiving node is configured to confirm the mth block, and the first receiving node belongs to the second consensus node.
Optionally, the member module is specifically configured to elect the first receiving node by using a random sampling function.
Optionally, the network module receives a joining request of the first newly added node, where the joining request is used for requesting joining in a blockchain, and the blockchain is the blockchain where the first consensus node is located;
The network module is also used for sending a verification request to the verification server, wherein the verification request is used for verifying the first newly-added node;
The network module is also used for receiving first newly-increased information sent by the verification server, wherein the first newly-increased information comprises information of newly-increased nodes;
the block chain core module generates a first new transaction message, wherein the first new transaction message comprises first new information;
the network module sends a first newly added transaction message.
Optionally, after the first added node determines to join the blockchain, if the public key of the first added node is not present in transactions for L blocks, the first added node is deleted from the blockchain, L being a positive integer greater than or equal to 1.
Optionally, the computer device further comprises:
The processor is used for analyzing the P first reply messages to obtain I second reply messages, wherein the second reply messages are effective confirmation messages, and I is smaller than or equal to P;
if the I is larger than the preset threshold, the block chain core module is further used for updating the state of the Nth block to be a confirmation state;
the processor is further configured to generate a first acknowledgement message, the first acknowledgement message representing a status of the nth block;
the network module is also configured to send a first acknowledgement message.
Optionally, the network module is further configured to receive P first reply messages;
the processor analyzes the P first reply messages to obtain I second reply messages, wherein the second reply messages are valid confirmation messages, and I is smaller than or equal to P;
if the I is smaller than the preset threshold, the block chain core module is further used for updating the state of the Nth block to be in doubt;
the processor is further configured to generate a first acknowledgement message, the first acknowledgement message representing a status of the nth block;
the network module is also configured to send a first acknowledgement message.
Optionally, the first proposal message includes an in-doubt block message, where the in-doubt block message indicates that a block state of an H-th block is an in-doubt block, H is smaller than N, and the network module is further configured to receive P first reply messages;
the processor analyzes the P first reply messages to obtain I second reply messages, wherein the second reply messages are valid confirmation messages, and I is smaller than or equal to P;
The block chain core module is further configured to update the block status of the H block according to the I second reply messages.
Optionally, if the acknowledgement message of the H block exists in the I second reply messages, the blockchain core module is specifically configured to update the block status of the H block to be the acknowledgement status.
Optionally, if the acknowledgement message of the H block does not exist in the I second reply messages, and the difference between N and H is greater than the preset threshold, the blockchain core module is further configured to update the block state of the H block to be the acknowledgement state.
And if the acknowledgement message of the H-th block does not exist in the I second reply messages and the difference value between N and H is smaller than the preset threshold value, the block chain core module is specifically used for updating the block state of the H-th block to be in doubt state.
A fourth aspect of an embodiment of the present application provides a computer device.
The network module is used for receiving a first proposal message sent by a first consensus node, wherein the first proposal message comprises an N-th block and second consensus serial number information, the second consensus serial number information is obtained by encrypting the first consensus serial number information, the first consensus serial number comprises information of the second consensus node, the second consensus node is obtained by electing the first consensus node, the second consensus node is an consensus node of the M-th block, and M is more than N;
a processor for decrypting the second consensus sequence number information to obtain decryption information;
And the member module is used for determining that the first target node is the consensus node of the Mth block through the decryption information.
Optionally, if the proposal request of the Q-th block is not received within the preset time period T, the computer device further includes:
the block chain core module is used for adding the Q block, wherein the Q block is a blank block, and the state of the Q block is in doubt.
Optionally, the network module is further configured to send a third reply message to the first consensus node with a probability of W, where the third reply message does not include information for confirming the nth block, and W is greater than 0.
Optionally, the second common serial number information is obtained by encrypting the first common serial number information through a public key of the computer device, and the computer device further includes:
And the consensus module is used for decrypting the second consensus serial number information through a private key of the computer equipment to obtain decryption information, and the private key is stored in a Trusted Execution Environment (TEE) of the computer equipment.
A fifth aspect of an embodiment of the present application provides a computer apparatus.
A processor and a memory, the processor and the memory electrically coupled;
and a processor for reading and executing the program instructions stored in the memory, which when executed by the processor, cause the computer device to perform a method as in the embodiments of the first aspect of the application.
Optionally, the computer device further comprises:
And the communication interface is used for sending or receiving information.
A sixth aspect of an embodiment of the present application provides a computer device.
A processor and a memory, the processor and the memory electrically coupled;
And a processor for reading and executing the program instructions stored in the memory, which when executed by the processor, cause the computer device to perform a method according to an embodiment of the second aspect of the application.
Optionally, the computer device further comprises:
And the communication interface is used for sending or receiving information.
A seventh aspect of the present embodiment provides a computer storage medium having stored therein instructions which, when executed on the computer, cause the computer to perform a method according to an embodiment of the first aspect of the present application.
An eighth aspect of the embodiments of the present application provides a computer program product which, when executed on a computer, causes the computer to perform a method according to an embodiment of the first aspect of the present application.
From the above technical solutions, the embodiment of the present application has the following advantages:
The second consensus node for confirming the Mth block is selected through the first consensus node, so that when the Mth block is confirmed, confirmation can be carried out through the second consensus node, namely different blocks are confirmed through different consensus nodes, the difficulty of an illegal third party in attacking the consensus node is increased, and the safety of the block chain system is improved.
Drawings
FIG. 1 is a schematic diagram of a data processing method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another flow chart of a data processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a computer device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another structure of a computer device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another structure of a computer device according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another structure of a computer device according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another structure of a computer device according to an embodiment of the present application;
fig. 9 is another schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a data processing method, which is used for different consensus nodes to confirm different blocks in block chain data processing, so that the difficulty of illegal third party attack on the consensus nodes is increased, and the safety of a block chain system is improved.
Referring to fig. 1, a schematic diagram of a block chain data processing method according to the present application is shown.
As shown in fig. 1, the blockchain includes a plurality of nodes, including a common node and a common node 103, the common node includes a proposed node 101 and a receiver node 102, and an authentication server 104, and the plurality of nodes or the plurality of nodes and the authentication server are connected through a wired network or a wireless network.
If the connection is through a wired network, the general connection form is an optical fiber network, it will be understood that the connection may also be through other wired network connections, such as ADSL connection, wired broadband connection, etc., and is not limited in particular herein, if the connection is through a wireless network, it may be through a WLAN connection (i.e., wi-fi connection), it may be understood that the connection may also be through other wireless network connections, such as bluetooth connection, data network connection, such as 2G GPRS or EDGE and CDMA,3G WCDMA, CDMA,4G TD-LTE, FDD-LTE, 5G, 6G, etc., and is not limited in particular herein.
The block chain provided by the application operates in a P2P network mode, the block contents and the sequence are agreed between nodes through a distributed consensus protocol, and only one block chain is confirmed. Each block mainly comprises three components, namely 1, the hash value of the previous block, 2, orderly arranged transaction transactions, and 3, metadata (such as a signature provided by a proposer node of the block) added by a consensus protocol, wherein each block stores the hash value of the previous block to form a chain structure, the hash value of the subsequent block is inconsistent when the block in the middle of the chain is modified, and the mechanism ensures that the blocks on the block chain are difficult to tamper.
It should be noted that, the blockchain provided by the present application is an authentication type blockchain, and the authentication type blockchain requires that nodes join the blockchain system through an authentication service of an authentication server, and maintains a node list. In an authenticated blockchain, some special nodes are set as consensus nodes running a distributed agreement, responsible for negotiating about the content and order of the blocks, and other common nodes are only responsible for receiving user transaction transactions, storing and validating the blocks, and executing user transaction transactions.
The node in the present application may be a device with a wireless transceiver function, or may be a device that only supports wired transmission, which is not limited herein. For example, the node may be a mobile phone, a tablet (Pad), a desktop computer, a notebook computer, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a vehicle-mounted terminal device, a wireless terminal in unmanned (SELF DRIVING), a wireless terminal in telemedicine (remote media), a wireless terminal in smart grid (SMART GRID), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (SMART CITY), a wireless terminal in smart home (smart home), a wearable terminal device, and so on.
In the blockchain provided by the application, the proposed node 101 is used for proposing the current block of the round, the proposed node 101 sends a proposal message to other nodes, the proposal message contains the content of the block of the round and related information, when the ordinary node 103 receives the proposal message, the ordinary node 103 stores the content of the block contained in the proposal message into a local blockchain core module, when the receiver node 102 receives the proposal message, the receiver node 102 also stores the content of the block contained in the proposal message into the local blockchain core module, and replies a confirmation message to the proposed node 101, and when the proposed node 101 receives the confirmation message sent by the receiver node 102, the state of the block is confirmed according to the confirmation message, so that the confirmation of the block of the round is completed.
It should be noted that, in the node of the blockchain provided by the application, a trusted execution environment module (Trusted Execution Environment, TEE) is built in, and the program and the data in the trusted execution environment module are stored in a memory area isolated from the common execution environment, so that the data and the program in the trusted execution environment module can not be extracted or tampered by an illegal third party. It should be understood that, in the practical application, the specific form of the trusted execution environment module may be a module implemented by matching software and hardware, or may be a single physical module, which is not limited herein.
The trusted execution environment module provides two security features, namely confidentiality (confidentiality) and integrity (integrity), wherein confidentiality is that data and codes of a TEE program cannot be snooped by an illegal third party such as an unreliable operating system and the like, because a memory area storing the data and codes is isolated from a common unreliable memory, and integrity is that the memory area cannot be tampered by an external illegal third party, and meanwhile, the TEE execution provides a remote verification mechanism for a user, so that a specific program is confirmed to be really in a real TEE and not completed through a virtual machine.
The verification server 104 in the blockchain may be a separate server device or may be a cloud platform with verification functions, which is not limited herein. The primary function of the validation server 104 is to distinguish between a real TEE hardware and virtual TEE hardware (e.g., virtual machines) that a user can simulate with a virtual machine, but the actual simulated hardware is actually a piece of software on the host, so that the real TEE is not secure.
In the practical application process, the nodes in the framework can comprise several modules, namely a TEE module, a network module, a blockchain core module and an operating system. The TEE module can also comprise a member module, a consensus module and a private key. The member module is responsible for maintaining a list of nodes, ordered according to the public keys (accounts) of the individual nodes. The consensus module is responsible for running a formula algorithm of the blockchain system, running in the TEE ensures that randomly selected consensus nodes follow the algorithm, and hiding the identity information of the consensus nodes. A private key, generated and visible only inside the TEE, is used to sign all messages sent by the TEE, thereby proving that the sent message is indeed from inside the TEE.
The network module is used for broadcasting data between nodes by utilizing gossip protocol, and the functions of the blockchain core module can comprise taking charge of locally storing the confirmed blocks, maintaining a user transaction pool to be confirmed, for example, after a user transaction is confirmed, deleting the confirmed user transaction from the user transaction pool to be confirmed, taking charge of forming new blocks and taking charge of executing the confirmed transactions.
It should be noted that the number of nodes in the frame of the blockchain provided by the present application is only an example, in the practical application process, more common nodes and common nodes may be included, for example, the number of common nodes may be set according to the network scale, and in an alternative manner, the number of common nodes may be set to one tenth to one hundredth of the total number of nodes, which is not limited herein.
It is further understood that the mode of forming the modules in the node provided by the present application is also merely an example, and in the practical application process, more modules, such as an input/output module, etc., may be included, or only some of the above modules may be present, which is not limited according to the practical application situation.
The following describes a data processing method in an embodiment of the present application in connection with a data processing framework of a blockchain provided by the present application in fig. 1.
In the embodiment of the application, when the block chain system confirms the block, two working modes exist, namely a common mode, namely that no blank suspicious block in the previous block needs to be confirmed, the current block is directly confirmed, and a query mode, namely that the blank suspicious block in the previous block needs to be confirmed, the query mode is started, and the current block is simultaneously confirmed. For the above two cases, embodiments of the present application will be described separately.
1. No blank in-doubt block needs to be validated before the current block is validated.
Referring to fig. 2, a flow chart of an embodiment of a data processing method according to the present application is shown.
In step 201, the proposed node receives a join request for a first newly added node.
When a new node needs to join the blockchain, i.e., a first new node needs to join the blockchain, the first new node may find a member node that is already in the blockchain, for example, in a forum or other platform, through an external mechanism, and send a join request to the member node.
The join request may include basic information of the first newly added node, such as an address, a public key, etc. of the first newly added node, and it is understood that the basic information of the first newly added node may also include other information, such as TEE environment information and code of a program therein, etc., which is not limited herein.
In this embodiment, the description is given taking the case of sending the join request of the first new node to the proposed node as an example, it can be appreciated that, in the actual application process, the first new node may also initiate the join request through other nodes in the blockchain, for example, may be a receiver node or a common node, which is not limited herein.
In step 202, the proposal node sends a validation request to a validation server.
After receiving the joining request sent by the first newly added node, the proposed node sends a verification request to the verification server based on the joining request, wherein the verification request is used for verifying the basic information of the first newly added node.
After the verification server receives the basic information of the first newly added node, the verification server verifies the basic information of the first newly added node. For example, the verification server verifies the TEE environment information of the first newly added node, or verifies the integrity of the program code in the TEE of the first newly added node to determine whether the execution environment of the first newly added node is safe, it may be understood that other information of the first newly added node may be verified, for example, to verify the address information of the first newly added node, which is not limited herein.
In the practical application process, the verification process may be performed by using a cpu self-contained protocol, where the algorithm used is a DHKE algorithm, and in the verification process, an encrypted communication channel may be established between the first newly added node and the proposer node, for example, an encrypted communication channel is established by using https protocol, and in this embodiment, the specific method of the verification process is not limited.
In step 203, the proposal node receives the first newly added information sent by the authentication server.
After the verification server verifies the basic information of the first newly added node, the verification server sends first newly added information to the proposal node, wherein the first newly added information comprises the confirmed information of the newly added node.
After receiving the first new information sent by the verification server, the proposal node sends a confirmation message to the first new node, and after receiving the confirmation message, the first new node generates a self key set in the TEE of the first new node, wherein the key set comprises a public key and a private key, the private key is only visible in the TEE, the public key is used as an account number of the first new node, and the first new node sends the public key of the first new node to the proposal node.
In step 204, the proposal node sends a first new transaction message.
After receiving the first newly-added information and the public key of the first newly-added node sent by the verification server, the proposal node generates a first newly-added transaction message, wherein the first newly-added transaction message comprises the first newly-added information and the public key of the first newly-added node.
For example, the first transaction message may include a public key of the first transaction node, that is, an account of the first transaction node, and an address of the first transaction node, and it may be understood that other information may also be included, such as a verification result of the first transaction node, etc., and the proposed node signs the content in the first transaction message, that is, encrypts the content in the first transaction message.
After generating the first new transaction message, the proposal node sends the first new transaction message to other nodes in the blockchain, i.e. broadcasts the first new transaction message to other nodes in the blockchain.
When other nodes in the blockchain receive the first new transaction message, the content in the first new transaction message is stored locally, and when the first new transaction message is packed into a block and finally confirmed, the first new node is considered to be successfully added into the blockchain.
Optionally, in the practical application process, after the first new node determines that the blockchain is added, the first new node obtains membership of L blocks, that is, the first new node is considered to be a member of the nodes in the blockchain in the proposal of L blocks, when the public key is used once by the first new node in the proposal of L blocks, the membership of the first new node is refreshed to L blocks, when the public key of the first new node does not appear in the transactions of L blocks, for example, the first new node does not participate in the transactions of L blocks as a consensus node in the transactions of L blocks, or does not initiate a user transaction in the transactions of L blocks, the first new node is deleted from the blockchain, that is, other nodes update the local member node list, set the state of the first new node to be invalid or delete the first new node, alternatively, the first new node may be expired after the membership is expired or the request is newly initiated.
For example, when a first newly added node joins the blockchain, it has membership of 1000 blocks, and the block being acknowledged in the blockchain is the 200 th block, if in the 200 th to 1200 th blocks, the public key of the first newly added node is not present in the transaction of the block, then after the 1200 th block is acknowledged, the first newly added node is no longer a node in the blockchain, and of course, the first newly added node may initiate a join request again at 1100 th, or initiate a join request again after expiration.
In step 205, the proposed node elects the first proposed node.
In a round of block proposal, the proposal node of the current round of block can elect the consensus node of the following block, namely, when the proposal node is the proposal node of the Nth block, the proposal node of the Mth block is elected to the second consensus node, the second consensus node comprises a first proposal node and a first receiving node, M is larger than N, and when the proposal node elects the first proposal node, the proposal node can elect the first proposal node in various ways.
Alternatively, the proposed node may directly determine a node in the node list as the first proposed node of the mth block, for example, the proposed node randomly extracts a node from the node list by means of a random function, and uses the node as the first proposed node.
Alternatively, the proposed node may also generate the first proposed node by electing a plurality of first proposed candidate nodes and then electing among the plurality of first proposed candidate nodes again.
For example, when a plurality of first candidate nodes confirm that the first candidate nodes are the identities of the first candidate nodes, each first candidate node in the plurality of first candidate nodes has a vote, each first candidate node randomly generates a number as its own priority, the higher the number is, the higher the priority, each first candidate node firstly casts the vote in its own hand to itself, regenerates a request voting information, the request voting information comprises the priority of the first candidate node, and broadcasts the request voting information, when one first candidate node receives the request voting information of another first candidate node with the first priority higher than that of the first candidate node, all votes in its own hand, including the vote proposal of other people cast to the first candidate node, are cast to the first candidate node with the priority higher than that of the first candidate node, and the voting is only carried out once, and as the request voting information of each first candidate node is finally cast in a block, the number of the first candidate nodes is more than half the first candidate nodes than the first candidate node.
It will be appreciated that a first proposed node may also be elected among a plurality of first proposed candidate nodes in other ways, for example, a first-come-first-come voting way, i.e. voting is not performed by priority, a request voting information is directly broadcast, and when a first candidate node receives the request voting information of other first candidate nodes, all votes in its own hand are directly cast to the first candidate node. In the practical application process, there are various modes of election, and the specific method is not limited herein.
In step 206, the proposed node elects the first receiving node.
When the proposed node elects the first receiving node, the first receiving node may also be elected in a number of ways.
Optionally, the proposed node may randomly select a plurality of first receiving nodes from the node list through a random function, and it may be understood that a plurality of first receiving nodes may also be selected through other manners, for example, the nodes in the node list are grouped, and then a node with a public key tail number of 1 is selected from each group of nodes as the first receiving node.
In step 207, the proposed node generates first consensus sequence number information.
After the proposal node elects the common node of the block proposal, the proposal node generates first common serial number information which comprises information of a plurality of second common nodes, and the information of each second common node in the information of the plurality of second common nodes is encrypted by using a public key of the corresponding second common node.
The public key of the second consensus node may be a serial number of the second consensus node, or may be any other form, so long as it is generated based on information of the second consensus node, and the public key is not limited in this specific case.
For example, the first common serial number information includes a number of encrypted certificates, where each encrypted certificate is a preset word encrypted by using a public key of a corresponding second common node, and it is understood that the form of the first common serial number information may also be other forms, and is not limited herein.
Optionally, the proposed node may encrypt the first common serial number information by an asymmetric encryption manner to obtain the second common serial number information.
It will be appreciated that, in the practical application process, the information of the second common node may also be encrypted by other asymmetric encryption methods, which is not limited herein.
In step 208, the proposal node generates an nth block.
The proposal node obtains locally stored unacknowledged user transaction transactions and generates an nth block comprising locally stored unacknowledged user transaction transactions.
For example, when generating the nth block, the proposed node acquires the first or second consensus node sequence number information and packages the first or second consensus sequence number information into the nth block.
When generating the nth block, the proposal node acquires the state of all the blocks stored locally, and when the doubtful block is not found, the proposal node generates the nth block according to the local unacknowledged user transaction.
Optionally, the proposal node may encrypt the nth block, for example, by the public key of the proposal node, and it will be understood that asymmetric encryption may be performed in other ways, and is not limited herein.
In step 209, the proposal node generates a first proposal message.
After the proposal node generates the nth block, the proposal node generates a first proposal message including the nth block, and the first proposal message is used for confirming the nth block.
In step 210, the proposal node sends a first proposal message.
After the proposal node generates the first proposal message, the proposal node sends the first proposal message to other receiving nodes and common nodes in the blockchain.
After the receiving node in the blockchain receives the first proposal message, the receiving node saves the nth blockproposal in the first proposal message to the local and replies with a first reply message.
For example, the receiving node will save the nth block offer in the first offer message into the local offer cache and reply to an ACK message, which may include the block sequence number N, and the ACK message will be encrypted by the public key of the offerer node, only the offerer using the private key in the offerer TEE will decrypt this information.
After the common node in the blockchain receives the first proposal message, the common node saves the nth blockproposal in the first proposal message locally and replies with a false first reply message with the probability of W.
For example, the normal node, after saving the nth block proposal in the local proposal cache, replies with an ACK message with a 5% probability, the ACK message including the block sequence number N and the ACK message also being encrypted, but the proposed person can determine that the ACK message is a false message when decrypting with the private key in the proposed person TEE.
It should be noted that, when other nodes in the blockchain do not receive the first proposal message within a certain period of time, the node will add a blank block as a block of this round, and store the blank block in the local area.
For example, if the other nodes in the blockchain do not receive the first proposal message within 4 seconds, the node will add a blank block, i.e. a block without any user transaction as the block of the round, store the blank block in the local proposal buffer, and if there is a confirmed message of the block of the round in the following block proposal message, the node updates the blank block to the confirmed block of the round.
When other nodes in the blockchain receive the first proposal message of the Nth block, the other nodes in the blockchain try to decrypt the second consensus node information in the first proposal message, and if the decryption is successful, the other nodes are confirmed to be the consensus node of the Mth block.
For example, the common node or the common node attempts to decrypt the encrypted certificate in the second common node information through the private key stored in the node TEE, and if the decryption is successful, the common node confirms that the common node is the second common node of the mth block, it can be understood that in the actual application process, whether the common node is the second common node of the mth block can be verified through other asymmetric decryption modes, and the specific method is not limited herein.
In step 211, the proposed node receives a first reply message.
After the other nodes in the blockchain acquire the first offer message, P first reply messages are sent to the offer node.
After the proposed node receives the P first reply messages, the proposed node decrypts the P first reply messages, and when the P first reply messages include false first reply messages sent by the common node, the proposed node obtains I second reply messages, where the I second reply messages are valid acknowledgement messages, that is, the I second reply messages are sent by the common node.
It can be understood that, when the P first reply messages do not include the false first reply message sent by the common node, then I is equal to P.
In step 212, the proposed node updates the state of the nth block according to the I second reply messages.
After the proposed node obtains the I second reply messages, the proposed node updates the state of the nth block according to the contents of the I second reply messages.
Optionally, when the number of I second reply messages is greater than the preset threshold, the proposed node updates the state of the nth block to the acknowledgement state. For example, when the number of receiving nodes in the blockchain is 100, the number of I second reply messages is greater than 65% of the number of nodes of the blockchain receiving node, i.e. 65 second reply messages and above, the proposed node updates the state of the nth block to the acknowledgement state.
Optionally, when the number of I second reply messages is smaller than the preset threshold, the proposed node updates the state of the nth block to the in-doubt state. For example, when the number of receiving nodes in the blockchain is 100, the number of I second reply messages is less than 65% of the number of blockchain receiving nodes, i.e. only less than 35 second reply messages, the proposed node updates the state of the nth block to a suspicious state.
In step 213, the proposal node sends a first acknowledgement message.
After the proposed node determines the state of the nth block according to the I second reply messages, the proposed node generates a first acknowledgement message indicating the state of the nth block and sends the first acknowledgement message to other nodes in the blockchain.
For example, after the proposed node determines that the state of the nth block is an acknowledge state, the proposed node sends a first acknowledge message to other nodes in the blockchain, the first acknowledge message being for the other nodes to update the local blockchain state, updating the nth block to the acknowledge state.
For example, after the proposed node determines that the state of the nth block is in doubt, the proposed node sends a first acknowledgement message to other nodes in the blockchain, the first acknowledgement message being used for the other nodes to update the local blockchain state and the nth block to be in doubt.
It should be noted that, in this embodiment, steps 201 to 204 are optional steps, for example, when a new node is not required to be added or the verification server fails in the blockchain system, steps 201 to 204 are not performed, and the blockchain system uses the currently existing node to elect and confirm the block.
According to the embodiment of the application, the proposed node selects the consensus node for confirming the block after confirmation, and confirms different blocks through different nodes, so that the risk of running the blockchain system caused by the attack of an illegal third party on the consensus node is reduced, and the safety of the blockchain system is improved.
The above description has been given of the case where no blank in-doubt block needs to be confirmed before the current block is confirmed, and the following description has been given of the case where a blank in-doubt block needs to be confirmed before the current block is confirmed.
2. The existence of a blank in-doubt block requires confirmation before confirming the current block.
Fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the application.
In step 301, the proposed node receives a join request for a first newly added node.
In step 302, the proposal node sends a validation request to a validation server.
In step 303, the proposal node receives the first newly added information sent by the authentication server.
In step 304, the proposal node sends first newly added transaction information.
In step 305, the proposed node elects the first proposed node.
In step 306, the proposed node elects the first receiving node.
In step 307, the proposed node generates first consensus sequence number information.
In this embodiment, the method descriptions in steps 301 to 307 are similar to those in steps 201 to 207 in the embodiment shown in fig. 2, and detailed descriptions thereof are omitted here.
In step 308, the proposal node generates an nth block.
The proposal node obtains locally stored unacknowledged user transaction transactions and generates an nth block comprising locally stored unacknowledged user transaction transactions.
For example, at the time of generating the nth block 2, the proposed node acquires the first or second consensus node sequence number information and packages the first or second consensus sequence number information into the nth block.
When the nth block is generated, the proposed node acquires the state of all the blocks stored locally, when the block state of the H block is found to be the in-doubt block, H is smaller than N, the block state of the in-doubt block is blank, and no proposal of the H block is stored in the proposal buffer local to the proposed node, the proposed node starts the inquiry mode. I.e., the proposing node generates an nth block including locally unacknowledged user transaction transactions, and appends in the nth block a query message querying the nth block for querying other nodes whether a block proposal of the nth block is saved.
Optionally, the proposal node may encrypt the nth block, for example, by the public key of the proposal node, and it will be appreciated that asymmetric encryption may also be performed by other means, and is not limited herein.
In step 309, the proposal node generates a first proposal message.
After the proposal node generates the nth block, the proposal node generates a first proposal message including the nth block, and the first proposal message is used for confirming the nth block.
In step 310, the proposal node sends a first proposal message.
After the proposal node generates the first proposal message, the proposal node sends the first proposal message to other receiving nodes and common nodes in the blockchain.
After the receiving node in the blockchain receives the first proposal message, the receiving node saves the nth blockproposal in the first proposal message to the local and replies with a first reply message.
For example, the receiving node will save the nth block offer in the first offer message into the local offer cache and reply to an ACK message, which may include the block sequence number N, and the ACK message will be encrypted by the public key of the offerer node, only the offerer using the private key in the offerer TEE will decrypt this information.
Because the nth block includes the query message for querying the H block, after receiving the first proposal message, the receiving node in the blockchain queries whether the locally stored confirmed block includes the proposal content of the H block, if the locally confirmed block includes the proposal content of the H block, the proposal content of the H block is packed in the first reply message and sent to the proposal node.
After the common node in the blockchain receives the first proposal message, the common node saves the nth blockproposal in the first proposal message locally and replies with a false first reply message with the probability of W.
For example, the normal node, after saving the nth block proposal in the local proposal cache, replies with an ACK message with a 5% probability, the ACK message including the block sequence number N and the ACK message also being encrypted, but the proposed person can determine that the ACK message is a false message when decrypting with the private key in the proposed person TEE.
It should be noted that, when other nodes in the blockchain do not receive the first proposal message within a certain period of time, the node will add a blank block as a block of this round, and store the blank block in the local area.
For example, if the other nodes in the blockchain do not receive the first proposal message within 4 seconds, the node will add a blank block, i.e. a block without any user transaction as the block of the round, store the blank block in the local proposal buffer, and if there is a confirmed message of the block of the round in the following block proposal message, the node updates the blank block to the confirmed block of the round.
When other nodes in the blockchain receive the first proposal message of the Nth block, the other nodes in the blockchain try to decrypt the second consensus node information in the first proposal message, and if the decryption is successful, the other nodes are confirmed to be the consensus node of the Mth block.
For example, the common node or the common node attempts to decrypt the encrypted certificate in the second common node information through the private key stored in the node TEE, and if the decryption is successful, the common node confirms that the common node is the second common node of the mth block, it can be understood that in the actual application process, whether the common node is the second common node of the mth block can be verified through other asymmetric decryption modes, and the specific method is not limited herein.
In step 311, the proposed node receives a first reply message.
After the other nodes in the blockchain acquire the first offer message, P first reply messages are sent to the offer node.
After the proposed node receives the P first reply messages, the proposed node decrypts the P first reply messages, and when the P first reply messages include false first reply messages sent by the common node, the proposed node obtains I second reply messages, where the I second reply messages are valid acknowledgement messages, that is, the I second reply messages are sent by the common node.
It can be understood that, when the P first reply messages do not include the false first reply message sent by the common node, then I is equal to P.
In step 312, the proposed node updates the state of the nth block and the state of the H block according to the I second reply messages.
After the proposed node obtains the I second reply messages, the proposed node updates the state of the nth block and the state of the H block according to the contents of the I second reply messages.
When there is the proposed content including the H-th block in the I second reply messages, the proposed node deletes the H-th block which is stored in the local blank and is suspicious, and updates the proposed content of the H-th block included in the second reply messages.
If the proposed content of the H block is not contained in the I second reply messages, the proposed node updates the block states of the N block and the H block to be in doubt when the number of the I second reply messages is smaller than a preset threshold value, and updates the block states of the N block and the H block to be in validation when the number of the I second reply messages is larger than the preset threshold value and the difference between N and H is larger than the preset threshold value, and updates the block states of the N block and the H block to be in doubt when the difference between N and H is smaller than the preset threshold value.
For example, when the number of receiving nodes in the blockchain is 100, the number of I second reply messages is greater than 65% of the number of nodes of the blockchain receiving node, that is, when the number of the I second reply messages is greater than 65, and the difference between N and H is greater than 10, the proposed node updates the block states of the nth block and the H block to be the acknowledgement states.
In step 313, the proposed node sends a first acknowledgement message.
After the proposed node determines the status of the nth block and the H block according to the I second reply messages, the proposed node generates a first acknowledgement message indicating the status of the nth block and the H block and sends the first acknowledgement message to other nodes in the blockchain.
For example, after the proposed node determines that the states of the nth and H blocks are acknowledgement states, the proposed node sends a first acknowledgement message to other nodes in the blockchain, the first acknowledgement message being used for the other nodes to update the local blockchain states, and the block states of the nth and H blocks being updated to acknowledgement states.
For example, after the proposed node determines that the blockstate of the nth and the H blocks are in doubt, the proposed node sends a first acknowledgement message to other nodes in the blockchain, the first acknowledgement message being used for the other nodes to update the local blockchain state and the nth and the H blocks to be in doubt.
It should be noted that, in this embodiment, steps 201 to 204 are optional steps, for example, when a new node is not required to be added or the verification server fails in the blockchain system, steps 201 to 204 are not performed, and the blockchain system uses the currently existing node to elect and confirm the block.
In the embodiment of the application, the fake first reply message is sent by the common node with the probability of W, so that the difficulty that an illegal third party knows the common node by intercepting and checking the first reply message is improved, the risk that the common node is attacked in the blockchain is reduced, and the safety of the blockchain system is improved.
The data processing method in the embodiment of the present application is described above, and the node device in the embodiment of the present application is described below, referring to fig. 4, which is a schematic structural diagram of one embodiment of a computer device provided by the present application.
A member module 401, configured to elect a second common node, where the first common node corresponds to the nth block, the second common node corresponds to the mth block, and M is greater than N;
The consensus module 402 is configured to generate first consensus sequence number information, where the first consensus sequence number information includes information of a second consensus node, and the information of the second consensus node is used for the target node to confirm that the target node belongs to the second consensus node.
In this embodiment, the operations performed by the units of the computer device are similar to those described in the embodiments shown in fig. 2 or fig. 3, and are not repeated here.
Referring to fig. 5, a schematic structural diagram of another embodiment of a computer device according to the present application is shown.
A member module 501, configured to elect a second common node, where the first common node corresponds to an nth block, the second common node corresponds to an mth block, and M is greater than N;
The consensus module 502 is configured to generate first consensus sequence number information, where the first consensus sequence number information includes information of a second consensus node, and the information of the second consensus node is used for the target node to confirm that the target node belongs to the second consensus node.
Optionally, the computer device further comprises:
A blockchain kernel module 504 for generating an nth block including first consensus sequence number information;
The blockchain kernel module 504 is further configured to generate a first proposal message for acknowledging the nth block;
A network module 503 for sending the first proposal message.
Optionally, the consensus module 502 is further configured to encrypt the first consensus sequence number information to obtain second consensus sequence number information;
the first proposal message includes second consensus sequence number information.
Optionally, the consensus module 502 is further configured to encrypt the first consensus sequence number information with a public key to obtain the second consensus sequence number information, where the public key is a sequence number of the second consensus node.
Optionally, the member module 501 is specifically configured to elect a first proposal node, where the first proposal node is configured to submit a second proposal message, where the second proposal message is configured to identify the mth block, and the first proposal node belongs to the second consensus node.
Optionally, the member module 501 is specifically configured to elect a plurality of first proposal candidate nodes, where the plurality of first proposal candidate nodes is configured to elect a first proposal node, and the plurality of first proposal candidates includes the first proposal node.
Optionally, the member module 501 is specifically configured to elect a first receiving node, where the first receiving node is configured to identify the mth block, and the first receiving node belongs to the second consensus node.
Optionally, the member module 501 is specifically configured to elect the first receiving node by using a random sampling function.
Optionally, the network module 503 receives a join request of the first newly added node, where the join request is used to request to join a blockchain, and the blockchain is the blockchain where the first consensus node is located;
The network module 503 is further configured to send a verification request to the verification server, where the verification request is used to verify the first newly added node;
The network module 503 is further configured to receive first newly-added information sent by the authentication server, where the first newly-added information includes information of a newly-added node;
the blockchain kernel module 504 generates a first newly added transaction message that includes first newly added information;
the network module 503 sends a first newly added transaction message.
Optionally, after the first added node determines to join the blockchain, if the public key of the first added node is not present in transactions for L blocks, the first added node is deleted from the blockchain, L being a positive integer greater than or equal to 1.
Optionally, the computer device further comprises:
A processor 505, configured to parse the P first reply messages to obtain I second reply messages, where the second reply messages are valid acknowledgement messages, and I is less than or equal to P;
If I is greater than the preset threshold, the blockchain kernel module 504 is further configured to update the status of the nth block to a confirmation status;
the processor 505 is further configured to generate a first acknowledgement message, where the first acknowledgement message indicates a status of the nth block;
The network module 503 is further configured to send a first acknowledgement message.
Optionally, the network module 503 is further configured to receive P first reply messages;
The processor 505 parses the P first reply messages to obtain I second reply messages, where the second reply messages are valid acknowledgement messages, and I is less than or equal to P;
If I is less than the preset threshold, the blockchain kernel module 504 is further configured to update the state of the nth block to be in doubt;
the processor 505 is further configured to generate a first acknowledgement message, where the first acknowledgement message indicates a status of the nth block;
The network module 503 is further configured to send a first acknowledgement message.
Optionally, the first proposal message includes an in-doubt block message, where the in-doubt block message indicates that a block state of an H-th block is an in-doubt block, H is smaller than N, and the network module is further configured to receive P first reply messages;
The processor 505 parses the P first reply messages to obtain I second reply messages, where the second reply messages are valid acknowledgement messages, and I is less than or equal to P;
the blockchain kernel module 504 is further configured to update the block status of the H block according to the I second reply messages.
Optionally, if the acknowledgement message of the H block exists in the I second reply messages, the blockchain core module 504 is specifically configured to update the block status of the H block to the acknowledgement status.
Optionally, if no acknowledgement message of the H block exists in the I second reply messages and the difference between N and H is greater than the preset threshold, the blockchain core module 504 is further configured to update the block status of the H block to be the acknowledgement status.
The blockchain core module 504 is further configured to update the block status of the H block to the in-doubt status if no acknowledgement message of the H block exists in the I second reply messages and the difference between N and H is less than the preset threshold.
In this embodiment, the operations performed by the units of the computer device are similar to those described above for the proposed node in the embodiment shown in fig. 2 or fig. 3, and will not be repeated here.
Referring to fig. 6, a schematic structural diagram of another embodiment of a computer device according to the present application is shown.
The network module 602 is configured to receive a first proposal message sent by a first consensus node, where the first proposal message includes an nth block and second consensus sequence number information, the second consensus sequence number information is obtained by encrypting the first consensus sequence number information, the first consensus sequence number includes information of a second consensus node, the second consensus node is obtained by electing the first consensus node, and the second consensus node is a consensus node of the mth block, where M is greater than N;
A processor 603 for decrypting the second common serial number information to obtain decryption information;
A member module 601, configured to determine, through the decryption information, that the first target node is a consensus node of the mth block.
In this embodiment, the operations performed by the units of the computer device are similar to those described in the embodiments shown in fig. 2 or fig. 3, and are not repeated here.
Referring to fig. 7, a schematic structural diagram of another embodiment of a computer device according to the present application is shown.
The network module 703 is configured to receive a first proposal message sent by a first consensus node, where the first proposal message includes an nth block and second consensus sequence number information, the second consensus sequence number information is obtained by encrypting the first consensus sequence number information, the first consensus sequence number includes information of a second consensus node, the second consensus node is obtained by electing the first consensus node, and the second consensus node is a consensus node of the mth block, where M is greater than N;
processor 705 for decrypting the second common serial number information to obtain decryption information;
A member module 701, configured to determine that the first target node is a consensus node of the mth block through the decryption information.
Optionally, if the proposal request of the Q-th block is not received within the preset time period T, the computer device further includes:
The blockchain core module 704 is configured to add a Q block, where the Q block is a blank block and the state of the Q block is in doubt.
Optionally, the network module 703 is further configured to send a third reply message to the first consensus node with a probability of W, where the third reply message does not include information for confirming the nth block, and W is greater than 0.
Optionally, the second common serial number information is obtained by encrypting the first common serial number information through a public key of the computer device, and the computer device further includes:
The consensus module 702 is configured to decrypt the second consensus serial number information by a private key of the computer device to obtain decryption information, where the private key is stored in a trusted execution environment TEE of the computer device.
In this embodiment, the operations performed by the units of the computer device are similar to those described in the embodiments shown in fig. 2 or fig. 3, and are not repeated here.
Referring to fig. 8, another schematic structure of the computer device according to an embodiment of the application is shown.
Processor 801, memory 802, bus 805, and communication interface 804, processor 801 is connected to memory 802, communication interface 804, bus 805 connects processor 801, memory 802, and communication interface 804, respectively, communication interface 804 is used to receive or transmit data, processor 801 is a single-core or multi-core central processing unit, or is a specific integrated circuit, or is one or more integrated circuits configured to implement embodiments of the present invention. The memory 802 may be a random access memory (random access memory, RAM) or a non-volatile memory (non-volatile memory), such as at least one hard disk memory. Memory 802 is used to store computer-executable instructions. Specifically, the program 803 may be included in the computer-executable instructions.
In this embodiment, when the processor 801 invokes the program 803, the computer device in fig. 8 may perform the operations performed by the nodes in the embodiments shown in fig. 2 or fig. 3, which are not described herein.
Referring to fig. 9, another schematic structure of a computer device according to an embodiment of the application is shown.
Processor 901, memory 902, bus 905, and communication interface 904, processor 901 being coupled to memory 902, communication interface 904, bus 905 being coupled to processor 901, memory 902, and communication interface 904, respectively, communication interface 904 being for receiving or transmitting data, processor 901 being a single or multi-core central processing unit, either a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention. The memory 902 may be a random access memory (random access memory, RAM) or a non-volatile memory (non-volatile memory), such as at least one hard disk memory. The memory 902 is used to store computer-executable instructions. Specifically, the program 903 may be included in the computer-executable instructions.
In this embodiment, when the processor 901 invokes the program 903, the computer device in fig. 9 may perform the operations performed by the node in the embodiment shown in fig. 2 or fig. 3, which are not described herein.
It should be appreciated that the processor mentioned in the computer device or the storage system in the above embodiment of the present application, or the processor provided in the above embodiment of the present application, may be a central processing unit (central processing unit, CPU), but may also be other general purpose processors, digital Signal Processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf programmable gate arrays (field programmable GATE ARRAY, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It should be further understood that the number of processors in the computer device or the storage system in the above embodiment of the present application may be one or more, and may be adjusted according to the actual application scenario, which is merely illustrative and not limiting. The number of the memories in the embodiment of the present application may be one or more, and may be adjusted according to the actual application scenario, which is only illustrative and not limiting.
It should be further noted that, when the computer device includes a processor (or a processing unit) and a memory, the processor in the present application may be integrated with the memory, or the processor and the memory may be connected through an interface, which may be adjusted according to an actual application scenario, and is not limited.
The present application also provides a computer program or a computer program product comprising a computer program, which when executed on a computer causes the computer to implement the method flow with the node apparatus in any of the above method embodiments.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a computer, implements the method flow related to the node device in any of the above method embodiments.
In the various embodiments of fig. 2-3 described above, may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances and are merely illustrative of the manner in which embodiments of the application have been described in connection with the description of the objects having the same attributes. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The names of the messages/frames/information, modules or units, etc. provided in the embodiments of the present application are merely examples, and other names may be used as long as the roles of the messages/frames/information, modules or units, etc. are the same.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this embodiment of the application, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that in the description of the present application, "/" means that the related objects are in a "or" relationship, for example, a/B may mean a or B, and "and/or" in the present application is merely an association relationship describing the related objects, for example, a and/or B may mean that there may be three relationships, for example, a and/or B, respectively, three cases where a exists alone, a and B exist alone, and B exists alone, wherein a and B may be singular or plural.
The words "if" or "if" as used herein may be interpreted as "at..once" or "when..once" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
While the application has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that the foregoing embodiments may be modified or equivalents may be substituted for some of the features thereof, and that the modifications or substitutions do not depart from the spirit of the embodiments.
Claims (19)
1. A method of data processing, the method comprising:
The first consensus node elects a second consensus node, the first consensus node corresponds to an nth block, the second consensus node corresponds to an mth block, and M is greater than N;
The first consensus node generates first consensus sequence number information, wherein the first consensus sequence number information comprises information of the second consensus node, and the information of the second consensus node is used for confirming that the target node belongs to the second consensus node;
the first consensus node generates the nth block, wherein the nth block comprises the first consensus serial number information;
The first consensus node generating a first proposal message for acknowledging the nth block;
the first consensus node sends a first proposal message;
the first consensus node receives P first reply messages;
The first consensus node analyzes the P first reply messages to obtain I second reply messages, wherein the second reply messages are effective confirmation messages sent by the consensus node, and the I is smaller than or equal to the P;
if the I is larger than a preset threshold, the first consensus node updates the state of the N block to be a confirmation state;
if the I is smaller than a preset threshold, the first consensus node updates the state of the N block to be in doubt;
the first consensus node generates a first acknowledgement message, the first acknowledgement message representing a state of an nth block;
The first consensus node sends the first acknowledgement message.
2. The method of claim 1, wherein after the first consensus node generates the first consensus sequence number information, the method further comprises, before the first consensus node sends the first proposal message:
the first consensus node encrypts the first consensus sequence number information to obtain second consensus sequence number information;
The first proposal message includes second consensus sequence number information.
3. The method of claim 2, wherein the first consensus node encrypting the first consensus sequence number information comprises:
And the first consensus node encrypts the first consensus sequence number information by using a public key to obtain second consensus sequence number information, wherein the public key is the sequence number of the second consensus node.
4. A method according to any one of claims 1 to 3, wherein the first consensus node electing a second consensus node comprises:
The first consensus node elects a first proposal node for submitting a second proposal message for acknowledging an mth block, the first proposal node belonging to the second consensus node.
5. The method of claim 4, wherein the first consensus node electing a first proposed node comprises:
The first consensus node elects a plurality of first proposal candidate nodes for electing the first proposal node, the plurality of first proposal candidate nodes including the first proposal node.
6. A method according to any one of claims 1 to 3, wherein the first consensus node electing a second consensus node comprises:
the first consensus node elects a first receiving node, the first receiving node is used for confirming the Mth block, and the first receiving node belongs to the second consensus node.
7. The method of claim 6, wherein the first consensus node electing a first receiving node comprises:
the first consensus node elects the first receiving node by a random sampling function.
8. The method of claim 1, wherein prior to the first consensus node broadcasting the first proposal message, the method further comprises:
The first consensus node receives a joining request of a first new node, wherein the joining request is used for requesting to join a blockchain, and the blockchain is the blockchain where the first consensus node is located;
the first consensus node sends a verification request to a verification server, wherein the verification request is used for verifying the first newly-added node;
the first consensus node receives first newly-added information sent by the verification server, wherein the first newly-added information comprises information of the newly-added node;
the first consensus node generates a first new transaction message, the first new transaction message including the first new information;
the first consensus node sends the first new transaction message.
9. The method of claim 8, wherein after the first added node determines to join the blockchain, if the public key of the first added node is not present in transactions for L blocks, the first added node is deleted from the blockchain, the L being a positive integer greater than or equal to 1.
10. The method of claim 1, wherein the first proposal message comprises an in-doubt block message indicating that a block state of an H-th block is an in-doubt block, the H being less than the N, the method further comprising, after the first consensus node sends the first proposal message:
the first consensus node receives P first reply messages;
The first consensus node analyzes the P first reply messages to obtain I second reply messages, wherein the second reply messages are valid confirmation messages, and the I is smaller than or equal to the P;
the first consensus node updates the block state of the H block according to the I second reply messages.
11. The method of claim 10, wherein the first consensus node updating the block status of the H-block based on I second reply messages comprises:
if the acknowledgement message of the H block exists in the I second reply messages, the first consensus node updates the block state of the H block to be an acknowledgement state.
12. The method of claim 10, wherein the first consensus node updating the block status of the H-block based on I second reply messages comprises:
If no acknowledgement message of the H block exists in the I second reply messages, and the difference between the N and the H is greater than a preset threshold, the first consensus node updates the block state of the H block to be an acknowledgement state.
13. The method of claim 10, wherein the first consensus node updating the block status of the H-block based on I second reply messages comprises:
If the acknowledgement message of the H-th block does not exist in the I second reply messages and the difference between the N and the H is smaller than a preset threshold, the first consensus node updates the block state of the H-th block to be in doubt.
14. A method of data processing, comprising:
A first target node receives a first proposal message sent by a first consensus node, wherein the first proposal message comprises an N-th block and second consensus serial number information, the second consensus serial number information is obtained by encrypting first consensus serial number information, the first consensus serial number comprises information of a second consensus node, the second consensus node is obtained by electing the first consensus node, the second consensus node is a consensus node of an M-th block, and M is larger than N;
the first target node decrypts the second consensus sequence number information to obtain decryption information;
The first target node determines that the first target node is a consensus node of the Mth block through the decryption information;
and determining that the first target node is a common node of the Mth block through the decryption information at the first target node, wherein the first target node sends a third reply message to the first consensus node with the probability of W, the third reply message does not contain information for confirming the Nth block, and the W is larger than 0.
15. The method of claim 14, wherein prior to the first target node receiving the first proposal message sent by the first consensus node, the method further comprises:
if the first target node does not receive the proposal request of the Q block within the preset time period T, the first target node adds the Q block, wherein the Q block is a blank block, and the state of the Q block is a suspicious state.
16. The method of claim 14, wherein the step of providing the first information comprises,
The second common serial number information is obtained by encrypting the first common serial number information through the public key of the first target node.
17. The method of claim 14, wherein the first target node decrypting the second common sequence number information to obtain the decrypted information comprises:
The first target node decrypts the second common serial number information through a private key of the first target node to obtain decryption information, and the private key is stored in a Trusted Execution Environment (TEE) of the first target node.
18. A computer device, comprising:
A processor and a memory, the processor and the memory electrically coupled;
The processor being configured to read and execute the program instructions stored in the memory, which when executed by the processor, cause the computer device to perform the method of any one of claims 1 to 13 or to perform the method of any one of claims 14 to 17.
19. The computer device of claim 18, further comprising:
the system comprises a communication interface, wherein the communication interface is used for sending or receiving information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010247629.1A CN113472561B (en) | 2020-03-31 | 2020-03-31 | A blockchain data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010247629.1A CN113472561B (en) | 2020-03-31 | 2020-03-31 | A blockchain data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113472561A CN113472561A (en) | 2021-10-01 |
CN113472561B true CN113472561B (en) | 2024-12-24 |
Family
ID=77865905
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010247629.1A Active CN113472561B (en) | 2020-03-31 | 2020-03-31 | A blockchain data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113472561B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110049029A (en) * | 2019-04-04 | 2019-07-23 | 矩阵元技术(深圳)有限公司 | Common recognition node determines method, apparatus, computer equipment and storage medium |
CN110599173A (en) * | 2019-09-20 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Block chain consensus node determination method, device, equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107450979B (en) * | 2017-03-28 | 2020-06-02 | 创新先进技术有限公司 | A blockchain consensus method and device |
CN107395403B (en) * | 2017-07-07 | 2020-01-14 | 北京区块链云科技有限公司 | Credit-based block chain consensus method suitable for large-scale electronic commerce |
CN109167660B (en) * | 2018-09-07 | 2021-05-14 | 腾讯科技(深圳)有限公司 | Method and device for electing representative node equipment, computer equipment and storage medium |
CN109714404B (en) * | 2018-12-12 | 2021-04-06 | 中国联合网络通信集团有限公司 | Blockchain consensus method and device based on Raft algorithm |
CN109727132B (en) * | 2018-12-28 | 2021-03-23 | 合肥达朴汇联科技有限公司 | Method and device for acquiring block chain consensus node, electronic equipment and storage medium |
CN110569305B (en) * | 2019-08-27 | 2021-09-03 | 网易(杭州)网络有限公司 | Block synchronization method, device, medium and computing equipment |
-
2020
- 2020-03-31 CN CN202010247629.1A patent/CN113472561B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110049029A (en) * | 2019-04-04 | 2019-07-23 | 矩阵元技术(深圳)有限公司 | Common recognition node determines method, apparatus, computer equipment and storage medium |
CN110599173A (en) * | 2019-09-20 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Block chain consensus node determination method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113472561A (en) | 2021-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022042301A1 (en) | Data processing method and apparatus, smart device and storage medium | |
CN109639714B (en) | A blockchain-based IoT identity registration and verification method | |
US11288740B2 (en) | Securing distributed electronic wallet shares | |
CN111242617B (en) | Method and apparatus for performing transaction correctness verification | |
CN111881481B (en) | Medical data processing method, device, equipment and storage medium based on blockchain | |
US20180300507A1 (en) | Method and server for authenticating and verifying file | |
KR101256284B1 (en) | Electronic label authenticating method and system | |
US20230089134A1 (en) | Data communication method and apparatus, computer device, and storage medium | |
CN110096894B (en) | A blockchain-based data anonymous sharing system and method | |
CN111339201B (en) | Evaluation method and system based on block chain | |
Kumar et al. | Ultra-lightweight blockchain-enabled RFID authentication protocol for supply chain in the domain of 5G mobile edge computing | |
JP2022534677A (en) | Protecting online applications and web pages that use blockchain | |
CN113255014B (en) | Data processing method based on block chain and related equipment | |
US20190288833A1 (en) | System and Method for Securing Private Keys Behind a Biometric Authentication Gateway | |
CN115733659B (en) | Encryption intelligent contract detection system based on block chain | |
CN118101298B (en) | Data encryption transmission method, device, computer equipment, medium and program product | |
JP6939313B2 (en) | Distributed authentication system | |
CN114143312A (en) | Block chain-based edge computing terminal authentication method, system and equipment | |
CN112926983A (en) | Block chain-based deposit certificate transaction encryption system and method | |
CN113472561B (en) | A blockchain data processing method and device | |
CN117997519A (en) | Data processing method, apparatus, program product, computer device, and medium | |
CN111698299B (en) | Session object replication method, device, distributed micro-service architecture and medium | |
CN115567198A (en) | IoT Identity Authentication Method Based on Consortium Chain | |
CN115567540A (en) | Online learning evaluation method and system based on block chain technology | |
CN114374519A (en) | Data transmission method, system and equipment |
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 |