| Blockchain provides users with a tamper-proof,traceable distributed system through Byzantine fault-tolerant protocols and authenticated data structure.These features make the blockchain system gradually applied in scenarios such as logistics and certificate storage.As the core component of the blockchain system,the tamper-proof storage engine is mainly responsible for providing storage and verifiable query functions for on-chain data.In existing blockchain systems,the part is mainly persisted by authenticated data structure based on Merkle hash trees,such as Merkle Patricia Tree(MPT),and key-value databases based on Log Structured Merge Tree(LSM-Tree).Since the MPT and LSM-Tree structures both have the problems of read-write amplification and space amplification,that is,the amount of data read and written or stored on the actual disk is much greater than the amount of data required by the user request.This leads to the problem of low read and write performance and large storage overhead of the blockchain storage system in the scenario with high performance requirements.In view of the read-write amplification problem of the existing tamper-proof storage engine,this paper implements low storage overhead and read-write amplification on the one hand,and achieves the proof size of the near-constant level on the other hand by introducing multi-version verifiable LSM-Tree and authenticated data structure based on vector commitment.The main work content of this article is summarized as follows:(1)In this paper,by introducing key-value separation and bloom filters,an LSM-Tree storage structure that supports multi-version query and verification is designed.The authenticated data structure is constructed by modifying the state in each block,and proof-of-release is provided for the status of a particular account through a scheme that combines a Bloom filter with proof of non-existent proof.This solution can greatly reduce the amount of data stored in the LSM-Tree compared to MPT,thereby improving its performance.(2)By combining vector commitment with Merkle hash trees,this paper proposes an easy-to-read,verifiable structure BVM-Tree.This authenticated data structure constructs multiple fixed-size sub-Merkle hash trees by dividing the validation data by disk block size,and then uses vector promises to provide proof for the root hashes of each sub-Merkle hash tree.This scheme takes advantage of the fixed size of the vector commitment proof,combined with the partial persistence of the Merkle hash tree,to solve the problem that the original Merkle hash tree has,and the data size and I/O number of proofs increase with the increase of scale.(3)The verification structure and version query method proposed in this paper are implemented on the LevelDB storage engine,and the structure of the merged storage of version information and the separation of key and value is realized by modifying the merge logic and the read and write logic.At the same time,additional verifiable parts of the code are added to realize the construction,persistence and proof of the BVM verification structure.Finally,detailed experiments are performed on the above-mentioned implemented systems,including comparison experiments with existing schemes and verification experiments of the design of various parts of the system.Experimental results show that the system can complete the verification of multiple versions with good performance.In summary,this paper optimizes the problems of read-write amplification and large storage overhead of the tamper-proof storage engine in the blockchain system,and designs a multi-version verifiable LSM-Tree and a verifiable structure based on vector commitment and Merkle hash,realizing a high-performance tamper-proof storage engine. |