US10708066B2ActiveUtilityA1

Achieving consensus among network nodes in a distributed system

71
Assignee: ALIBABA GROUP HOLDING LTDPriority: Dec 13, 2018Filed: May 24, 2019Granted: Jul 7, 2020
Est. expiryDec 13, 2038(~12.4 yrs left)· nominal 20-yr term from priority
Inventors:Peng Lin
H04L 9/50H04L 63/12H04L 9/3247H04L 9/3239G06F 9/46H04L 25/08H04L 9/0825H03M 13/373G06F 16/1834H04L 9/3236G06F 11/1464G06F 11/0709H04L 9/32H04L 63/00H03M 13/1102H03M 13/1515G06F 16/1805H04L 45/021G06F 16/2246G06F 11/14H03M 13/3761H04L 41/0654G06F 16/27H04L 9/0643H03M 13/154G06F 16/1824H04L 2209/38
71
PatentIndex Score
1
Cited by
67
References
27
Claims

Abstract

Implementations of the present specification include a computer-implemented method for achieving a consensus among a number of network nodes of a blockchain network. The blockchain network includes a primary node and one or more backup nodes. The method includes receiving a transaction request by the primary node, sending a number of first messages to the backup nodes by the primary node, receiving second messages from the backup nodes by the primary node, reconstructing the transaction request based on data in the second messages by the primary node, sending a third message to the backup nodes by the primary node, and executing the transaction request in response to receiving a predetermined number of third messages.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A computer-implemented method for achieving a consensus among a plurality of network nodes of a blockchain comprising at least a primary node and one or more backup nodes, the method comprising:
 receiving, by a backup node, a first message from the primary node, wherein the first message comprises a composite hash value associated with a plurality of erasure code (EC) blocks, wherein the plurality of EC blocks are generated by the primary node according to an EC code using a transaction request; 
 in response to receiving the first message, sending, by the backup node, a second message to the other network nodes, wherein the second message comprises the first message and a signature of the backup node associated with the first message; 
 receiving, by the backup node, at least one second message from at least one backup node other than the backup node; 
 in response to receiving the at least one second message from the at least one backup node, verifying, by the backup node, whether the at least one second message is valid; 
 determining, by the backup node, whether a number of valid second messages exceeds a pre-determined threshold; 
 in response to determining that the number of valid second messages exceeds the pre-determined threshold, reconstructing, by the backup node, the transaction request based on a subset of the number of valid second messages according to the EC code; 
 in response to determining that the transaction request has been successfully reconstructed, sending, by the backup node, a third message, to the other network nodes, wherein the third message comprises a set of signatures that are in the valid second messages; 
 receiving, by the backup node, at least one third message from at least one of the backup nodes; and 
 in response to receiving a pre-determined number of third messages that are identical, executing, by the backup node, the transaction request, 
 wherein the at least one second message further comprises a composite hash value, at least one of the plurality of EC blocks and one or more hash values of one or more EC blocks other than the at least one of the plurality of EC blocks, and 
 wherein the verifying, by the backup node, whether the at least one second message is valid comprises:
 generating, by the backup node, a reconstructed hash tree using the at least one of the plurality of EC blocks and the one or more hash values of one or more EC blocks other than the at least one of the plurality of EC blocks in the at least one second message; 
 determining, by the backup node, a reconstructed composite hash value of the reconstructed hash tree; 
 comparing, by the backup node, the reconstructed composite hash value to the composite hash value in the at least one second message; and 
 determining, by the backup node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message. 
 
 
     
     
       2. The method of  claim 1 , wherein the generating the plurality of EC blocks according to an EC code comprises:
 transforming the transaction request into an EC message using the EC code; and 
 dividing the EC message into the plurality of EC blocks. 
 
     
     
       3. The method of  claim 1 , wherein the composite hash value of the plurality of EC blocks is generated using a hash tree. 
     
     
       4. The method of  claim 3 , wherein the hash tree comprises a Merkle tree, and wherein the composite hash value is a root hash value of the Merkle tree. 
     
     
       5. The method of  claim 1 , wherein the signature of the backup node associated with the first message comprises a private key signature of the backup node associated with the first message. 
     
     
       6. The method of  claim 1 , wherein the at least one second message further comprises at least one of the plurality of EC blocks. 
     
     
       7. The method of  claim 6 , wherein the verifying, by the backup node, whether the at least one second message is valid comprises:
 generating, by the backup node, a reconstructed hash tree using the at least one of the plurality of EC blocks in the at least one second message; 
 determining, by the backup node, a reconstructed composite hash value of the reconstructed hash tree; 
 comparing, by the backup node, the reconstructed composite hash value to a composite hash value in the at least one second message; and 
 determining, by the backup node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message. 
 
     
     
       8. The method of  claim 7 , wherein the method further comprises:
 in response to determining that the reconstructed composite hash value matches the composite hash values in the second messages, determining, by the backup node, that the at least one second message is valid. 
 
     
     
       9. The method of  claim 1 , wherein the pre-determined number of third messages that are identical comprise the pre-determined number of the third messages having an identical set of signatures. 
     
     
       10. A non-transitory computer-readable storage medium storing one or more instructions executable by a computer system to perform operations comprising:
 receiving, by a backup node of a blockchain network, a first message from a primary node of the blockchain network, wherein the first message comprises a composite hash value associated with a plurality of erasure code (EC) blocks, wherein the plurality of EC blocks are generated by the primary node according to an EC code using a transaction request; 
 in response to receiving the first message, sending, by the backup node, a second message to the other network nodes, wherein the second message comprises the first message and a signature of the backup node associated with the first message; 
 receiving, by the backup node, at least one second message from at least one backup node other than the backup node; 
 in response to receiving the at least one second message from the at least one backup node, verifying, by the backup node, whether the at least one second message is valid; 
 determine, by the backup node, whether a number of valid second messages exceeds a pre-determined threshold; 
 in response to determining that the number of valid second messages exceeds the pre-determined threshold, reconstructing, by the backup node, the transaction request based on a subset of the number of valid second messages according to the EC code; 
 in response to determining that the transaction request has been successfully reconstructed, sending, by the backup node, a third message, to the other network nodes, wherein the third message comprises a set of signatures that are in the valid second messages; 
 receiving, by the backup node, at least one third message from at least one of the backup nodes; and 
 in response to receiving a pre-determined number of third messages that are identical, executing, by the backup node, the transaction request, 
 wherein the at least one second message further comprises a composite hash value, at least one of the plurality of EC blocks and one or more hash values of one or more EC blocks other than the at least one of the plurality of EC blocks, and 
 wherein the verifying, by the backup node, whether the at least one second message is valid comprises:
 generating, by the backup node, a reconstructed hash tree using the at least one of the plurality of EC blocks and the one or more hash values of one or more EC blocks other than the at least one of the plurality of EC blocks in the at least one second message; 
 determining, by the backup node, a reconstructed composite hash value of the reconstructed hash tree; 
 comparing, by the backup node, the reconstructed composite hash value to the composite hash value in the at least one second message; and 
 
 determining, by the backup node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message. 
 
     
     
       11. The non-transitory computer-readable storage medium of  claim 10 , wherein the generating the plurality of EC blocks according to an EC code comprises:
 transforming the transaction request into an EC message using the EC code; and 
 dividing the EC message into the plurality of EC blocks. 
 
     
     
       12. The non-transitory computer-readable storage medium of  claim 10 , wherein the composite hash value of the plurality of EC blocks is generated using a hash tree. 
     
     
       13. The non-transitory computer-readable storage medium of  claim 12 , wherein the hash tree comprises a Merkle tree, and wherein the composite hash value is a root hash value of the Merkle tree. 
     
     
       14. The non-transitory computer-readable storage medium of  claim 10 , wherein the signature of the backup node associated with the first message comprises a private key signature of the backup node associated with the first message. 
     
     
       15. The non-transitory computer-readable storage medium of  claim 10 , wherein the at least one second message further comprises at least one of the plurality of EC blocks. 
     
     
       16. The non-transitory computer-readable storage medium of  claim 15 , wherein the verifying, by the backup node, whether the at least one second message is valid comprises:
 generating, by the backup node, a reconstructed hash tree using the at least one of the plurality of EC blocks in the at least one second message; 
 determining, by the backup node, a reconstructed composite hash value of the reconstructed hash tree; 
 comparing, by the backup node, the reconstructed composite hash value to a composite hash value in the at least one second message; and 
 determining, by the backup node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message. 
 
     
     
       17. The non-transitory computer-readable storage medium of  claim 16 , wherein the operations further comprise:
 in response to determining that the reconstructed composite hash value matches the composite hash values in the second messages, determining, by the backup node, that the at least one second message is valid. 
 
     
     
       18. The non-transitory computer-readable storage medium of  claim 10 , wherein the pre-determined number of third messages that are identical comprise the pre-determined number of the third messages having an identical set of signatures. 
     
     
       19. A system, including:
 one or more computers; and 
 one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
 receiving, by a backup node of a blockchain network, a first message from a primary node of the blockchain network, wherein the first message comprises a composite hash value associated with a plurality of erasure code (EC) blocks, wherein the plurality of EC blocks are generated by the primary node according to an EC code using a transaction request; 
 in response to receiving the first message, sending, by the backup node, a second message to other network nodes, wherein the second message comprises the first message and a signature of the backup node associated with the first message; 
 receiving, by the backup node, at least one second message from at least one backup node other than the backup node; 
 
 in response to receiving the at least one second message from the at least one backup node, verify, by the backup node, whether the at least one second message is valid; 
 determining, by the backup node, whether a number of valid second messages exceeds a pre-determined threshold;
 in response to determining that the number of valid second messages exceeds the pre-determined threshold, reconstructing, by the backup node, the transaction request based on a subset of the number of valid second messages according to the EC code; 
 in response to determining that the transaction request has been successfully reconstructed, sending, by the backup node, a third message, to the other network nodes, wherein the third message comprises a set of signatures that are in the valid second messages; 
 receiving, by the backup node, at least one third message from at least one of the backup nodes; and 
 in response to receiving a pre-determined number of third messages that are identical, executing, by the backup node, the transaction request, 
 wherein the at least one second message further comprises a composite hash value, at least one of the plurality of EC blocks and one or more hash values of one or more EC blocks other than the at least one of the plurality of EC blocks, and 
 wherein the verifying, by the backup node, whether the at least one second message is valid comprises:
 generating, by the backup node, a reconstructed hash tree using the at least one of the plurality of EC blocks and the one or more hash values of one or more EC blocks other than the at least one of the plurality of EC blocks in the at least one second message; 
 determining, by the backup node, a reconstructed composite hash value of the reconstructed hash tree; 
 comparing, by the backup node, the reconstructed composite hash value to the composite hash value in the at least one second message; and 
 determining, by the backup node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message. 
 
 
 
     
     
       20. The system of  claim 19 , wherein the generating the plurality of EC blocks according to an EC code comprises:
 transforming the transaction request into an EC message using the EC code; and 
 dividing the EC message into the plurality of EC blocks. 
 
     
     
       21. The system of  claim 19 , wherein the composite hash value of the plurality of EC blocks is generated using a hash tree. 
     
     
       22. The system of  claim 21 , wherein the hash tree comprises a Merkle tree, and wherein the composite hash value is a root hash value of the Merkle tree. 
     
     
       23. The system of  claim 19 , wherein the signature of the backup node associated with the first message comprises a private key signature of the backup node associated with the first message. 
     
     
       24. The system of  claim 19 , wherein the at least one second message further comprises at least one of the plurality of EC blocks. 
     
     
       25. The system of  claim 24 , wherein the verifying, by the backup node, whether the at least one second message is valid comprises:
 generating, by the backup node, a reconstructed hash tree using the at least one of the plurality of EC blocks in the at least one second message; 
 determining, by the backup node, a reconstructed composite hash value of the reconstructed hash tree; 
 comparing, by the backup node, the reconstructed composite hash value to a composite hash value in the at least one second message; and 
 determining, by the backup node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message. 
 
     
     
       26. The system of  claim 25 , wherein the operations further comprise:
 in response to determining that the reconstructed composite hash value matches the composite hash values in the second messages, determining, by the backup node, that the at least one second message is valid. 
 
     
     
       27. The system of  claim 19 , wherein the pre-determined number of third messages that are identical comprise the pre-determined number of the third messages having an identical set of signatures.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.