Blockchain Merkle State Tree Segmentation for Access Performance
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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
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.
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
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.
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.
Data Source
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.


