As a decentralized system, blockchain allows different nodes to have divergent configuration items. However,this inevitably introduces more complex configuration handling logic and a higher likelihood of bugs. Thesebugs are called blockchain configuration bugs (BCBs). BCBs can have severe consequences, including nodecrashes and consensus failures, posing significant threats to the security and availability of the blockchainsystems. Unfortunately, existing blockchain testing tools fail to leverage unique characteristics of divergentblockchain configurations, making it difficult to conduct effective and efficient testing for BCBs.In this work, we present BCFuzzer, a framework to detect blockchain configuration bugs by divergentconfiguration fuzzing. First, BCFuzzer proposes a mutation rule model to identify and mutate the divergentconfiguration items, triggering various configuration handling scenarios. Second, BCFuzzer introduces amulti-node configuration scheduling method to allocate diverse configurations to individual nodes, therebyaccelerating the testing process. Finally, BCFuzzer designs two oracles based on runtime node behaviors tocapture the security and availability issues caused by BCBs. We implemented and evaluated BCFuzzer onfive widely-used commercial blockchain platforms: Go-Ethereum, Aptos, Sei, FISCO BCOS, and Chainmaker.Totally, BCFuzzer discovered 24 previously unknown BCBs and outperforms state-of-the-art tools.
To help users understand the repository structure of Chord, we provide the following explanation:
source_code: the source code of BCFuzzer in 4 blockchain systems
- Aptos
- chainmaker
- fisco
- geth
experiment_data: All experimental data is located in the experiment_data directory.
-
evaluation1
- Relevant configuration files of BCB triggered by BCFuzzer in five blockchain systems.
-
evaluation2
- Relevant data from the ablation experiment of MEI conducted by BCFuzzer in Experiment Two. Specifically, the test results of 1,000 test cases generated by BCFuzzer and
$BCFuzzer_{noMEI}$ on five blockchains.
- Relevant data from the ablation experiment of MEI conducted by BCFuzzer in Experiment Two. Specifically, the test results of 1,000 test cases generated by BCFuzzer and
-
evaluation3
- Relevant data from the ablation experiment of the Multi-node Configuration Scheduler conducted by BCFuzzer in Experiment Three. Specifically, the number of test cases generated and tested by BCFuzzer and $BCFuzzer_{noSche} $within 24 hours on five blockchains.
Setup Go-Ethereum network environment, can be found in https://geth.ethereum.org/docs/fundamentals/private-network
cd source_code/geth
python3 main.py
Setup Aptos network environment, can be found in https://aptos.dev/en/build/get-started
cd source_code/Aptos
python3 main.py
Setup fisco network environment, can be found in https://fisco-bcos-doc.readthedocs.io/zh-cn/latest/docs/quick_start/air_installation.html
cd source_code/fisco
python3 main.py
Setup ChainMaker network environment, can be found in https://docs.chainmaker.org.cn/v2.3.5/html/
cd source_code/fisco
python3 main.py