| Blockchain technology has become widely used in recent years due to its characteristics of decentralization,immutability,and traceability.Hyperledger Fabric is a widely used open-source consortium blockchain project that adopts an optimistic concurrency control strategy to design a transaction model of "execution-sorting-verification".This model has higher transaction concurrency and performance than conventional consortium blockchain.However,there is still a significant gap between the performance of Fabric and classic transaction processing platforms.Because nodes work redundantly in the sorting and verification stages,Fabric cannot effectively increase throughput by increasing node resources,which limits the application of Fabric in reality.Sharding technology can improve the horizontal scalability of Fabric and improve its performance by dividing multiple processing clusters to process Fabric transactions in parallel.However,existing Fabric sharding methods have smart contract hotspot access problems and transaction conflicts,which limit the effect of sharding technology on improving Fabric performance.1.To address these issues,this paper proposes an optimized method for Fabric sharding.First,we analyze the defects of existing sharding schemes and propose a fine-grained key-value state sharding method based on Fabric.This method divides the key-value state of the smart contract into different shards through sharding technology and builds a DAG global ledger structure by adding cross-shard sorting nodes to sort cross-shard transactions to achieve data consistency under key-value state sharding.We design an efficient cross-shard transaction verification mechanism to ensure the atomicity of cross-shard transactions by referring to two-stage submission.We also design a heuristic transaction proposal routing table to reduce the overhead of cross-shard transactions in the simulation execution stage and avoid the impact of high cross-shard probability on shard performance.Experimental results show that this sharding method effectively solves the problem of hotspot access and performance degradation under a high proportion of cross-shard transactions.2.We address the problem that fragmented Fabric transaction conflicts will be invalidated and waste system resources.We analyze the causes of Fabric concurrent transaction conflicts and the defects of the full cache mechanism to detect transaction conflicts in fragmented Fabric.We propose a method based on conflict frequency selection for a fragmented Fabric transaction conflict detection and processing method based on a persistent caching mechanism.This method screens key-value data with high conflict frequency by building a historical conflict table,caches unverified transactions involving these key-value data,and uses the cache to detect conflicts.Finally,the performance test experiment proves that this method can effectively alleviate the problem of transaction conflicts with less performance loss to the Fragmented Fabric. |