| Blockchain is an integrated innovation of cryptography,P2 P networking,distributed consensus,and timestamp technologies,which enables functions such as consistent data storage,tamper resistance,and prevention of repudiation.Blockchain is a distributed ledger technology,and its decentralized,immutable,and traceable characteristics are guaranteed by the consistency of data in the network,which is achieved through consensus algorithms,reliable data transmission,high redundancy storage,and cryptographic technologies.The decentralized nature of blockchain gives it broad application prospects.However,in blockchain,each node needs to synchronize the latest ledger,which brings huge storage pressure to the nodes and the blockchain network.The storage scalability issue has become a critical challenge to unlocking the potential of blockchain technology.In Distributed Hash Table network,data is scattered and stored across multiple nodes.If a small number of nodes have an excessively high load,performance bottlenecks may occur.Balancing the load of nodes can improve the fault tolerance and availability of the system.Aiming at the storage expansion problem of the current blockchain,this paper proposes a solution to separate the on-chain data to off-chain storage.Reduce the storage pressure of blockchain nodes and systems,avoid linear data growth,and design a data query scheme on this basis to improve data retrieval speed.The main research content and innovative aspects are as follows:(1)To avoid uneven distribution of data in a DHT network,which could lead to high loads on some nodes and affect the performance of the blockchain system,certain measures can be taken.Consistent hashing algorithm is a commonly used data distribution algorithm.Based on the analysis of this algorithm,a method has been designed to dynamically adjust the number of virtual nodes,and the process of dynamically adjusting the number of virtual nodes is elaborated in detail.(2)After analyzing the problem of high redundancy storage of on-chain data in blockchain and the limited resources of devices joining the blockchain network,a solution is proposed to separate on-chain data from off-chain storage.Resource-limited nodes in the blockchain network can construct a DHT network,and frequently used and accessed data can be stored in the DHT through a mechanism of blockchain heat identification.Data that is not frequently accessed or used can be moved to IPFS off-chain storage,improving the storage scalability of the blockchain system.(3)When resource-limited node needs to query data that is not stored,it needs to rely on a full node or off-chain storage system to retrieve the data and perform authenticity and integrity verification on the returned data.Based on research and analysis of Merkle trees,an improved method for constructing Merkle trees is proposed.Transaction information is sorted,and a variant Merkle tree is constructed by introducing key fields,which can provide proof of non-existence of transactions and improve data retrieval speed. |