| In the blockchain system in the edge computing environment,sharding can bring higher scalability and improve system throughput.The current blockchain sharding scheme is a random sharding scheme represented by Elastico,Omni Ledger and Rapid Chain.Although it can guarantee the randomness of sharding,the location difference between nodes is ignored and nodes are randomly allocated to each committee,which may result in a large difference in the location of nodes among committees.As a result,the block delay of different committees is different,which affects the transaction throughput of blockchain.In terms of security,random sharding may cause malicious nodes to account for too high proportion in some committees,resulting in single sharding takeover attacks,thus reducing the security of blockchain.Aiming at the scalability and security problems existing in the random Sharding Scheme of blockchain,this paper proposes a Node Adjustment based Sharding Scheme(NASS).NASS Credibility and Validation Delay,Sharding Security Evaluation(SSE)algorithm and Node Credibility and Validation Delay(NC-VD),are proposed by NASS on the basis of random sharding scheme.algorithm.SSE algorithm mainly includes three parts.Firstly,nodes are randomly sampled according to the number of committees,and hypergeometric distribution of each committee is obtained.Secondly,the distribution function of malicious nodes in each committee is calculated.Finally,the distribution function of all committees is combined to calculate the failure probability and failure years of the whole sharding scheme.SSE algorithm can improve the accuracy of sharding security analysis by accurately calculating the probability distribution of malicious nodes of each committee.NC-VD algorithm is composed of two parts: node reliability and verification delay.In terms of node reliability,a subjective logic model is proposed to construct node reliability.In terms of validation delay,node location information is obtained in the edge computing environment and through the base station positioning,and based on this,block validation delay of nodes in each committee is calculated.Finally,nodes are transferred between committees to achieve Pareto optimal reliability and throughput,so that the overall node can be allocated in a better committee,thus improving the security and throughput of shardings.At the end of the period,the honesty of nodes is subjectively evaluated according to the verification process of node transactions,and an evaluation block is generated and added to the evaluation blockchain.In order to verify the effectiveness of the algorithm,the security evaluation algorithm SSE is compared with the Hoeffding boundary algorithm and the sharding security analysis algorithm in Rapid Chain,which proves that the SSE algorithm has higher accuracy and can better analyze the sharding security.At the same time,the security and throughput of NC-VD algorithm are analyzed,and compared with Omni Ledger,DBSS algorithm and ERCS algorithm.The NC-VD algorithm guarantees higher correct output rate with different malicious nodes,and has higher throughput and lower block delay with different number of nodes.The security and expansibility of NC-VD algorithm are proved.The results of comprehensive experiments show that NASS can better cope with the edge computing environment with malicious nodes and different node locations,and can better adapt to the actual needs. |