| Blockchain is an electronic ledger based on decentralized and distributed database technology,which has the characteristics of nontampering,traceability,and decentralization.The consensus algorithm is an update protocol in the blockchain.Its purpose is to achieve the consistency of the data of each node in a decentralized and unstable environment.Its performance will directly affect the efficiency of the blockchain system.However,in the consensus process of general consensus algorithms,each participant needs to broadcast messages to the entire network multiple times,resulting in high time complexity.In addition,as the number of nodes increases,the consensus efficiency gradually declines,lacking horizontal expansion capabilities.Moreover,in an asynchronous network environment with high latency,it is difficult for most current consensus algorithms to perform normal consensus work.Aiming at the problems faced by the above-mentioned blockchain consensus algorithm,this paper conducts research on improving the horizontal expansion capability of the consensus algorithm and the usability of the asynchronous environment,and proposes an asynchronous consensus algorithm DS-Dumbo based on a dynamic sharding strategy.The main research content of this paper is as follows:Firstly,in order to solve the problem of high communication cost,low consensus efficiency and lack of horizontal expansion ability of the traditional consensus algorithm in a large network with a large number of nodes,a node weight scoring strategy in an asynchronous environment is designed,and a node asynchronous model is constructed based on this strategy.The dynamic sharding method reduces cross-shard transactions through concurrent consensus work between shards and the design of intelligent placement strategies for transactions,so as to improve the throughput of the consensus algorithm and reduce the consensus delay;then,it is difficult for the traditional consensus algorithm to operate on a pure asynchronous network.Consensus work in the environment,lack of usability in asynchronous environment,on the basis of the existing sharding algorithm work,through the application of the currently excellent DumboBFT asynchronous consensus algorithm in the shard,and its sharding adaptability Optimization,so that the entire improved consensus algorithm can achieve consensus in an efficient asynchronous environment.Based on the proposed improved consensus algorithm,this paper designs and implements a block chain asynchronous consensus module prototype system based on dynamic sharding strategy,analyzes the requirements of this module,and completes the communication submodule,transaction pre-processing sub-module,and sub-module.The film module,the consensus sub-module,and a visualization system for the consensus module were built.Finally,several functional interfaces of the system were displayed to introduce the logical function correctness of the consensus module and the completeness of the system. |