Blockchain Merkle State Tree Segmentation for Access Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing Merkle state tree in blockchain systems faces performance issues due to data redundancy and increased access time as historical data accumulates, leading to decreased Transactions Per Second (TPS) indicators, primarily because of node reuse and mixed state data among historical and latest account states.

Innovation Solution

Implementing a dual tree structure comprising a current Merkle state tree for the latest account states and a historical Merkle state tree for historical account states, where the current tree only maintains the latest states and the historical tree maintains past states, allowing for efficient data migration and storage, and using B+ trees for current and LSM trees for historical data structures to optimize performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a single Merkle state tree is used to store both historical and latest account states, then storage space is saved through node reuse, but access performance deteriorates due to increased traversal time through historical data

Engineering Contradiction:
Improvestorage spaceVSAvoidaccess time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent divides the single Merkle state tree into two separate trees: a historical Merkle state tree for storing historical account states and a current Merkle state tree for storing latest account states. This segmentation allows the system to retrieve latest states quickly from the current tree without traversing historical data, while still maintaining storage efficiency through node reuse between the two trees.

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If all account states (historical and latest) are stored in the same Merkle state tree, then data redundancy is reduced, but Transactions Per Second (TPS) performance deteriorates due to mixed state data

Engineering Contradiction:
Improvedata redundancyVSAvoidTPS
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments the account state storage into two distinct Merkle state trees: one for historical states and one for current states. This allows the system to quickly access latest account states for transaction processing without being hindered by historical data traversal, thereby improving TPS while maintaining data redundancy efficiency through shared node structures.

Inventive Principle:
Principle #1Segmentation

3Reliability

If historical data is accumulated in the Merkle state tree, then completeness of blockchain state is improved, but access performance deteriorates due to increased data volume

Engineering Contradiction:
Improvestate completenessVSAvoidaccess speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent creates a segmented structure with a historical Merkle state tree preserving complete blockchain state history and a current Merkle state tree providing fast access to latest states. This segmentation maintains state completeness for reliability while enabling high-speed access to current account states by isolating them from historical data volume.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The current Merkle state tree acts as an intermediary layer between the historical Merkle state tree and the transaction processing system. It provides a optimized interface for quick access to latest account states without requiring traversal through the complete historical data stored in the historical tree, thus maintaining both completeness and speed.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11113272B2Method and apparatus for storing blockchain state data and electronic device
Publication Date: 2021.09.07 ADVANCED NEW TECHNOLOGIES CO LTD
  • US11113272B2 patent drawing
  • US11113272B2 patent drawing
  • US11113272B2 patent drawing

AI summary

A method of storing blockchain state data, including: after execution of a transaction in a target block is completed, based on a latest account state of a target account related to the transaction in the target block after update, generating updated data nodes corresponding to the current Merkle state tree of the target block and, based on generated historical data nodes and data nodes other than the reused data nodes corresponding to the target account on the historical Merkle state tree of the previous block of the target block, creating the historical Merkle state tree for the target block.