Log-Structured Storage for Blockchain Data

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed ledger systems, such as blockchain networks, face significant storage challenges due to the need for each node to store a complete copy of the blockchain, leading to high storage demands and costs as the system scales, necessitating more efficient and cost-effective storage solutions.

Innovation Solution

A log-structured storage system that uses a combination of data log files and index log files, employing a merge-tree architecture to optimize storage by converting random write operations into sequential append operations, delaying write flush operations, and supporting tiered storage, data compression, and erasure coding to reduce storage costs and improve performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If each node stores a complete copy of the blockchain, then data reliability and trustworthiness are improved, but storage cost and requirements increase significantly

Engineering Contradiction:
Improvedata reliabilityVSAvoidstorage cost
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The blockchain storage is segmented into two types of log files: data log files storing actual blockchain data and index log files storing mapping information. This segmentation allows nodes to store only necessary data while maintaining reliability through the index structure that enables efficient data retrieval and validation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The index log file acts as an intermediary between the data log files and retrieval operations. It stores mapping relationships (block number, offset, size) that enable nodes to locate and access specific data without storing the entire blockchain, thus reducing storage requirements while maintaining data accessibility and reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If random write operations are performed, then data can be written flexibly, but write amplification and storage performance deteriorate

Engineering Contradiction:
Improvewrite flexibilityVSAvoidwrite performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

Instead of allowing random writes directly to the data log files, the system inverts the approach by using sequential append-only writes. Data is written sequentially to data log files, and the index log file maintains the mapping relationships, thereby achieving both flexibility and high write performance through sequential operations.

Inventive Principle:
Principle #13The other way round (Inversion)

3Adaptability or versatility

If storage capacity is increased to accommodate scaling, then system scalability is improved, but storage cost increases

Engineering Contradiction:
Improvesystem scalabilityVSAvoidstorage cost
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The system stores only the necessary data in data log files and uses index log files to maintain mapping relationships. This partial storage approach allows the system to scale efficiently by storing only essential information while using the index structure to enable efficient data retrieval, thereby reducing overall storage costs while maintaining scalability.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11294881B2Log-structured storage systems
Publication Date: 2022.04.05 ANTCHAIN TECHNOLOGY PTE LTD
  • US11294881B2 patent drawing
  • US11294881B2 patent drawing
  • US11294881B2 patent drawing

AI summary

Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage devices, for data processing and storage. One of the methods includes receiving, by a storage system, a plurality of write requests for storing a respective plurality of blockchain data in the storage system. Each of the plurality of the blockchain data includes: a value of one or more of a block, a transaction, or a state of a blockchain network, and a key corresponding to the value. The storage system appends the plurality of the blockchain data to a data log file according to a chronological order of the plurality of the blockchain data, and refrains from sorting the plurality of the blockchain data in the data log file according to respective keys of values in the plurality of the blockchain data.