| Consensus algorithms are a core component of blockchain systems and serve to ensure that all participants in the network agree on a certain data state.Through consensus algorithms,blockchain networks are able to maintain the decentralized nature while guaranteeing data integrity,security and tamper resistance.Blockchain can be divided into three types based on node size and access principles: Public Chain,Private Chain,and Alliance Chain.Because of the decentralized characteristics of Public Chains and the high performance of Private Chain,Alliance Chain have broader application prospects and great commercial value.However,the current consensus algorithms such as PoW,PBFT and Raft have certain limitations in performance,security and public average.For example,PoW algorithm has the phenomenon of node power centralization,and due to the limitation of block generation time,PoW algorithm cannot meet the demand of high concurrency scenarios.The PBFT and Raft algorithms have significantly improved performance compared to the PoW algorithm,but the PBFT algorithm cannot be processed for Malicious nodes,which may cause Malicious nodes to continuously interfere with the consensus process,thus affecting the overall stability of the system,and due to the complexity of the PBFT algorithm,the performance degrades significantly when the node size exceeds a certain number.Although it is not easily affected in terms of performance,the Raft algorithm is not Byzantine fault-tolerant,and in a network with interests and competition like a coalition chain,malicious nodes or malicious attacks need to be considered.In order to make the Alliance Chain better for real-life applications,it is necessary to propose improvements for the consensus algorithm to meet the needs of different scenarios.Aiming at the limitations of current blockchain consensus algorithms,this paper investigates the theoretical basis,consensus process,and reputation mechanism of consensus algorithms in blockchain,and proposes a consensus algorithm PoRC(Proof of Review and Contribution)for Alliance Chain based on reputation review and proof of contribution.The main research work of this paper includes:(1)The reputation review mechanism is used to solve the problem that the consensus algorithm of the Alliance Chain cannot effectively deal with Malicious nodes.The core idea is that the initial reputation value is set for the node when it is connected to the Alliance Chain network,and the later behavior of the node is tracked and recorded.When the node has malicious behavior,its reputation value is reduced and when the reputation value is lower than the set threshold,the node cannot participate in the consensus process,and even if the node’s later behavior is more positive,the recovery of the reputation value will be very slow.By doing so,we can prevent Malicious nodes from continuously committing evil and affecting the consensus process,thus improving the fault tolerance of the system and guaranteeing the security of the system.(2)The proof-of-contribution model motivates the active behavior of nodes and promotes the active participation of nodes in the network in the consensus process;the arithmetic power model measures the arithmetic power according to the hardware configuration and network bandwidth of nodes,which is not used for solving problems,but only ensures that nodes have the ability to reach consensus or verify blocks and other behaviors,thus ensuring the lower limit of blockchain network performance.Finally,through dynamic weight adjustment and node election strategy,the reputation value,contribution and arithmetic power of nodes are considered to ensure that each node has a fair chance to compete in the consensus process.The various rules and restrictions in the election process aim to avoid centralization of power and unfair competition,and improve the security and fairness of the entire Alliance Chain network while ensuring performance.(3)This paper builds a Alliance Chain system that can carry out PoRC algorithm,so as to verify the feasibility of PoRC algorithm in real environment.Then the PoRC,PoW,PBFT and Raft algorithms are run through the system for experiments.Through experimental analysis,the PoRC algorithm proposed in this paper has better performance,security and fairness compared with other algorithms,and can meet the needs of practical applications. |