Gas-centered mutation testing of Ethereum Smart Contracts

Pedro Delgado-Perez, Ignacio Melendez-Lapi, Juan Boubeta-Puig

JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS(2024)

引用 0|浏览0
暂无评分
摘要
Smart contracts (SC) are programs embodying certain business logic stored on a blockchain network like Ethereum. The execution of transactions on SC has a cost, measured in gas units, that depends on the low-level operations performed. Therefore, a poor choice of high-level language constructs could lead to overcharging users for their transactions. Thus, a testing process focused on possible deviations of the gas used in diverse scenarios could provide substantial global savings. This paper presents a gas-centered mutation testing approach for taking care of the gas consumed by Solidity SCs. This approach can be useful to improve the test quality to detect gas-related problems, reason about performance issues that only manifest in certain situations, and identify alternative more optimal implementations. We define and implement several mutation operators specifically designed to perturb gas consumption while preserving contract semantics in general. Our experiments using several real-world SCs show the feasibility of the technique, with some mutants reproducing meaningful differences in the consumption and exposing some gas limits not tight enough in historic transactions. Therefore, our approach is shown to be a good ally to prevent the appearance of gas-related issues and lays the groundwork for researchers seeking to improve performance testing practices. This paper proposes a gas-centered mutation testing approach for taking care of the gas consumed by Ethereum Smart Contracts (ESC). We define several mutation operators specifically designed to perturb gas consumption of ESC written in Solidity while preserving contract semantics in general. Our experiments, applying an implementation of these operators to real-world ESC, show the feasibility of the approach, with some mutants reproducing meaningful differences in the consumption and exposing some gas limits not tight enough in historic transactions. image
更多
查看译文
关键词
blockchain,Ethereum,gas consumption,mutation testing,smart contract
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要