# US 2021/0344501 A1 · Consensus methods and systems in consortium blockchain

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

- Number: US 2021/0344501 A1
- Document ID: US20210344501A1
- Status: Published application
- Kind: A1
- Application number: 17/357,565
- Filed: 2021-06-24
- Published: 2021-11-04
- Earliest claimed: 2020-07-03
- Assignees: Alipay (Hangzhou) Information Technology Co., Ltd.
- Applicants: Alipay (Hangzhou) Information Technology Co., Ltd.
- Inventors: Shuai Li
- Web page: https://patentgrep.com/patent/US20210344501A1

## CPC

- 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}
- G06F 11/0751: {Error or fault detection not based on redundancy (power supply failures G06F1/30; network fault management H04L41/06)}
- H04L 9/30: Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L 9/3247: {involving digital signatures}
- H04L 9/3297: {involving time stamps, e.g. generation of time stamps}
- H04L 63/123: {received data contents, e.g. message integrity}
- G06F 2201/81: Threshold
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 67/1095: Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
- 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)

## Abstract

A consensus method and system in a consortium blockchain is provided. The method includes broadcasting, by a first consensus node, a ViewChange message in a consensus network where the first consensus node does not complete a consensus operation on the target consensus data within a predetermined time period; receiving, by the first consensus primary node, the ViewChange message broadcast by the consensus node; constructing, by the first consensus primary node, a NewView message based on ECHO messages and signatures in N−f verified ViewChange messages, and broadcasting the NewView message to the consensus network to change the consensus network view to a target view; and broadcasting, by a second consensus node, the ECHO message for the target consensus data where the second consensus node determines that the present consensus node has an ECHO message corresponding to the target consensus data.

## Claims

### Claim 1

A computer-implemented method, comprising:
in response to determining that a first consensus node in a consensus network of a consortium blockchain does not complete a consensus operation on a target consensus data within a predetermined time period, broadcasting, by the first consensus node, a ViewChange message in the consensus network based on received ECHO messages broadcast for the target consensus data and received signatures, wherein the ECHO messages broadcast for the target consensus data and the signatures are sent by other consensus nodes in the consensus network;
receiving, by a first consensus primary node, the ViewChange message broadcast by the first consensus node, wherein the first consensus primary node is a consensus primary node corresponding to a view existing when the consensus operation is performed on the target consensus data. in response to determining that N−f verified ViewChange messages are received, constructing, by the first consensus primary node, a NewView message based on the ECHO messages and the signatures in the N−f verified ViewChange messages, and broadcasting, by the first consensus primary node, the NewView message to the consensus network to change a view of the consensus network to a target view, wherein f is a maximum quantity of abnormal consensus nodes allowed in the consensus network, N is a quantity of consensus nodes in the consensus network, and N>3f+1; and
in response to a determination that a present consensus node has an ECHO message corresponding to the target consensus data, broadcasting, by a second consensus node, an ECHO message for the target consensus data in the consensus network, wherein a view number in the ECHO message is a view number of the target view.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises, before broadcasting, by the first consensus node, the ViewChange message in a consensus network:
splitting, by a second consensus primary node in the consensus network based on a specified erasure coding technology, the target consensus data into a plurality of orderly arranged data fragments that have a same quantity as consensus nodes in the consensus network, wherein the second consensus primary node is a consensus primary node corresponding to a previous view of a view corresponding to the first consensus primary node;
constructing, by the second consensus primary node, a Merkle tree based on the plurality of orderly arranged data fragments; and
locally saving, by the second consensus primary node, a data fragment corresponding to the second consensus primary node, a Merkle tree path corresponding to the second consensus primary node, and a root hash of the Merkle tree, and sending, to corresponding consensus nodes in the consensus network, VAL messages comprising other data fragments, corresponding Merkle tree paths, and the root hash of the Merkle tree, wherein one data fragment corresponds to one consensus node in the consensus network.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the method further comprises, after locally saving, by the second consensus primary node, the data fragment, and sending, to the corresponding consensus nodes in the consensus network, the VAL messages:
constructing, by a third consensus node that receives a VAL message, an ECHO message for the VAL message received by the third consensus node, and broadcasting the ECHO message constructed by the third consensus node to the consensus network, wherein the ECHO message constructed by the third consensus node comprises a data fragment, a corresponding Merkle tree path, and the root hash of the Merkle tree in the VAL message received by the third consensus node; and
constructing, by the second consensus primary node, an ECHO message based on the locally saved data fragment, Merkle tree path corresponding to the second consensus primary node, and the root hash of the Merkle tree, and broadcasting the ECHO message constructed by the second consensus primary node to the consensus network.

### Claim 4 (depends on 3)

The method according to claim 3, wherein constructing, by the first consensus primary node, the NewView message based on the ECHO messages and the signatures in N−f verified ViewChange messages comprises:
determining, by the first consensus primary node, whether a hash value of an ECHO message in each of received ViewChange messages is consistent with data obtained by decrypting a signature corresponding to the ECHO message by using a public key;
in response to determining that hash values of N−f ECHO messages in the ECHO messages in the received ViewChange messages are consistent with data obtained by decrypting the signatures corresponding to the ECHO messages, determining, by the first consensus primary node, that the N−f verified ViewChange messages are received; and
constructing, by the first consensus primary node, the NewView message based on the ECHO messages and the signatures in the N−f verified ViewChange messages.

### Claim 5 (depends on 4)

The method according to claim 4, wherein constructing, by the first consensus primary node, the NewView message based on ECHO messages and the signatures in N−f verified ViewChange messages further comprises:
obtaining, by the first consensus primary node, corresponding N−f data fragments based on the ECHO messages and the signatures in the N−f verified ViewChange messages;
constructing, by the first consensus primary node, the Merkle tree based on the N−f data fragments, and obtaining the root hash of the Merkle tree; and
constructing, by the first consensus primary node, the NewView message based on the root hash of the Merkle tree, the N−f verified ViewChange messages, and a block number corresponding to the target consensus data.

### Claim 6 (depends on 5)

The method according to claim 5, wherein broadcasting, by the second consensus node, the ECHO message for the target consensus data in the consensus network comprises:
in response to the second consensus node that receives the NewView message determining that the present consensus node has an ECHO message comprising the root hash of the Merkle tree, broadcasting the ECHO message for the target consensus data in the consensus network.

### Claim 7 (depends on 6)

The method according to claim 6, wherein broadcasting, by the second consensus node, the ECHO message for the target consensus data in the consensus network comprises:
in response to the second consensus node that receives the NewView message determining that the present consensus node has the ECHO message corresponding to the target consensus data, constructing the ECHO message for the target consensus data based on a target data fragment in the ECHO message corresponding to the target consensus data in the present consensus node, a Merkle tree path of the target data fragment in the Merkle tree, the root hash of the Merkle tree, a view number obtained after a view change, and the block number corresponding to the target consensus data; and
broadcasting, by the second consensus node that receives the NewView message, the ECHO message for the target consensus data in the consensus network after the view change.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the method further comprises, after broadcasting, by the second consensus node that receives the NewView message, the ECHO message for the target consensus data in the consensus network after the view change, in response to a fourth consensus node receiving ECHO messages of N−f consensus nodes for the target consensus data, committing, by the fourth consensus node that receives the ECHO message for the target consensus data, the target consensus data to a state machine.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the first consensus node is any one of consensus nodes in the consensus network, and the second consensus node is any one of the consensus nodes in the consensus network.

### Claim 10

A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
in response to determining that a first consensus node in a consensus network of a consortium blockchain does not complete a consensus operation on a target consensus data within a predetermined time period, broadcasting, by the first consensus node, a ViewChange message in the consensus network based on received ECHO messages broadcast for the target consensus data and received signatures, wherein the ECHO messages broadcast for the target consensus data and the signatures are sent by other consensus nodes in the consensus network;
receiving, by a first consensus primary node, the ViewChange message broadcast by the first consensus node, wherein the first consensus primary node is a consensus primary node corresponding to a view existing when the consensus operation is performed on the target consensus data. in response to determining that N−f verified ViewChange messages are received, constructing, by the first consensus primary node, a NewView message based on the ECHO messages and the signatures in the N−f verified ViewChange messages, and broadcasting, by the first consensus primary node, the NewView message to the consensus network to change a view of the consensus network to a target view, wherein f is a maximum quantity of abnormal consensus nodes allowed in the consensus network, N is a quantity of consensus nodes in the consensus network, and N>3f+1; and
in response to a determination that a present consensus node has an ECHO message corresponding to the target consensus data, broadcasting, by a second consensus node, an ECHO message for the target consensus data in the consensus network, wherein a view number in the ECHO message is a view number of the target view.

### Claim 11 (depends on 10)

The non-transitory, computer-readable medium of claim 10, wherein the operations further comprise, before broadcasting, by the first consensus node, the ViewChange message in a consensus network:
splitting, by a second consensus primary node in the consensus network based on a specified erasure coding technology, the target consensus data into a plurality of orderly arranged data fragments that have a same quantity as consensus nodes in the consensus network, wherein the second consensus primary node is a consensus primary node corresponding to a previous view of a view corresponding to the first consensus primary node;
constructing, by the second consensus primary node, a Merkle tree based on the plurality of orderly arranged data fragments; and
locally saving, by the second consensus primary node, a data fragment corresponding to the second consensus primary node, a Merkle tree path corresponding to the second consensus primary node, and a root hash of the Merkle tree, and sending, to corresponding consensus nodes in the consensus network, VAL messages comprising other data fragments, corresponding Merkle tree paths, and the root hash of the Merkle tree, wherein one data fragment corresponds to one consensus node in the consensus network.

### Claim 12 (depends on 11)

The non-transitory, computer-readable medium of claim 11, wherein the operations further comprise, after locally saving, by the second consensus primary node, the data fragment, and sending, to the corresponding consensus nodes in the consensus network, the VAL messages:
constructing, by a third consensus node that receives a VAL message, an ECHO message for the VAL message received by the third consensus node, and broadcasting the ECHO message constructed by the third consensus node to the consensus network, wherein the ECHO message constructed by the third consensus node comprises a data fragment, a corresponding Merkle tree path, and the root hash of the Merkle tree in the VAL message received by the third consensus node; and
constructing, by the second consensus primary node, an ECHO message based on the locally saved data fragment, Merkle tree path corresponding to the second consensus primary node, and the root hash of the Merkle tree, and broadcasting the ECHO message constructed by the second consensus primary node to the consensus network.

### Claim 13 (depends on 12)

The non-transitory, computer-readable medium of claim 12, wherein constructing, by the first consensus primary node, the NewView message based on the ECHO messages and the signatures in N−f verified ViewChange messages comprises:
determining, by the first consensus primary node, whether a hash value of an ECHO message in each of received ViewChange messages is consistent with data obtained by decrypting a signature corresponding to the ECHO message by using a public key;
in response to determining that hash values of N−f ECHO messages in the ECHO messages in the received ViewChange messages are consistent with data obtained by decrypting the signatures corresponding to the ECHO messages, determining, by the first consensus primary node, that the N−f verified ViewChange messages are received; and
constructing, by the first consensus primary node, the NewView message based on the ECHO messages and the signatures in the N−f verified ViewChange messages.

### Claim 14 (depends on 13)

The non-transitory, computer-readable medium of claim 13, wherein constructing, by the first consensus primary node, the NewView message based on ECHO messages and the signatures in N−f verified ViewChange messages further comprises:
obtaining, by the first consensus primary node, corresponding N−f data fragments based on the ECHO messages and the signatures in the N−f verified ViewChange messages;
constructing, by the first consensus primary node, the Merkle tree based on the N−f data fragments, and obtaining the root hash of the Merkle tree; and
constructing, by the first consensus primary node, the NewView message based on the root hash of the Merkle tree, the N−f verified ViewChange messages, and a block number corresponding to the target consensus data.

### Claim 15 (depends on 14)

The non-transitory, computer-readable medium of claim 14, wherein broadcasting, by the second consensus node, the ECHO message for the target consensus data in the consensus network comprises:
in response to the second consensus node that receives the NewView message determining that the present consensus node has an ECHO message comprising the root hash of the Merkle tree, broadcasting the ECHO message for the target consensus data in the consensus network.

### Claim 16 (depends on 15)

The non-transitory, computer-readable medium of claim 15, wherein broadcasting, by the second consensus node, the ECHO message for the target consensus data in the consensus network comprises:
in response to the second consensus node that receives the NewView message determining that the present consensus node has the ECHO message corresponding to the target consensus data, constructing the ECHO message for the target consensus data based on a target data fragment in the ECHO message corresponding to the target consensus data in the present consensus node, a Merkle tree path of the target data fragment in the Merkle tree, the root hash of the Merkle tree, a view number obtained after a view change, and the block number corresponding to the target consensus data; and
broadcasting, by the second consensus node that receives the NewView message, the ECHO message for the target consensus data in the consensus network after the view change.

### Claim 17 (depends on 16)

The non-transitory, computer-readable medium of claim 16, wherein the operations further comprise, after broadcasting, by the second consensus node that receives the NewView message, the ECHO message for the target consensus data in the consensus network after the view change, in response to a fourth consensus node receiving ECHO messages of N−f consensus nodes for the target consensus data, committing, by the fourth consensus node that receives the ECHO message for the target consensus data, the target consensus data to a state machine.

### Claim 18 (depends on 10)

The non-transitory, computer-readable medium of claim 10, wherein the first consensus node is any one of consensus nodes in the consensus network, and the second consensus node is any one of the consensus nodes in the consensus network.

### Claim 19

A computer-implemented system, comprising:
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:
in response to determining that a first consensus node in a consensus network of a consortium blockchain does not complete a consensus operation on a target consensus data within a predetermined time period, broadcasting, by the first consensus node, a ViewChange message in the consensus network based on received ECHO messages broadcast for the target consensus data and received signatures, wherein the ECHO messages broadcast for the target consensus data and the signatures are sent by other consensus nodes in the consensus network;
receiving, by a first consensus primary node, the ViewChange message broadcast by the first consensus node, wherein the first consensus primary node is a consensus primary node corresponding to a view existing when the consensus operation is performed on the target consensus data.
in response to determining that N−f verified ViewChange messages are received, constructing, by the first consensus primary node, a NewView message based on the ECHO messages and the signatures in the N−f verified ViewChange messages, and broadcasting, by the first consensus primary node, the NewView message to the consensus network to change a view of the consensus network to a target view, wherein f is a maximum quantity of abnormal consensus nodes allowed in the consensus network, N is a quantity of consensus nodes in the consensus network, and N>3f+1; and
in response to a determination that a present consensus node has an ECHO message corresponding to the target consensus data, broadcasting, by a second consensus node, an ECHO message for the target consensus data in the consensus network, wherein a view number in the ECHO message is a view number of the target view.

### Claim 20 (depends on 19)

The system of claim 19, wherein the operations further comprise, before broadcasting, by the first consensus node, the ViewChange message in a consensus network:
splitting, by a second consensus primary node in the consensus network based on a specified erasure coding technology, the target consensus data into a plurality of orderly arranged data fragments that have a same quantity as consensus nodes in the consensus network, wherein the second consensus primary node is a consensus primary node corresponding to a previous view of a view corresponding to the first consensus primary node;
constructing, by the second consensus primary node, a Merkle tree based on the plurality of orderly arranged data fragments; and
locally saving, by the second consensus primary node, a data fragment corresponding to the second consensus primary node, a Merkle tree path corresponding to the second consensus primary node, and a root hash of the Merkle tree, and sending, to corresponding consensus nodes in the consensus network, VAL messages comprising other data fragments, corresponding Merkle tree paths, and the root hash of the Merkle tree, wherein one data fragment corresponds to one consensus node in the consensus network.
