| Practical Byzantine Fault Tolerance(PBFT)is a consistency algorithm based on Byzantine fault tolerance,which is widely used in Financial Alliance blockchain.However,the algorithm has some problems,such as insufficient dynamics,lack of reward and punishment mechanism,balance between security and efficiency,and its performance is difficult to meet the needs of financial business scenarios.In order to solve this problem,inspired by Ethereum built-in contract,In the Financial Alliance blockchain,the node management and parameter configuration management functions of PBFT are implemented based on the built-in contract framework,the impact of node size on the complexity of consensus algorithm is decoupled,and the consensus algorithm adapted to the needs of financial business is realized.This paper mainly studies the implementation principle and process of PBFT,and realizes the practical Byzantine fault-tolerant consensus algorithm of dynamic variable model through the built-in contract in the Financial Alliance blockchain system.The main contents are as follows:1、 A built-in contract framework for Financial Alliance blockchain system is proposed.Implement the built-in contract framework in the blockchain,register the fixed address of the built-in contract,and realize the basic functional framework such as reading and storage functions and identity management through the built-in contract.2、 Design and implement the PBFT consensus algorithm management function of the built-in contract of the Financial Alliance blockchain,realize the basic parameter configuration and node management function of the built-in contract of the consensus algorithm,and decouple the impact of node size on the complexity of the consensus algorithm.At the same time,the PBFT message forwarding process and structure package are improved to reduce the number of communications and the size of communication packages,and the functions of supervision and privacy protection are realized in the alliance blockchain.3、 Design a consensus algorithm call parameter model to meet the needs of financial business.On the premise of blockchain system security,the PBFT consensus algorithm model of Financial Alliance blockchain is implemented in different financial business scenarios.Finally,through experiments,the improved PBFT consensus algorithm has obvious advantages over PBFT consensus algorithm in terms of throughput,delay and fault tolerance. |