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

以太坊智能合约中Bug的框架和DataSet

A Framework and DataSet for Bugs in Ethereum Smart Contracts

Pengcheng Zhang, Feng Xiao, Xiapu Luo

摘要:

以太坊是支持智能合约的最大区块链平台。用户通过将智能合约的字节码发布到区块链来部署智能合约。由于区块链中的数据无法修改,即使这些合约包含错误,也无法使用代码更新来修补已部署的智能合约。此外,目前既没有针对以太坊智能合约bug的全面分类框架,也没有检测智能合约bug的详细标准,这使得开发人员难以充分了解bug的负面影响并设计新的方法来检测bug。在本文中,为了填补这一空白,我们首先从多个来源收集尽可能多的智能合约错误,并通过扩展IEEE软件异常标准分类将这些错误分为9类。然后,我们设计了检测每种bug的标准,并构建了一个涵盖所有bug的智能合约数据集。通过我们的框架和数据集,开发人员可以学习智能合约的错误,并开发新的工具来检测和定位智能合约中的错误。此外,我们使用我们的数据集评估了最先进的智能合约分析工具,并获得了一些有趣的发现:1)Mythril,Slither和Remix是最有价值的分析工具组合。2)还有10种bug是任何分析工具都无法检测到的。

英文摘要:

Ethereum is the largest blockchain platform that supports smart contracts. Users deploy smart contracts by publishing the smart contract's bytecode to the blockchain. Since the data in the blockchain cannot be modified, even if these contracts contain bugs, it is not possible to patch deployed smart contracts with code updates. Moreover, there is currently neither a comprehensive classification framework for Ethereum smart contract bugs, nor detailed criteria for detecting bugs in smart contracts, making it difficult for developers to fully understand the negative effects of bugs and design new approaches to detect bugs. In this paper, to fill the gap, we first collect as many smart contract bugs as possible from multiple sources and divide these bugs into 9 categories by extending the IEEE Standard Classification for Software Anomalies. Then, we design the criteria for detecting each kind of bugs, and construct a dataset of smart contracts covering all kinds of bugs. With our framework and dataset, developers can learn smart contract bugs and develop new tools to detect and locate bugs in smart contracts. Moreover, we evaluate the state-of-the-art tools for smart contract analysis with our dataset and obtain some interesting findings: 1) Mythril, Slither and Remix are the most worthwhile combination of analysis tools. 2) There are still 10 kinds of bugs that cannot be detected by any analysis tool.

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

↑