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.