面向Solidity智能合约的测试用例自动生成与模糊测试框架研究  

Research on Automatic Test Case Generation and Fuzzy Testing Framework for Solidity Smart Contracts

在线阅读下载全文

作  者:相里朋 包小敏 莫泳聪 周永长 XIANG Lipeng;BAO Xiaomin;MO Yongcong;ZHOU Yongchang(CEPREI,Guangzhou 511370,China;Xi’an CEPREI Industrial Technology Research Institute Co.,Ltd.,Xi’an 710300,China;Chongqing CEPREI Industrial Technology Research Institute Co.,Ltd.,Chongqing 401332,China)

机构地区:[1]工业和信息化部电子第五研究所,广东广州511370 [2]西安赛宝工业技术研究院有限公司,陕西西安710300 [3]重庆赛宝工业技术研究院有限公司,重庆401332

出  处:《电子产品可靠性与环境试验》2024年第6期1-7,共7页Electronic Product Reliability and Environmental Testing

基  金:陕西省重点研发计划项目(2023-YBGY-216);国家重点研发计划项目(2022YFB2702600)资助。

摘  要:智能合约是一种通过计算机指令实现传统合约自动化的程序,其在部署后不可修改,因此在部署前对其行为和约束条件进行全面测试至关重要。然而,现有测试方法难以适应复杂场景,或仅聚焦于发现导致合约崩溃的输入。为此,提出了一款名为C-Solidity的工具,这是一种面向Solidity智能合约的自动化测试用例生成与模糊测试框架。C-Solidity集成了多种元启发式搜索算法,包括随机搜索和多种进化算法(如NSGA-II、MOSA和DynaMOSA),以提高测试覆盖率和效率。通过初步实证研究,验证了C-Solidity在测试Solidity智能合约中的有效性与优势。Smart contracts are programs that automate traditional contracts through computer instructions,and cannot be modified after deployment.Therefore,it is crucial to conduct comprehensive testing of their behavior and constraints before deployment.However,existing testing methods are difficult to adapt to complex scenarios or only focus on discovering inputs that cause contract crashes.To this end,a tool called C-Solidity is proposed,which is an automated test case generation and fuzz testing framework for Solidity smart contracts.C-Solidity integrates multiple metaheuristic search algorithms,including random search and various evolutionary algorithms such as NSGA-II,MOSA and DynaMOSA,so that the test coverage and efficiency can be improved.Through preliminary empirical research,the effectiveness and advantages of C-Solidity in testing Solidity smart contracts have been verified.

关 键 词:智能合约 区块链 基于搜索的软件测试 测试用例生成 模糊测试 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象