Blockchain is a decentralized,tamper-resistant,traceable,and multi-party maintained distributed database.The consensus mechanism(or consensus protocol)is the core technology of blockchain,aiming to provide consistency and availability of the blockchain ledger for a blockchain system with a certain number of faulty or malicious nodes.Scholars’ research on consensus mechanisms mainly falls into three categories: Nakamoto-style ledger protocol,State Machine Replication protocol(SMR),and Hybrid Consensus Protocol.The main research focus of this thesis is reputation-based state machine replication protocol.State machine replication allows nodes to jointly maintain a consistent ledger even in the presence of Byzantine nodes.To resist and/or limit the impact of attacks initiated by Byzantine nodes,some proposals have combined reputation mechanisms with SMR protocols.Although reputation-based SMR protocols have excellent properties,existing research has not formally addressed the reputation mechanism of SMR protocols,including the types of behaviors that affect reputation,the security properties of the reputation mechanism,and the additional security properties required for SMR protocols to use the reputation mechanism.This thesis starts with the state machine replication consensus and various behaviors in it,and studies the reputation-based SMR protocol.Firstly,aiming at the benign behavior and misbehavior in the SMR protocol,the security attributes of the reputation mechanism are defined.Based on the formal definition of the reputation mechanism,a reputation mechanism based on the node behavior in the SMR protocol is designed,which can satisfy all security properties in its formal definition.Then,based on the formal definition of the reputation mechanism,the reputation-based SMR is formally defined,and a new property necessary to ensure the security of the reputation-based SMR protocol is determined,reputation consistency.At the same time,combining the reputation mechanism with the protocol Sync-Hot Stuff,a Reputation-based SMR protocol that can support forensic for most of the misbehavior in the SMR protocol is designed.Based on Reputation-based SMR,a committee election mechanism is introduced to improve its scalability and resistance to adaptive adversaries to gain a scalable Reputation-based SMR protocol;Finally,aiming at the practicability of the Reputation-based SMR protocol,based on the libp2 p peer-to-peer network development framework,the Sync-Hot Stuff protocol and the Reputation-based SMR protocol were implemented through the Go language.The corresponding performance was evaluated on a cloud instance.Through the way of attack injection,the ability of Reputation-based SMR protocol to be held accountable for misbehavior and its resistance to flash attacks were tested.Afterward,the Reputation-based SMR protocol was implemented on the blockchain digital identity management system,and the deployment of the protocol was completed. |