arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.12563cs.SE
收藏

大规模智能合约的突变测试

Mutation testing of smart contracts at scale

Pieter Hartel, Richard Schumi

摘要:

由于智能合约的不可变性,因此对其进行彻底测试至关重要。即使是智能合约中的小错误也可能导致巨大的金钱损失。然而,测试是不够的;确保测试的质量和完整性也很重要。已经有几种方法通过突变测试来应对这一挑战,但它们的有效性值得怀疑,因为它们只考虑了小的合同样本。因此,我们评估了大规模智能合约突变测试的质量。我们选择了现有的(智能合约特定的)突变算子中最有前途的,分析了它们在可重复性方面的有效性,并强调了可以注入突变的严重漏洞。此外,我们通过引入能够检测气体消耗中的偏差的新的杀死条件来改进现有的变异方法,即,执行交易所需的货币价值。本文在https://github.com/pieterhartel/Mutation-at-scale上有一个复制包

英文摘要:

It is crucial that smart contracts are tested thoroughly due to their immutable nature. Even small bugs in smart contracts can lead to huge monetary losses. However, testing is not enough; it is also important to ensure the quality and completeness of the tests. There are already several approaches that tackle this challenge with mutation testing, but their effectiveness is questionable since they only considered small contract samples. Hence, we evaluate the quality of smart contract mutation testing at scale. We choose the most promising of the existing (smart contract specific) mutation operators, analyse their effectiveness in terms of killability and highlight severe vulnerabilities that can be injected with the mutations. Moreover, we improve the existing mutation methods by introducing a novel killing condition that is able to detect a deviation in the gas consumption, i.e., in the monetary value that is required to perform transactions. This paper has a replication package at https://github.com/pieterhartel/Mutation-at-scale

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑