# US 2021/0286669 A1 · Prioritizing shared blockchain data storage

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

- Number: US 2021/0286669 A1
- Document ID: US20210286669A1
- Status: Published application
- Kind: A1
- Application number: 17/333,961
- Filed: 2021-05-28
- Published: 2021-09-16
- Earliest claimed: 2019-11-06
- Assignees: Alipay (Hangzhou) Information Technology Co., Ltd.
- Applicants: Alipay (Hangzhou) Information Technology Co., Ltd.
- Inventors: Zhonghao Lu; Haizhen Zhuo
- Web page: https://patentgrep.com/patent/US20210286669A1

## CPC

- G06F 11/1044: {with specific ECC/EDC distribution}
- G06F 21/57: Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F 11/1004: {to protect a block of data words, e.g. CRC or checksum (G06F11/1076 takes precedence; security arrangements for protecting computers or computer systems against unauthorized activity G06F21/00)}
- G06F 11/182: {based on mutual exchange of the output between redundant processing components}
- G06F 16/2255: {Hash tables}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- G06F 21/78: to assure secure storage of data (address-based protection against unauthorised use of memory G06F12/14; record carriers for use with machines and with at least a part designed to carry digital markings G06K19/00)
- H04L 9/0897: {involving additional devices, e.g. trusted platform module [TPM], smartcard or USB}
- 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 9/3247: {involving digital signatures}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 2209/34: Encoding or coding, e.g. Huffman coding or error correction
- H04L 2209/463: Electronic voting
- H04L 2209/56: Financial cryptography, e.g. electronic payment or e-cash
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

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

### Claim 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 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 minimum number of honest blockchain nodes required by the blockchain network divided by a total number of blockchain nodes of the blockchain network.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
after encoding the first portion of the plurality of blocks, calculating an updated priority value of the plurality of blocks based on a maximum number of faulty nodes tolerable by the blockchain network and the total number of the blockchain nodes, wherein the minimum number of honest blockchain nodes required and the maximum number of faulty blockchain nodes tolerable add up to the total number.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
generating an index that provides a correspondence between block identifiers (IDs) of the plurality of blocks and 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.

### Claim 4 (depends on 1)

The method of claim 1, further 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, and an index that provides a correspondence between the plurality of datasets and the hash values to each of the blockchain nodes.

### Claim 5 (depends on 4)

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, and the method further comprises:
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 ECC, wherein priority values of the third portion of the plurality of blocks is larger than the 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.

### Claim 6 (depends on 1)

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.

### Claim 7 (depends on 1)

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

### Claim 8 (depends on 1)

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.

### Claim 9 (depends on 1)

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

### Claim 10 (depends on 1)

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

### Claim 11

A computer-implemented system for processing blockchain data in a trusted execution environment (TEE) communicably coupled to a blockchain network, the 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 operations comprising:
receiving a plurality of blocks from a blockchain node in a 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 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 minimum number of honest blockchain nodes required by the blockchain network divided by a total number of blockchain nodes of the blockchain network.

### Claim 12 (depends on 11)

The system of claim 11, the operations further comprising:
after encoding the first portion of the plurality of blocks, calculating an updated priority value of the plurality of blocks based on a maximum number of faulty nodes tolerable by the blockchain network and the total number of the blockchain nodes, wherein the minimum number of honest blockchain nodes required and the maximum number of faulty blockchain nodes tolerable add up to the total number.

### Claim 13 (depends on 12)

The system of claim 12, the operations further comprising:
generating an index that provides a correspondence between block identifiers (IDs) of the plurality of blocks and 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.

### Claim 14 (depends on 11)

The system of claim 11, the operations further 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, and an index that provides a correspondence between the plurality of datasets and the hash values to each of the blockchain nodes.

### Claim 15 (depends on 14)

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, and the operations further 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 ECC, wherein priority values of the third portion of the plurality of blocks is larger than the 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.

### Claim 16 (depends on 11)

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

### Claim 17 (depends on 11)

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

### Claim 18 (depends on 11)

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.

### Claim 19 (depends on 11)

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

### Claim 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 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 minimum number of honest blockchain nodes required by the blockchain network divided by a total number of blockchain nodes of the blockchain network.
