| Different from the Public Blockchain,the Permissioned Blockchain has a strict access mechanism,and all parties have a certain trust basis,and the crash-tolerant Raft consensus algorithm can be used to ensure the consistency between each replica.At present,over 60% of Permissioned Blockchain projects including Hyperledger Fabric and FISCO BCOS support Raft consensus.However,in traditional distributed systems,the Raft algorithm is usually only responsible for the consistency between a small number of replicas(three or five replicas).When Raft is applied to the Permissioned Blockchain scenario of full data replication,it needs to solve the communication overhead problem of too many copies and too large amount of transmitted block data.Specifically,in the Permissioned Blockchain,because of Raft’s single-leader replication model,on the one hand,the leader bears the vast majority of the communication load,and the leader can easily reach the upper limit of bandwidth,which seriously damages the scalability of the system.On the other hand,the communication load distribution of the cluster is extremely unbalanced,and the bandwidth of other nodes other than the leader is idle,and the performance of the entire system cannot be fully utilized.In addition,when the node fails,the Raft of the Permissioned Blockchain will discard some blocks that have not completed the consensus,which wastes bandwidth and storage resources to a certain extent.In response to the above problems,this paper proposes an optimized implementation of Draft,a scalable Raft for Permissioned Blockchain,which includes the following aspects:(1)A strategy for decoupling block consensus tasks is proposed.The high-load tasks undertaken by the leader in Raft are decomposed into sub-tasks and distributed to other nodes,which solves the bottleneck problem of leaders in Raft and improves the scalability of the Permissioned Blockchain.(2)A load balancing mechanism based on consistent hashing is designed.Through consistent hashing,the client’s transaction request is divided into attribution,which realizes the unique distribution and balanced distribution of the load,and makes full use of the bandwidth and performance of each node.(3)A block re-initiation mechanism that supports node failure is proposed.With periodic polling checks,the consensus process is restarted for forgotten blocks resulting from node failures to reduce storage and communication overhead.(4)Integrating the above technologies,a Permissioned Blockchain prototype system DF-Chain based on DRaft consensus is realized.Through comparative experiments with the Permissioned Blockchain system RF-Chain based on Raft consensus,it is verified that Draft is superior to the original Raft in performance and is more scalable.To sum up,this paper aims at the problems of insufficient scalability,load imbalance and waste of resources in Raft in the Permissioned Blockchain scenario,and optimizes and explores the decoupling of block consensus tasks,transaction load balancing and reinitiation of node failure blocks.The scalability,throughput performance and resource utilization of Raft in the Permissioned Blockchain.Finally,this paper integrates the above designs to realize a prototype system of scalable Permissioned Blockchain with Raft as the consensus algorithm,and the effectiveness of the optimization scheme proposed in this paper is verified through relevant experiments. |