| With the increasing popularity of digital cryptocurrencies such as Bitcoin,the core technology blockchain of the underlying Bitcoin system has gradually received widespread attention.Blockchain is an open distributed ledger with decentralization,immutable data,detrust,and collective maintenance.It can be used in a wide range of fields,especially the Hyperledger Fabric platform,a typical representative of the consortium blockchain,it has important application significance in scenarios where multiple parties participate and the parties need permission.However,compared to traditional database technology,Fabric's system performance has always been a major obstacle to its practical application.At present,there are many studies on Fabric system performance testing and optimization,but most of them are performed in a laboratory environment.There are few researchs in complex network environment and transaction conflict scenarios,and these conditions will have a great impact on system performance.Therefore,this thesis focuses on the performance test and optimization research of the Fabric system in a cross-data center network environment and with conflicting transactions.The main work is as follows:(1)In order to carry out performance testing on the consortium blockchain system,this thesis firstly designs and implements a consortium blockchain performance test platform,which solves the problems of incomplete indexes,inaccurate results,and unfriendly operation of the existing test platforms,and provides users with a web front-end interface to interact with the test platform,the system's test process can be completed automatically and the test results are returned to the front-end interface.The platform is divided into six modules: platform management module,Fabric network management module,transaction initiation module,transaction delay gathering module,transaction result statistics module,and network performance monitoring module.The design and implementation of each module are given separately.After experimental verification,the platform can effectively test the performance of Fabric system.(2)When analyzing the architecture of the existing Fabric system,it was found that conflicting transactions were judged to be invalid and system transactions were lately verified.These problems have a greater impact on system performance,especially in a cross-data center network environment.Therefore,this thesis proposes a multi-stage transaction conflict detection and early termination mechanism.Using the caching technology of the transaction read-write set,the transaction conflict detection is performed during the endorsement phase,orderring phase,and the verification phase of the transaction execution process.While a transaction confliction is detected,the conflicting transaction would be terminated in advance and the client is notified to reduce the execution process of the conflicting transaction in the system.Through the comparative analysis of the Fabric system before optimization and after optimization,the results show that the transaction conflict detection mechanism can effectively improve Fabric's system performance,and the improved performance indicators include system throughput,transaction delay,and resource usage. |