Data Flow Reduction Based Test Case Generation for Smart Contracts
With the widespread use of smart contracts, security incidents caused by improper programming have drawn increasing attention. Data flow correctness is a fundamental and vital requirement for smart contracts. Although test cases generated by existing approaches for data flow testing of smart contracts can achieve certain coverage, not all def-use (definition-use) pairs are covered, which may result in some errors not being detected. To further improve the adequacy and efficiency of testing, we present an approach named TCG-Re (Test Case Generation Combined with Data Flow Reduction) to generate test cases for data flow testing of smart contracts. Data flow reduction is performed to reduce redundant def-use pairs and obtain the final test requirements in a smart contract. The test case generation process is optimized to improve the coverage of the generated test cases for the def-use pairs. We collect 30 smart contracts of different scales to perform experimental evaluation. The result shows that, compared with other existing approaches, TCG-Re can not only achieve full coverage for most contracts, but also be more efficient. In addition, TCG-Re is also effective for discovering several types of errors in smart contracts.
Thu 8 DecDisplayed time zone: Osaka, Sapporo, Tokyo change
13:00 - 14:30 | Smart ContractTechnical Track / ERA - Early Research Achievements at Room2 Chair(s): Yoshiki Higo Osaka University | ||
13:00 20mPaper | Grey-box Fuzzing Based on Execution Feedback for EOSIO Smart Contracts Technical Track Wenyin Li Hebei university, Meng Wang Hebei university, Bin Yu Xidian University, Yuhang Shi Xidian Univeristy, Mingxin Fu Xidian Univeristy, You Shao Xidian Univeristy | ||
13:20 15mPaper | SCAR: Smart Contract Alarm Ranking} ERA - Early Research Achievements | ||
13:35 20mPaper | Data Flow Reduction Based Test Case Generation for Smart Contracts Technical Track Shunhui Ji Hohai University, Shaoqing Zhu Hohai University, Pengcheng Zhang Hohai University, Hai Dong RMIT University | ||
13:55 20mPaper | A Reference Architecture for Blockchain-based Traceability Systems Using Domain-Driven Design and Microservices Technical Track Yanze Wang Nanjing University, Shanshan Li Nanjing University, Huikun Liu Nanjing University, He Zhang Nanjing University, Bo Pan Huawei Technologies Co., Ltd. |