# US 10,771,259 B2 · Achieving consensus among network nodes in a distributed system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,771,259 B2
- Document ID: US10771259B2
- Status: Granted
- Kind: B2
- Application number: 16/800,459
- Filed: 2020-02-25
- Published: 2020-06-18
- Granted: 2020-09-08
- Earliest claimed: 2018-12-13
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Peng Lin
- Web page: https://patentgrep.com/patent/US10771259B2

## CPC

- H04L 9/3247: {involving digital signatures}
- G06F 9/46: Multiprogramming arrangements
- G06F 11/0709: {in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems}
- G06F 11/1464: {for networked environments}
- G06F 16/1805: {Append-only file systems, e.g. using logs or journals to store data}
- G06F 16/1824: {implemented using Network-attached Storage [NAS] architecture (distributed or networked storage systems G06F3/067; protocols for distributed storage of data in a network H04L67/1097)}
- G06F 16/1834: {implemented based on peer-to-peer networks, e.g. gnutella (p2p communication protocols H04L67/104)}
- G06F 16/2246: {Trees, e.g. B+trees}
- H03M 13/154: {Error and erasure correction, e.g. by using the error and erasure locator or Forney polynomial}
- H03M 13/373: {with erasure correction and erasure determination, e.g. for packet loss recovery or setting of erasures for the decoding of Reed-Solomon codes}
- H03M 13/3761: {using code combining, i.e. using combining of codeword portions which may have been transmitted separately, e.g. Digital Fountain codes, Raptor codes or Luby Transform [LT] codes}
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/0825: {using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates}
- H04L 9/3236: {using cryptographic hash functions}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 41/0654: using network fault recovery (ring fault isolation or reconfiguration in loop networks without recovery actions by a network management system H04L12/437)
- H04L 45/021: Ensuring consistency of routing table updates, e.g. by using epoch numbers
- H04L 63/00: {Network architectures or network communication protocols for network security (cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00; network architectures or network communication protocols for wireless network security H04W12/00; security arrangements for protecting computers or computer systems against unauthorised activity G06F21/00)}
- H04L 63/12: {Applying verification of the received information (cryptographic mechanisms or cryptographic arrangements for data integrity or data verification H04L9/32)}
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- H03M 13/1102: {Codes on graphs and decoding on graphs, e.g. low-density parity check [LDPC] codes}
- H03M 13/1515: {Reed-Solomon codes}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## 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

### Claim 1

A computer-implemented method for achieving a consensus among a plurality of network nodes of a blockchain network comprising at least a primary node and one or more backup nodes, the method comprising:
receiving, by the primary node, a transaction request;
generating, by the primary node, a plurality of erasure code (EC) blocks according to an EC code using the transaction request, 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 block;
sending, by the primary node, a plurality of first messages to the one or more backup nodes, respectively, wherein each of the plurality of first messages comprises a composite hash value associated with the plurality of EC blocks;
receiving, by the primary node, at least one second message from at least one of the backup nodes, wherein the at least one second message comprises one of the plurality of first messages and a signature of the at least one of the backup nodes associated with the one of the plurality of first messages;
in response to receiving the at least one second message from the at least one of the backup node, verifying, by the primary node, whether the at least one second message is valid;
determining, by the primary 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 primary 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 primary 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 primary 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 primary node, the transaction request.

### Claim 2 (depends on 1)

The method of claim 1, wherein the transaction request is associated with a sequence number.

### Claim 3 (depends on 1)

The method of claim 1, wherein the composite hash value of the plurality of EC block is generated using a hash tree.

### Claim 4 (depends on 3)

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.

### Claim 5 (depends on 1)

The method of claim 1, wherein the signature of the at least one of the backup nodes associated with the one of the plurality of first messages comprises a private key signature of the at least one of the backup nodes associated with the one of the plurality of first messages.

### Claim 6 (depends on 1)

The method of claim 1, wherein the at least one second message further comprises at least one of the plurality of EC blocks.

### Claim 7 (depends on 6)

The method of claim 6, wherein the verifying, by the primary node, whether the at least one second message is valid comprises:
generating, by the primary 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 primary node, a reconstructed composite hash value of the reconstructed hash tree;
comparing, by the primary node, the reconstructed composite hash value to a composite hash value in the at least one second message; and
determining, by the primary node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message.

### Claim 8 (depends on 7)

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 primary node, that the at least one second message is valid.

### Claim 9 (depends on 1)

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.

### Claim 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 primary node of a blockchain network, a transaction request, wherein the blockchain network further comprises one or more backup nodes;
generating, by the primary node, a plurality of erasure code (EC) blocks according to an EC code using the transaction request, 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 block;
sending, by the primary node, a plurality of first messages to the one or more backup nodes, respectively, wherein each of the plurality of first messages comprises a composite hash value associated with the plurality of EC blocks;
receiving, by the primary node, at least one second message from at least one of the backup nodes, wherein the at least one second message comprises one of the plurality of first messages and a signature of the at least one of the backup nodes associated with the one of the plurality of first messages;
in response to receiving the at least one second message from the at least one of the backup node, verifying, by the primary node, whether the at least one second message is valid;
determining, by the primary 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 primary 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, send, by the primary 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 primary 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 primary node, the transaction request.

### Claim 11 (depends on 10)

The non-transitory computer-readable storage medium of claim 10, wherein the transaction request is associated with a sequence number.

### Claim 12 (depends on 10)

The non-transitory computer-readable storage medium of claim 10, wherein the composite hash value of the plurality of EC block is generated using a hash tree.

### Claim 13 (depends on 12)

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.

### Claim 14 (depends on 10)

The non-transitory computer-readable storage medium of claim 10, wherein the signature of the at least one of the backup nodes associated with the one of the plurality of first messages comprises a private key signature of the at least one of the backup nodes associated with the one of the plurality of first messages.

### Claim 15 (depends on 10)

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.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the verifying, by the primary node, whether the at least one second message is valid comprises:
generating, by the primary 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 primary node, a reconstructed composite hash value of the reconstructed hash tree;
comparing, by the primary node, the reconstructed composite hash value to a composite hash value in the at least one second message; and
determining, by the primary node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, the operations further comprising:
in response to determining that the reconstructed composite hash value matches the composite hash values in the second messages, determine, by the primary node, that the at least one second message is valid.

### Claim 18 (depends on 10)

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.

### Claim 19

A computer-implemented 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 primary node of a blockchain network, a transaction request, wherein the blockchain network further comprises one or more backup nodes;
generating, by the primary node, a plurality of erasure code (EC) blocks according to an EC code using the transaction request, 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 block;
sending, by the primary node, a plurality of first messages to the one or more backup nodes, respectively, wherein each of the plurality of first messages comprises a composite hash value associated with the plurality of EC blocks;
receiving, by the primary node, at least one second message from at least one of the backup nodes, wherein the at least one second message comprises one of the plurality of first messages and a signature of the at least one of the backup nodes associated with the one of the plurality of first messages;
in response to receiving the at least one second message from the at least one of the backup node, verifying, by the primary node, whether the at least one second message is valid;
determining, by the primary 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 primary 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 primary 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 primary 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 primary node, the transaction request.

### Claim 20 (depends on 19)

The system of claim 19, wherein the transaction request is associated with a sequence number.

### Claim 21 (depends on 19)

The system of claim 19, wherein the composite hash value of the plurality of EC block is generated using a hash tree.

### Claim 22 (depends on 21)

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.

### Claim 23 (depends on 19)

The system of claim 19, wherein the signature of the at least one of the backup nodes associated with the one of the plurality of first messages comprises a private key signature of the at least one of the backup nodes associated with the one of the plurality of first messages.

### Claim 24 (depends on 19)

The system of claim 19, wherein the at least one second message further comprises at least one of the plurality of EC blocks.

### Claim 25 (depends on 24)

The system of claim 24, wherein the verifying, by the primary node, whether the at least one second message is valid comprises:
generating, by the primary 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 primary node, a reconstructed composite hash value of the reconstructed hash tree;
comparing, by the primary node, the reconstructed composite hash value to a composite hash value in the at least one second message; and
determining, by the primary node, whether the reconstructed composite hash value matches the composite hash values in the at least one second message.

### Claim 26 (depends on 25)

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, determine, by the primary node, that the at least one second message is valid.

### Claim 27 (depends on 19)

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.
