IP Library Granted Patent US 11,327,833
Granted Patent B2
US 11,327,833 · App. 17/333,961 · Granted May 10, 2022

Prioritizing shared blockchain data storage

Inventors: Zhonghao Lu (Hangzhou, CN); Haizhen Zhuo (Hangzhou, CN)
Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
G06F11/1044G06F11/1004G06F16/2255H04L9/3236G06F16/27H04L2209/34H04L2209/38H04L2209/463
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,327,833
App. No.
17/333,961
Granted
May 10, 2022
Kind
B2
Abstract

Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage media, for storing blockchain data. One of the methods includes receiving a plurality of blocks from a blockchain node in the blockchain network; for each of the plurality of blocks: determining a first number of blockchain nodes that store a dataset divided from an error correction coding (ECC) encoded version of the block and a second number of blockchain nodes that store a dataset comprised of redundant bits divided from the ECC encoded version of the block; calculating a priority value of the block based on the first number and the second number; and encoding at least a portion of the plurality of blocks using ECC to generate a plurality of encoded blocks based on the priority value.

Claims (55)

1. A computer-implemented method for processing blockchain data in a trusted execution environment (TEE) executing on a computing device communicably coupled to a blockchain network, the method comprising:

receiving a plurality of blocks from a blockchain node in the blockchain network;

for each of the plurality of blocks:

determining a first number of blockchain nodes that store a dataset divided from an error correction coding (ECC) encoded version of the block and a second number of blockchain nodes that store a dataset comprised of redundant bits divided from the ECC encoded version of the block;

calculating a priority value of the block based on the first number and the second number; and

encoding at least a first portion of the plurality of blocks using the ECC to generate a plurality of encoded blocks, wherein the first portion of the plurality of blocks have smaller priority values than a remainder of the plurality of blocks other than the first portion of the plurality of blocks, and wherein a code rate of the first portion of the plurality of encoded blocks equals a third number of honest blockchain nodes divided by a fourth number of blockchain nodes of the blockchain network, wherein the third number of honest blockchain nodes indicates a minimum number of honest blockchain nodes required by the blockchain network, and the fourth number of blockchain nodes of the blockchain network indicates a total number of blockchain nodes of the blockchain network.

2. The method of claim 1 , comprising:

after encoding the first portion of the plurality of blocks, calculating updated priority values of the plurality of blocks based on a fifth number of faulty blockchain nodes and the fourth number of blockchain nodes of the blockchain network, wherein the fifth number of faulty blockchain nodes indicates a maximum number of faulty blockchain nodes tolerable by the blockchain network, and wherein the third number and the fifth number add up to the fourth number.

3. The method of claim 2 , comprising:

generating an index that provides a correspondence between block identifiers (IDs) of the plurality of blocks and the updated priority values of the plurality of blocks; and

updating priority values of the first portion of the plurality of blocks with the updated priority values of the plurality of blocks.

4. The method of claim 2 , comprising:

dividing each of the plurality of encoded blocks into a plurality of datasets;

calculating hash values of the plurality of datasets; and

sending at least one of the plurality of datasets, the hash values of the plurality of datasets, and an index that provides a correspondence between the plurality of datasets and the hash values of the plurality of datasets to each of the blockchain nodes of the blockchain network.

5. The method of claim 4 , wherein the first portion of the plurality of blocks includes at least a second portion of the plurality of blocks, comprising:

receiving a notification that blockchain data stored on the blockchain node has a size exceeding a predetermined data storage threshold after storing the at least one of the plurality of datasets sent by the computing device and deleting the second portion of the plurality of blocks;

encoding at least a third portion of the plurality of blocks using the ECC, wherein priority values of the third portion of the plurality of blocks is larger than priority values of the second portion of the plurality of blocks and is smaller than a remainder of the plurality of blocks other than the second portion of the plurality of blocks and the third portion of the plurality of blocks; and

updating the priority values of the third portion of the plurality of blocks with the updated priority values of the plurality of blocks.

6. The method of claim 1 , wherein the ECC is performed when utilization rate of computational resource of the computing device is less than or equal to a predetermined value.

7. The method of claim 1 , wherein the ECC is erasure coding performed by adding redundant bits to the plurality of blocks.

8. The method of claim 1 , wherein the priority value is calculated as the first number minus the first number divided by a difference between the first number and the second number.

9. The method of claim 1 , wherein the blockchain node is a full node that stores a copy of a blockchain.

10. The method of claim 1 , wherein the minimum number of honest blockchain nodes is determined based on a practical Byzantine fault tolerance (PBFT) consensus protocol.

11. A computer-implemented system for processing blockchain data in a trusted execution environment (TEE) communicably coupled to a blockchain network, 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 operations comprising:

receiving a plurality of blocks from a blockchain node in the blockchain network;

for each of the plurality of blocks:

determining a first number of blockchain nodes that store a dataset divided from an error correction coding (ECC) encoded version of the block and a second number of blockchain nodes that store a dataset comprised of redundant bits divided from the ECC encoded version of the block;

calculating a priority value of the block based on the first number and the second number; and

encoding at least a first portion of the plurality of blocks using the ECC to generate a plurality of encoded blocks, wherein the first portion of the plurality of blocks have smaller priority values than a remainder of the plurality of blocks other than the first portion of the plurality of blocks, and wherein a code rate of the first portion of the plurality of encoded blocks equals a third number of honest blockchain nodes divided by a fourth number of blockchain nodes of the blockchain network, wherein the third number of honest blockchain nodes indicates a minimum number of honest blockchain nodes required by the blockchain network, and the fourth number of blockchain nodes of the blockchain network indicates a total number of blockchain nodes of the blockchain network.

12. The system of claim 11 , the operations comprising:

after encoding the first portion of the plurality of blocks, calculating updated priority values of the plurality of blocks based on a fifth number of faulty blockchain nodes and the fourth number of blockchain nodes of the blockchain network, wherein the fifth number of faulty blockchain nodes indicates a maximum number of faulty blockchain nodes tolerable by the blockchain network, and wherein the third number and the fifth number add up to the fourth number.

13. The system of claim 12 , the operations comprising:

generating an index that provides a correspondence between block identifiers (IDs) of the plurality of blocks and the updated priority values of the plurality of blocks; and

updating priority values of the first portion of the plurality of blocks with the updated priority values of the plurality of blocks.

14. The system of claim 12 , the operations comprising:

dividing each of the plurality of encoded blocks into a plurality of datasets;

calculating hash values of the plurality of datasets; and

sending at least one of the plurality of datasets, the hash values of the plurality of datasets, and an index that provides a correspondence between the plurality of datasets and the hash values of the plurality of datasets to each of the blockchain nodes of the blockchain network.

15. The system of claim 14 , wherein the first portion of the plurality of blocks includes at least a second portion of the plurality of blocks, the operations comprising:

receiving a notification that blockchain data stored on the blockchain node has a size exceeding a predetermined data storage threshold after storing the at least one of the plurality of datasets sent by the one or more computers and deleting the second portion of the plurality of blocks;

encoding at least a third portion of the plurality of blocks using the ECC, wherein priority values of the third portion of the plurality of blocks is larger than priority values of the second portion of the plurality of blocks and is smaller than a remainder of the plurality of blocks other than the second portion of the plurality of blocks and the third portion of the plurality of blocks; and

updating the priority values of the third portion of the plurality of blocks with the updated priority values of the plurality of blocks.

16. The system of claim 11 , wherein the ECC is performed when utilization rate of computational resource of the one or more computers is less than or equal to a predetermined value.

17. The system of claim 11 , wherein the ECC is erasure coding performed by adding redundant bits to the plurality of blocks.

18. The system of claim 11 , wherein the priority value is calculated as the first number minus the first number divided by a difference between the first number and the second number.

19. The system of claim 11 , wherein the blockchain node is a full node that stores a copy of a blockchain.

20. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations for processing blockchain data in a trusted execution environment (TEE) executing on a computing device communicably coupled to a blockchain network, the operations comprising:

receiving a plurality of blocks from a blockchain node in the blockchain network;

for each of the plurality of blocks:

determining a first number of blockchain nodes that store a dataset divided from an error correction coding (ECC) encoded version of the block and a second number of blockchain nodes that store a dataset comprised of redundant bits divided from the ECC encoded version of the block;

calculating a priority value of the block based on the first number and the second number; and

encoding at least a first portion of the plurality of blocks using the ECC to generate a plurality of encoded blocks, wherein the first portion of the plurality of blocks have smaller priority values than a remainder of the plurality of blocks other than the first portion of the plurality of blocks, and wherein a code rate of the first portion of the plurality of encoded blocks equals a third number of honest blockchain nodes divided by a fourth number of blockchain nodes of the blockchain network, wherein the third number of honest blockchain nodes indicates a minimum number of honest blockchain nodes required by the blockchain network, and the fourth number of blockchain nodes of the blockchain network indicates a total number of blockchain nodes of the blockchain network.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 28, 2021
From: LU, ZHONGHAO; ZHUO, HAIZHEN
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 057009/0294 →
Continuity (3)
Continuation 17086034 · Oct 30, 2020
Continuation PCTCN2019115902 · Nov 6, 2019
Related Publication 20210286669A1 · Sep 16, 2021
Cited By (1)
US 12,306,709