| The emergence of Bitcoin has brought widespread attention to blockchain.which combines cryptographic principles,distributed data structures,P2 P and other computer technologies to ensure data security.At present,there are still many problems with blockchain,including system throughput,long transaction confirmation delay,and increasing resource cost of consensus.To solve these problems,this paper studies the blockchain sharding problem,and discusses it from two aspects: blockchain network sharding and intra-shard consensus.The main research contents of this paper are as follows.(1)To address the problem of lack of randomness and efficiency of network slicing in blockchain slicing scheme,a node random assignment algorithm is proposed on the basis of consistent hashing algorithm.Among them,nodes wanting to carry out network slicing must first pay a part of the deposit as an access threshold,and once a node is found to have evil behavior,the deposit can be deducted from the node to increase the cost of evil of the node.The node allocation algorithm can quickly map nodes to different slices and keep the balance of nodes among the slices.Achieve unpredictability and randomness for node assignment.Experiments show that the improved consistent hashing algorithm can improve the efficiency of node assignment while satisfying the randomness of network slicing when performing node assignment.(2)To address the problem of high communication complexity of traditional Byzantine consensus algorithms,which is not conducive to deploying large-scale blockchain sharding systems,we propose a Byzantine fault-tolerant consensus algorithm based on recommendation trust model(R-PBFT).To solve the problems of high communication overhead,simple node selection,and lack of punishment mechanism for malicious nodes in Byzantine fault-tolerant algorithms,we introduce a recommendation trust model in P2 P network,which calculates the global trust value of each node according to their behavior in the consensus phase,and uses a node selection mechanism,where nodes enter the consensus group and the normal group in order of their global trust value from high to low,reducing the number of nodes participating in consensus.Experiments show that R-PBFT algorithm has lower network overhead and higher fault tolerance than PBFT algorithm. |