| Consortium blockchain,also known as Alliance blockchain,is a way of applying blockchain technology that is only open to specific groups and limited third parties,unlike public chains that are open to everyone.The bookkeeping process of a consortium blockchain is jointly determined by multiple internal nodes,which can be seen as multiple centers,forming a multi-center structure blockchain.Consortium blockchains have better practical applicability and are more easily applied to collaboration among organizations,thus gaining more and more support from enterprises and governments.Therefore,research on consensus mechanisms and system optimization for consortium blockchains is necessary in the field of blockchain technology.The consensus mechanism of blockchain differs from traditional consensus protocols in distributed systems,as it requires Byzantine fault tolerance to ensure consistency in the face of Byzantine failures.This thesis analyzes the shortcomings of the existing Byzantine fault tolerance consensus mechanism PBFT and its limitations in consortium blockchains.Furthermore,this thesis designs and implements an improved scalable hierarchical Byzantine fault tolerance consensus mechanism,SHBFT(Scalable Hierarchical Byzantine Fault Tolerance),and optimizes it in multiple aspects to make SHBFT advantageous for consortium blockchains.In response to the issues of the PBFT being unable to adapt to P2 P networks,having arbitrary selection of master nodes,difficulties in adding nodes dynamically,and a drastic decrease in consensus efficiency with multiple nodes,a hierarchical consensus network structure has been designed to increase scalability and improve consensus efficiency.Simulation results show that the SHBFT consensus mechanism improves data throughput while supporting more nodes compared to PBFT,effectively reducing node communication frequency and consensus latency.Facing the problems of information asymmetry,data silos,and lack of trust in the steel supply chain,and in response to the demand for traceability of steel products,this thesis utilizes the existing Hyperledger Fabric consortium blockchain framework and applies the proposed SHBFT consensus mechanism to build a steel supply chain traceability platform based on consortium blockchain and SHBFT.The platform focuses on providing services to supply chain members such as steel suppliers,steel structure manufacturers,transportation companies,and engineering companies,aiming to enhance the security,transparency,and efficiency of the entire supply chain and achieve reliable traceability of steel structures.After practical applications of the existing consortium blockchain system revealed its limitations,and in consideration of overall technical requirements,this thesis proposes an optimized consortium blockchain prototype system named OCB(Optimized Consortium Blockchain).The system is improved on the basis of a consortium blockchain system with capabilities of immutability,decentralization,and self-control,and applies the SHBFT consensus mechanism at the consensus layer to ensure that all nodes participating in the consortium blockchain jointly maintain transaction requests and data,ensuring participation and efficiency.In addition,this thesis proposes a network node clustering method based on K-medoids,analyzes the characteristics of K-medoids algorithm and its application in OCB,and utilizes its iterative refinement feature to cluster and group network nodes in the system,helping the SHBFT consensus mechanism in the consensus layer to achieve more efficient operation and further improve the performance of OCB. |