IP Library › Granted Patent US 11,194,792
Granted Patent B2
US 11,194,792 · App. 17/085,152 · Granted Dec 7, 2021

Taking snapshots of blockchain data

Inventor: Zhonghao Lu (Hangzhou, CN)
Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
G06F16/2379G06F16/2246G06F16/2255G06F16/2365
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 11,194,792
App. No.
17/085,152
Granted
Dec 7, 2021
Kind
B2
Abstract

A computer-implemented method for blockchain data storage includes generating, by one or more processing devices, a snapshot of a current state tree associated with a fixed depth Merkle tree (FDMT) during creation of a block of a blockchain, wherein the current state tree stores state information corresponding to a newest block of the blockchain; and storing, by the one or more processing devices, the snapshot of the current state tree.

Claims (35)

1. A computer-implemented method for blockchain data storage comprising:

generating, by one or more processing devices and by executing a checkpoint function in a key-value database, a snapshot of a current state tree associated with a fixed depth Merkle tree (FDMT) during creation of a block of a blockchain, wherein a checkpoint in the checkpoint function comprises a point in time of generation of the snapshot, wherein the current state tree comprises state information corresponding to a newest block of the blockchain, wherein the current state tree comprises a plurality of first key-value pairs (KVPs), wherein a key of a key-value pair (KVP) in the plurality of first KVPs comprises a node identifier (ID) corresponding to a node of the current state tree and a block ID corresponding to the newest block, wherein the FDMT comprises a historic state tree comprising state information corresponding to every block of the blockchain, wherein the historic state tree comprises a plurality of second KVPs, and wherein a key of a KVP in the plurality of second KVPs comprises a hash value of a corresponding value of the KVP;

storing, by the one or more processing devices, the snapshot of the current state tree;

adding, by the one or more processing devices and as an ID of the snapshot of the current state tree, the block ID corresponding to the newest block;

receiving, by the one or more processing devices, a request to retrieve the state information corresponding to the newest blocks;

determining, by the one or more processing devices and based on the ID of the snapshot, that the snapshot of the current state tree exists; and

providing, by the one or more processing devices, the state information based on the snapshot of the current state tree.

2. The computer-implemented method of claim 1 , wherein the current state tree is associated with a contract account of the blockchain, and wherein the current state tree is a tree that encodes storage content of the contract account.

3. The computer-implemented method of claim 2 , wherein the snapshot includes a Merkle path associated with the contract account and included in a world state tree associated with the newest block.

4. The computer-implemented method of claim 1 , further comprising:

deleting the historic state tree after the snapshot is stored.

5. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations for blockchain data storage, the operations comprising:

generating, by executing a checkpoint function in a key-value database, a snapshot of a current state tree associated with a fixed depth Merkle tree (FDMT) during creation of a block of a blockchain, wherein a checkpoint in the checkpoint function comprises a point in time of generation of the snapshot, wherein the current state tree comprises state information corresponding to a newest block of the blockchain, wherein the current state tree comprises a plurality of first key-value pairs (KVPs), wherein a key of a key-value pair (KVP) in the plurality of first KVPs comprises a node identifier (ID) corresponding to a node of the current state tree and a block ID corresponding to the newest block, wherein the FDMT comprises a historic state tree comprising state information corresponding to every block of the blockchain, wherein the historic state tree comprises a plurality of second KVPs, and wherein a key of a KVP in the plurality of second KVPs comprises a hash value of a corresponding value of the KVP;

storing the snapshot of the current state tree;

adding, as an ID of the snapshot of the current state tree, the block ID corresponding to the newest block;

receiving a request to retrieve the state information corresponding to the newest block;

determining, based on the ID of the snapshot, that the snapshot of the current state tree exists; and

providing the state information based on the snapshot of the current state tree.

6. The non-transitory, computer-readable medium of claim 5 , wherein the current state tree is associated with a contract account of the blockchain, and wherein the current state tree is a tree that encodes storage content of the contract account.

7. The non-transitory, computer-readable medium of claim 6 , wherein the snapshot includes a Merkle path associated with the contract account and included in a world state tree associated with the newest block.

8. The non-transitory, computer-readable medium of claim 5 , wherein the operations further comprise:

deleting the historic state tree after the snapshot is stored.

9. 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 for blockchain data storage, the one or more operations comprising:

generating, by executing a checkpoint function in a key-value database, a snapshot of a current state tree associated with a fixed depth Merkle tree (FDMT) during creation of a block of a blockchain, wherein a checkpoint in the checkpoint function comprises a point in time of generation of the snapshot, wherein the current state tree comprises state information corresponding to a newest block of the blockchain, wherein the current state tree comprises a plurality of first key-value pairs (KVPs), wherein a key of a key-value pair (KVP) in the plurality of first KVPs comprises a node identifier (ID) corresponding to a node of the current state tree and a block ID corresponding to the newest block, wherein the FDMT comprises a historic state tree comprising state information corresponding to every block of the blockchain, wherein the historic state tree comprises a plurality of second KVPs, and wherein a key of a KVP in the plurality of second KVPs comprises a hash value of a corresponding value of the KVP;

storing the snapshot of the current state tree;

adding, as an ID of the snapshot of the current state tree, the block ID corresponding to the newest block;

receiving a request to retrieve the state information corresponding to the newest block;

determining, based on the ID of the snapshot, that the snapshot of the current state tree exists; and

providing the state information based on the snapshot of the current state tree.

10. The computer-implemented system of claim 9 , wherein the current state tree is associated with a contract account of the blockchain, and wherein the current state tree is a tree that encodes storage content of the contract account.

11. The computer-implemented system of claim 10 , wherein the snapshot includes a Merkle path associated with the contract account and included in a world state tree associated with the newest block.

12. The computer-implemented system of claim 9 , wherein the one or more operations further comprise:

deleting the historic state tree after the snapshot is stored.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2025
From: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
To: ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO., LTD.
Reel/Frame 070578/0163 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 15, 2021
From: LU, ZHONGHAO
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 055592/0668 →
Continuity (2)
Continuation PCTCN2019121978 · Nov 29, 2019
Related Publication 20210049156A1 · Feb 18, 2021
Cited By (2)
US 12,554,683 US 12,639,268