# US 2021/0081373 A1 · Log-structured storage systems

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

- Number: US 2021/0081373 A1
- Document ID: US20210081373A1
- Status: Published application
- Kind: A1
- Application number: 16/712,393
- Filed: 2019-12-12
- Published: 2021-03-18
- Earliest claimed: 2019-09-12
- Assignees: Advanced New Technologies Co., Ltd.
- Applicants: Advanced New Technologies Co., Ltd.
- Inventors: Shikun Tian
- Web page: https://patentgrep.com/patent/US20210081373A1

## CPC

- G06F 3/0647: {Migration mechanisms}
- G06F 16/1805: {Append-only file systems, e.g. using logs or journals to store data}
- G06F 3/0605: {by facilitating the interaction with a user or administrator}
- G06F 3/061: {Improving I/O performance}
- G06F 3/064: {Management of blocks}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 3/0685: {Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays}
- G06F 16/137: {Hash-based (content-based indexing of textual data G06F16/31)}
- G06F 16/185: Hierarchical storage management [HSM] systems, e.g. file migration or policies thereof (details of archiving G06F16/11)
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage devices, for data processing. One of the methods includes determining, by a storage system from an index log file, information of a data log file stored in a storage device. The data log file includes one or more of block data, transaction data, or state data generated by a blockchain network. The storage system determines whether the data log file needs a rewritten placement. In response to determining that the data log file needs a rewritten placement, the storage system determines a source storage location of the data log file, reads the data log file from the source storage location, rewrites the data log file to a destination storage location; and generates a destination index log file that indicates the destination storage location corresponding to the data log file.

## Claims

### Claim 1

A computer-implemented method comprising:
storing, by a storage system, first blockchain data generated by a blockchain network in a first data log file stored in a first storage device in a multi-tier storage subsystem of the storage system that comprises a plurality of tiers of storage devices, wherein the first blockchain data are blockchain block data, and wherein the blockchain block data comprise at least one block in a blockchain and a hash value of a previous block in the blockchain;
generating, by the storage system, first index data indicating a first physical storage location of the first data log file stored in the first storage device;
storing, by the storage system, the first index data into a first index log file;
storing, by the storage system, second blockchain data generated by the blockchain network in a second data log file stored in a second storage device in the multi-tier storage subsystem of the storage system, wherein the second blockchain data are blockchain state data, and wherein the blockchain state data comprise a world state of the blockchain network;
generating, by the storage system, second index data indicating a second physical storage location of the second data log file stored in the second storage device;
storing, by the storage system, the second index data into a second index log file;
determining, by the storage system and from the first index log file, first information of the first data log file;
determining, by the storage system, that the first data log file needs a first rewritten placement based on the first information of the first data log file stored in the first storage device,
wherein determining that the first data log file needs the first rewritten placement based on the first information of the first data log file stored in the first storage device comprises:
determining, by the storage system, a first type of the first blockchain data in the first data log file; and
in response to determining the first type of the first blockchain data in the first data log file to be the blockchain block data, determining, by the storage system, the first rewritten placement to be one or more of tiering, compressing, erasure coding, or verification;
performing, by the storage system, the first rewritten placement on the first blockchain data in the first data log file;
determining, by the storage system and from the second index log file, second information of the second data log file;
determining, by the storage system, that the second data log file needs a second rewritten placement based on the second information of the second data log file stored in the second storage device, wherein determining that the second data log file needs the second rewritten placement based on the second information of the first data log file stored in the second storage device comprises:
determining, by the storage system, a second type of the second blockchain data in the second data log file; and
in response to determining the second type of the second blockchain data in the second data log file to be the blockchain state data, determining, by the storage system, that the second rewritten placement comprises state snapshot; and
performing, by the storage system, the second rewritten placement on the second blockchain data in the second data log file.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the first data log file is an append-only file storing the blockchain block data by appending the blockchain block data according to a chronological order of the blockchain block data generated by the blockchain network.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein storing first blockchain data generated by a blockchain network in a first data log file stored in a first storage device comprises:
determining the first type of the first blockchain data; and
appending the first blockchain data in the first data log file stored in the first storage device according to the first type of the first blockchain data.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein performing, by the storage system, the first rewritten placement on the first blockchain data in the first data log file comprises:
determining, by the storage system, a source storage location of the first data log file;
reading, by the storage system, the first data log file from the source storage location;
rewriting, by the storage system, the first data log file to a destination storage location; and
generating, by the storage system, a destination index log file that indicates the destination storage location corresponding to the first data log file.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the first information of the first data log file in the first storage device comprises one or more of:
an activeness, a size, a garbage ratio, or a fragmentation level of the first data log file.

### Claim 6

(canceled)

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein performing, by the storage system, the second rewritten placement on the second blockchain data in the second data log file comprises: performing, by the storage system, the state snapshot on the second blockchain data in the second data log file.

### Claim 8

(canceled)

### Claim 9

(canceled)

### Claim 10

A non-transitory, computer-readable storage medium storing one or more instructions executable by a computer system to perform operations comprising:
storing, by a storage system, first blockchain data generated by a blockchain network in a first data log file stored in a first storage device in a multi-tier storage subsystem of the storage system that comprises a plurality of tiers of storage devices, wherein the first blockchain data are blockchain block data, and wherein the blockchain block data comprise at least one block in a blockchain and a hash value of a previous block in the blockchain;
generating, by the storage system, first index data indicating a first physical storage location of the first data log file stored in the first storage device;
storing, by the storage system, the first index data into a first index log file;
storing, by the storage system, second blockchain data generated by the blockchain network in a second data log file stored in a second storage device in the multi-tier storage subsystem of the storage system, wherein the second blockchain data are blockchain state data, and wherein the blockchain state data comprise a world state of the blockchain network;
generating, by the storage system, second index data indicating a second physical storage location of the second data log file stored in the second storage device;
storing, by the storage system, the second index data into a second index log file;
determining, by the storage system and from the first index log file, first information of the first data log file;
determining, by the storage system, that the first data log file needs a first rewritten placement based on the first information of the first data log file stored in the first storage device,
wherein determining that the first data log file needs the first rewritten placement based on the first information of the first data log file stored in the first storage device comprises:
determining, by the storage system, a first type of the first blockchain data in the first data log file; and
in response to determining the first type of the first blockchain data in the first data log file to be the blockchain block data, determining, by the storage system, the first rewritten placement to be one or more of tiering, compressing, erasure coding, or verification;
performing, by the storage system, the first rewritten placement on the first blockchain data in the first data log file;
determining, by the storage system and from the second index log file, second information of the second data log file;
determining, by the storage system, that the second data log file needs a second rewritten placement based on the second information of the second data log file stored in the second storage device, wherein determining that the second data log file needs the second rewritten placement based on the second information of the first data log file stored in the second storage device comprises:
determining, by the storage system, a second type of the second blockchain data in the second data log file; and
in response to determining the second type of the second blockchain data in the second data log file to be the blockchain state data, determining, by the storage system, that the second rewritten placement comprises state snapshot; and
performing, by the storage system, the second rewritten placement on the second blockchain data in the second data log file.

### Claim 11 (depends on 10)

The non-transitory, computer-readable storage medium of claim 10, wherein the first data log file is an append-only file storing the blockchain block data by appending the blockchain block data according to a chronological order of the blockchain block data generated by the blockchain network.

### Claim 12 (depends on 10)

The non-transitory, computer-readable storage medium of claim 10, wherein storing first blockchain data generated by a blockchain network in a first data log file stored in a first storage device comprises:
determining the first type of the first blockchain data; and
appending the first blockchain data in the first data log file stored in the first storage device according to the first type of the first blockchain data.

### Claim 13 (depends on 10)

The non-transitory, computer-readable storage medium of claim 10, wherein performing, by the storage system, the first rewritten placement on the first blockchain data in the first data log file comprises:
determining, by the storage system, a source storage location of the first data log file;
reading, by the storage system, the first data log file from the source storage location;
rewriting, by the storage system, the first data log file to a destination storage location; and
generating, by the storage system, a destination index log file that indicates the destination storage location corresponding to the first data log file.

### Claim 14 (depends on 10)

The non-transitory, computer-readable storage medium of claim 10, wherein the first information of the first data log file in the first storage device comprises one or more of:
an activeness, a size, a garbage ratio, or a fragmentation level of the first data log file.

### Claim 15

(canceled)

### Claim 16 (depends on 10)

The non-transitory, computer-readable storage medium of claim 10, wherein performing, by the storage system, the second rewritten placement on the second blockchain data in the second data log file comprises: performing, by the storage system, the state snapshot on the second blockchain data in the second data log file.

### Claim 17

(canceled)

### Claim 18

(canceled)

### Claim 19

A storage system comprising:
one or more processors; and
one or more computer-readable memories coupled to the one or more processors and having instructions stored thereon that are executable by the one or more processors to perform operations comprising:
storing, by the storage system, first blockchain data generated by a blockchain network in a first data log file stored in a first storage device in a multi-tier storage subsystem of the storage system that comprises a plurality of tiers of storage devices, wherein the first blockchain data are blockchain block data, and wherein the blockchain block data comprise at least one block in a blockchain and a hash value of a previous block in the blockchain;
generating, by the storage system, first index data indicating a first physical storage location of the first data log file stored in the first storage device;
storing, by the storage system, the first index data into a first index log file;
storing, by the storage system, second blockchain data generated by the blockchain network in a second data log file stored in a second storage device in the multi-tier storage subsystem of the storage system, wherein the second blockchain data are blockchain state data, and wherein the blockchain state data comprise a world state of the blockchain network;
generating, by the storage system, second index data indicating a second physical storage location of the second data log file stored in the second storage device;
storing, by the storage system, the second index data into a second index log file;
determining, by the storage system and from the first index log file, first information of the first data log file;
determining, by the storage system, that the first data log file needs a first rewritten placement based on the first information of the first data log file stored in the first storage device,
wherein determining that the first data log file needs the first rewritten placement based on the first information of the first data log file stored in the first storage device comprises:
determining, by the storage system, a first type of the first blockchain data in the first data log file; and
in response to determining the first type of the first blockchain data in the first data log file to be the blockchain block data, determining, by the storage system, the first rewritten placement to be one or more of tiering, compressing, erasure coding, or verification;
performing, by the storage system, the first rewritten placement on the first blockchain data in the first data log file;
determining, by the storage system and from the second index log file, second information of the second data log file;
determining, by the storage system, that the second data log file needs a second rewritten placement based on the second information of the second data log file stored in the second storage device, wherein determining that the second data log file needs the second rewritten placement based on the second information of the first data log file stored in the second storage device comprises:
determining, by the storage system, a second type of the second blockchain data in the second data log file; and
in response to determining the second type of the second blockchain data in the second data log file to be the blockchain state data, determining, by the storage system, that the second rewritten placement comprises state snapshot; and
performing, by the storage system, the second rewritten placement on the second blockchain data in the second data log file.

### Claim 20 (depends on 19)

The storage system of claim 19, wherein the first data log file is an append-only file storing the blockchain block data by appending the blockchain block data according to a chronological order of the blockchain block data generated by the blockchain network.

### Claim 21 (depends on 19)

The storage system of claim 19, wherein storing first blockchain data generated by a blockchain network in a first data log file stored in a first storage device comprises:
determining the first type of the first blockchain data; and
appending the first blockchain data in the first data log file stored in the first storage device according to the first type of the first blockchain data.

### Claim 22 (depends on 19)

The storage system of claim 19, wherein performing, by the storage system, the first rewritten placement on the first blockchain data in the first data log file comprises:
determining, by the storage system, a source storage location of the first data log file;
reading, by the storage system, the first data log file from the source storage location;
rewriting, by the storage system, the first data log file to a destination storage location; and generating, by the storage system, a destination index log file that indicates the destination storage location corresponding to the first data log file.

### Claim 23 (depends on 19)

The storage system of claim 19, wherein the first information of the first data log file in the first storage device comprises one or more of:
an activeness, a size, a garbage ratio, or a fragmentation level of the first data log file.

### Claim 24

(canceled)

### Claim 25 (depends on 19)

The storage system of claim 19, wherein performing, by the storage system, the second rewritten placement on the second blockchain data in the second data log file comprises: performing, by the storage system, the state snapshot on the second blockchain data in the second data log file.

### Claim 26

(canceled)

### Claim 27

(canceled)

### Claim 28

(canceled)

### Claim 29

(canceled)

### Claim 30 (depends on 4)

The computer-implemented method of claim 4, wherein the destination index log file comprises an indicator of the first data log file stored in the source storage location.
