Font Size: a A A

Research On Performance Optimization Of Raft Consensus Mechanism

Posted on:2024-02-04Degree:MasterType:Thesis
Country:ChinaCandidate:R W GuFull Text:PDF
GTID:2568307157480924Subject:Information and Communication Engineering
Abstract/Summary:PDF Full Text Request
Blockchains,which represent the new scientific and technological revolution.It has the characteristics of multi-party cooperation,tamper-proof,and decentralization,which make it has broad application prospects in the fields of finance,the Internet of Things,government certification,and intellectual property.Blockchains has strongly promoted the development of the digital economy.The distributed consensus mechanism is the core technology of the blockchains and directly determines the service quality of blockchains,which allows participants to reach an agreement under decentralized conditions.However,high cost,high communication complexity,and low TPS(Transactions Per Second)of the consensus mechanism hinder the application of the blockchains.This dissertation studies the availability and scalability problems that may be encountered in the actual deployment of the Raft consensus mechanism and explores effective solutions to accelerate the implementation of Raft.(1)The nodes lose packet will cause the network splitting and then affect the availability of the Raft,two solutions are proposed from the perspective of a single node and the overall cluster.Firstly,machine learning is used to predict the node failure time.Second,a leadership transfer algorithm is proposed to prevent the network splitting and make the faulty node return to the cluster.And the network splitting probability model calculates the network splitting time and then starts the leadership transfer at the appropriate time.Simultaneously,a leader selection algorithm based on the reputation model is designed to select the next leader by digitally evaluating the performance of nodes.Finally,experiments and analysis prove that the local weighted linear regression algorithm can accurately predict the node failure time,and the leadership transfer algorithm can prevent the network splitting in time and effectively improve the consensus efficiency.(2)In view of the problem that the Raft’s leader is under too much pressure,which creates a bandwidth bottleneck and then affects the scalability of the Raft in the actual deployment,firstly a Raft-S consensus mechanism combined with the sharding technology is proposed,which linearly increases the cluster capacity and TPS.Moreover,anonymous monitoring nodes are set inside the shard to prevent the byzantine node from becoming the leader.Second,the Raft-S consensus process is modeled as a single-queue and multi-server parallel queuing model based on the transaction status,and a real-time transaction allocation strategy is developed.Simultaneously,a mathematical method for calculating the Raft sharding consensus time is proposed,and its effectiveness is verified by experiments.Finally,it is theoretically demonstrated that Raft-S can linearly increase the cluster capacity and TPS.
Keywords/Search Tags:blockchains, the Raft consensus algorithm, machine learning, sharding, queue theory
PDF Full Text Request
Related items