IP Library Granted Patent US 10,977,135
Granted Patent B2
US 10,977,135 · App. 16/494,592 · Granted Apr 13, 2021

Consensus system downtime recovery

Inventor: Dayi Yang (Hangzhou, CN)
Assignee: ADVANCED NEW TECHNOLOGIES CO., LTD.
G06F11/1469G06F9/4401G06F11/1451G06F11/1474G06F16/2379G06F2201/80G06F2201/82
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,977,135
App. No.
16/494,592
Granted
Apr 13, 2021
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for consensus system downtime recovery. One of the methods includes: multicasting a pre-prepare message to at least some of the backup nodes; obtaining (Q−1) or more prepare messages respectively from (Q−1) or more of the backup nodes, wherein the prepare messages each indicate an acceptance of the pre-prepare message by the corresponding backup node; storing the pre-prepare message and the (Q−1) or more prepare messages; multicasting a commit message to at least some of the backup nodes, the commit message indicating that the primary node agrees to the (Q−1) or more prepare messages; and obtaining, respectively from Q or more nodes among the primary node and the backup nodes, Q or more commit messages each indicating that the corresponding node agrees to (Q−1) or more prepare messages received by the corresponding node.

Claims (65)

1. A computer-implemented consensus method to be implemented on a blockchain maintained by a number (N) of nodes, wherein one of the nodes acts as a primary node and the other (N−1) nodes act as backup nodes, and the method is performed by the primary node, the method comprising:

multicasting a pre-prepare message to at least some of the backup nodes;

obtaining (Q−1) or more prepare messages respectively from (Q−1) or more of the backup nodes, wherein the prepare messages each indicate an acceptance of the pre-prepare message by the corresponding backup node, Q (quorum) is (N+F+1)/2 rounded up to the nearest integer, and F is (N−1)/3 rounded down to the nearest integer;

storing the pre-prepare message and the (Q−1) or more prepare messages;

multicasting a commit message to at least some of the backup nodes, the commit message indicating that the primary node agrees to the (Q−1) or more prepare messages; and

obtaining, respectively from Q or more nodes among the primary node and the backup nodes, Q or more commit messages each indicating that the corresponding node agrees to (Q−1) or more prepare messages received by the corresponding node.

2. The method of claim 1 , wherein:

before multicasting the pre-prepare message to at least some of the backup nodes, the method further comprises obtaining one or more transaction requests from at least one of: one or more clients or one or more of the backup nodes.

3. The method of claim 2 , wherein:

the pre-prepare message comprises an order of one or more transactions corresponding to the one or more transaction requests; and

the commit message indicates that the corresponding node that sent the commit message agrees to the order.

4. The method of claim 3 , further comprising:

packing the one or more transactions into a local copy of the blockchain maintained by the primary node according to the order.

5. The method of claim 1 , wherein:

the Q or more commit messages include the multicast commit message.

6. The method of claim 1 , wherein storing the pre-prepare message and the (Q−1) or more prepare messages comprises:

storing only the pre-prepare message and the (Q−1) or more prepare messages.

7. The method of claim 1 , after multicasting the commit message, further comprising:

performing a system restart; and

loading the stored pre-prepare message and the stored (Q−1) or more prepare messages.

8. The method of claim 1 , after storing the pre-prepare message and the (Q−1) or more prepare messages and before multicasting the commit message, further comprising:

performing a system restart; and

loading the stored pre-prepare message and the stored (Q−1) or more prepare messages.

9. The method of claim 8 , wherein performing the system restart comprises:

performing the system restart without triggering a view change.

10. A consensus system for maintaining a blockchain, wherein a number of N nodes maintain the blockchain with one of the N nodes acting as a primary node and the other (N−1) nodes acting as backup nodes, the consensus system acting as the primary node and comprising one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the system to perform operations comprising:

multicasting a pre-prepare message to at least some of the backup nodes;

obtaining (Q−1) or more prepare messages respectively from (Q−1) or more of the backup nodes, wherein the prepare messages each indicate an acceptance of the pre-prepare message by the corresponding backup node, Q (quorum) is (N+F+1)/2 rounded up to the nearest integer, and F is (N−1)/3 rounded down to the nearest integer;

storing the pre-prepare message and the (Q−1) or more prepare messages;

multicasting a commit message to at least some of the backup nodes, the commit message indicating that the primary node agrees to the (Q−1) or more prepare messages; and

obtaining, respectively from Q or more nodes among the primary node and the backup nodes, Q or more commit messages each indicating that the corresponding node agrees to (Q−1) or more prepare messages received by the corresponding node.

11. The system of claim 10 , wherein:

before multicasting the pre-prepare message to at least some of the backup nodes, the operations further comprise obtaining one or more transaction requests from at least one of: one or more clients or one or more of the backup nodes;

the pre-prepare message comprises an order of one or more transactions corresponding to the one or more transaction requests;

the commit message indicates that the corresponding node that sent the commit message agrees to the order; and

the operations further comprise packing the one or more transactions into a local copy of the blockchain maintained by the primary node according to the order.

12. The system of claim 10 , wherein storing the pre-prepare message and the (Q−1) or more prepare messages comprises:

storing only the pre-prepare message and the (Q−1) or more prepare messages.

13. The system of claim 10 , wherein, after multicasting the commit message, the operations further comprise:

performing a system restart; and

loading the stored pre-prepare message and the stored (Q−1) or more prepare messages.

14. The system of claim 10 , wherein, after storing the pre-prepare message and the (Q−1) or more prepare messages and before multicasting the commit message, the operations further comprise:

performing a system restart; and

loading the stored pre-prepare message and the stored (Q−1) or more prepare messages.

15. The system of claim 14 , wherein performing the system restart comprises:

performing the system restart without triggering a view change.

16. A non-transitory computer-readable storage medium for maintaining a blockchain, wherein a number of N nodes maintain the blockchain with one of the N nodes acting as a primary node and the other (N−1) nodes acting as backup nodes, the non-transitory computer-readable storage medium is associated with the primary node, the non-transitory computer-readable storage medium stores instructions executable by one or more processors, and execution of the instructions causes the one or more processors to perform operations comprising:

multicasting a pre-prepare message to at least some of the backup nodes;

obtaining (Q−1) or more prepare messages respectively from (Q−1) or more of the backup nodes, wherein the prepare messages each indicate an acceptance of the pre-prepare message by the corresponding backup node, Q (quorum) is (N+F+1)/2 rounded up to the nearest integer, and F is (N−1)/3 rounded down to the nearest integer;

storing the pre-prepare message and the (Q−1) or more prepare messages;

multicasting a commit message to at least some of the backup nodes, the commit message indicating that the primary node agrees to the (Q−1) or more prepare messages; and

obtaining, respectively from Q or more nodes among the primary node and the backup nodes, Q or more commit messages each indicating that the corresponding node agrees to (Q−1) or more prepare messages received by the corresponding node.

17. The non-transitory computer-readable storage medium of claim 16 , wherein:

before multicasting the pre-prepare message to at least some of the backup nodes, the operations further comprise obtaining one or more transaction requests from at least one of: one or more clients or one or more of the backup nodes;

the pre-prepare message comprises an order of one or more transactions corresponding to the one or more transaction requests;

the commit message indicates that the corresponding node that sent the commit message agrees to the order; and

the operations further comprise packing the one or more transactions into a local copy of the blockchain maintained by the primary node according to the order.

18. The non-transitory computer-readable storage medium of claim 16 , wherein storing the pre-prepare message and the (Q−1) or more prepare messages comprises:

storing only the pre-prepare message and the (Q−1) or more prepare messages.

19. The non-transitory computer-readable storage medium of claim 16 , wherein, after multicasting the commit message, the operations further comprise:

performing a system restart; and

loading the stored pre-prepare message and the stored (Q−1) or more prepare messages.

20. The non-transitory computer-readable storage medium of claim 16 , wherein, after storing the pre-prepare message and the (Q−1) or more prepare messages and before multicasting the commit message, the operations further comprise:

performing a system restart; and

loading the stored pre-prepare message and the stored (Q−1) or more prepare messages.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053796/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053702/0392 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2019
From: YANG, DAYI
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 050390/0369 →