Merkle state machine
As a key component of blockchain data structure, Merkle State Machine (MSM) enables orderly stor- age and fast verification of data through Merkle trees. MSM can maintain multiple sets of stor- age systems to meet the needs of different applica- tion scenarios. This section will introduce how to employ MSM to maintain three sets of storage sys- tems: address account system, contract account sys- tem and off-chain data, and combine with Bloom filters to achieve efficient data retrieval.
Address account system: the Merkle State Ma- chine maintains the address account system, which enables efficient management of user assets and transaction records. The Merkle State Machine gen- erates a unique hash value for each address account and stores it in the Merkle tree. This approach ensures data integrity and consistency, while im- proving the efficiency of data validation and query.
Contract account system: the Merkle State Machine can also be used to maintain the account system of a smart contract. By generating a unique hash value for each contract account and storing it in a Merkle tree, efficient management of the state, variables, and function results of smart contracts can be achieved. Also, this approach helps to re- duce the pressure of data storage and computation during the execution of smart contracts [4].
Off-chain data: the Merkle State Machine can also be used to maintain a storage system for off- chain data. By storing the hash value or Merkle tree root node of off-chain data on the blockchain, effec- tive verification of off-chain data can be achieved. This approach not only reduces the storage pres- sure of the blockchain network, but also ensures the security and integrity of the off-chain data.
To achieve fast retrieval of these three storage systems, the Bloom Filter technique can be used. Bloom filter is a probabilistic data structure that can efficiently detect whether an element is in a set or not. By applying Bloom Filter to Merkle State Machine, efficient retrieval of data such as ad- dress variables of contracts on the chain, function results, address funds and off-chain operation call records can be achieved. Using the Merkle State Machine combined with Bloom filter technology, efficient management and retrieval of multiple stor- age systems can be realized, providing powerful data support for the development and innovation of blockchain technology.
Last updated