| Blockchain gains a lot of attention in recent years.It provides the necessary trusted environment for smart contracts,making smart contracts widely used on blockchain platforms.Ethereum is currently the most well-established smart contract support platform.Ethereum supports private blockchains,but its performance is affected by the blockchain configuration and number of nodes.Thus performance evaluation is required.Ethereum needs massive calculations and network resources to reach consensus,causing instability.Meanwhile,blockchains are often deployed in unstable environments in which blockchains may face unpredictable faults.Therefore,for adequate performance and stability testing,private Ethereum blockchain should be tested in unstable environment.In this paper,we conducted in-depth research on the performance of Ethereum.By analyzing Ethereum's Po W consensus protocol and Gas mechanism,we finally recognized two performance impact factors for private Ethereum blockchain: Difficulty,Gas Limit.Also,we introduce fault injection technology.By analyzing the common faults of distributed systems along with blockchain characteristics,we propose four types of faults on private Ethereum blockchain: application,consensus,smart contracts,network.Afterwards,we divide each failure into three levels according to the severity of the fault.Accordingly,we implement a performance testing System for private Ethereum blockchain via fault injection.The system is divided into two modules according to system features,test management module and test execution module.The test management module implements configuration management and result generation.This module is implemented with a Django server,Mongo DB as a database.Python is used to process the data results.The test execution module implements test chain construction,performance testing and fault injection.Docker technology is used to achieve fully automatic and rapid blockchain construction.This module is basically implemented by Node JS,which has good support for asynchronous operations.Fault injection is implemented by thread communication and operating Docker containers.The system can perform rapid and effective performance tests on private Ethereum blockchain and evaluate the performance of Ethereum adequately.Through fault injection technology,real-world faults can be simulated in the test environment.Thus test results are closer to real scenarios.We design and perform two sets of experiments,including impact factor verification experiments and fault injection verification experiments.In the impact factor verification experiment,with the change of the factor,the throughput decreased and the latency increased significantly.In the fault injection verification experiment,the performance of Ethereum showed a downward trend during fault injection.The experimental results showed that the system can reflect the performance and stability of Ethereum under fault injection through performance indicators. |