| Blockchain technology,with its decentralized,difficult to tamper with,and nonrepudiation characteristics,provides a new solution to the traditional trust authorization system in an untrustworthy environment,reliably and efficiently solves the problem of multi-party data interaction and application,and has now become a national strategic technology.As blockchain applications blossom everywhere and the scale of the blockchain continues to expand,its drawbacks also begin to show.Since blockchain requires each node to store a complete and identical ledger,the ever-expanding blockchain size increases the storage burden of nodes that have joined the blockchain system and makes the hardware resource threshold of nodes that want to join the blockchain network higher.This situation greatly affects the security and scalability of the blockchain system.Therefore,the waste of storage resources is one of the urgent problems of blockchain systems.In blockchain scenarios oriented to large business volume,long operation time,and a large number of nodes,there is the problem of high node storage pressure,and this thesis researches and designs a general blockchain storage optimization scheme for this problem,i.e.,node grouping,historical block data slicing,and cropping.The main contribution points of this thesis are as follows: 1)For the problem of high storage pressure in this scenario,the scheme designs data slicing rules according to the data volume of the blockchain and the underlying storage architecture of the blockchain,and the nodes cross-store data slicing and cropping regularly.Compared with the traditional DHT-based distributed storage scheme,the advantage of this thesis is that the node joining downtime and dynamic adjustment of the group will not cause a large amount of data migration.The node only needs to store the group state table in a very small space to obtain the data storage location of a whole blockchain,ensuring the efficiency of node data interaction.2)To address the problems of inconvenient block data management due to many nodes and the high cost of data interaction after the data cut in this scenario,this thesis designs node grouping.The scheme quantifies node hardware performance into multiple metrics,introduces inter-node Ping delay data for node grouping,and realizes dynamic adjustment of clusters.The multiple metrics are selected according to different scenario requirements to ensure the overall performance balance of the cluster,reduce the communication cost of nodes within the cluster,and achieve load balancing of node storage resources.3)After data cropping in this scenario,the solution needs to transform the nodes to join the downtime process and increase the cropped data between nodes.So this thesis designs the node interaction mechanism to ensure that the cropped data can be interacted with between nodes efficiently and reliably and to ensure the blockchain’s data integrity,security,and robustness.Finally,this thesis is based on the Hyperledger Fabric blockchain project implementation and experimental simulation.The experimental results show that,compared with the native Hyperledger Fabric blockchain project,the blockchain storage optimization scheme has a good compression effect on a node storage volume,with the lowest network-wide storage compression ratio reaching 0.648.In terms of compression test performance,the blockchain storage optimization scheme does not affect the transaction consensus efficiency and performance of the Hyperledger Fabric blockchain.In the case of the transaction failure rate of1%,10%,and the highest achievable TPS,the compression test data is approximately the same,and the performance is similar.The block synchronization efficiency is reduced in terms of block data synchronization,but it is evaluated that the reduced block synchronization efficiency will mitigate in other blockchain projects.Based on the above experimental results,it is comprehensively shown that the blockchain storage optimization scheme can effectively solve the problem of high redundancy storage of blockchain and waste of node storage resources to ensure the functional integrity of nodes and not affecting the system performance. |