论文标题

在存在错误的智能合约的情况下,使用故障注射来评估区块链系统

Using Fault Injection to Assess Blockchain Systems in Presence of Faulty Smart Contracts

论文作者

Hajdu, Ákos, Ivaki, Naghmeh, Kocsis, Imre, Klenik, Attila, Gönczy, László, Laranjeiro, Nuno, Madeira, Henrique, Pataricza, András

论文摘要

区块链由于承诺在非常不同的领域(例如零售,供应链,医疗保健)的承诺而变得特别受欢迎。区块链系统依赖于复杂的中间件,例如以太坊或超级织物,这些中间货币允许运行智能合约,这些合同在合作应用程序中指定了业务逻辑。这些合同中软件缺陷或故障的存在显然是导致故障的原因,包括严重的安全问题。在本文中,我们使用已实施的故障注入(SWIFI)技术来评估在存在故障智能合约的情况下的权限区块链系统的行为。我们模仿一般软件故障(例如,丢失的可变初始化)以及智能合约代码中特定区块链特定的软件故障(例如,缺失的交易陈述),以观察对整体系统可靠性的影响(即可靠性和完整性)。我们还研究了正式验证(即通过Solc-Verify进行)和运行时保护(例如,使用断言语句)机制在检测注射断层时的有效性。结果表明,正式验证以及其他运行时保护必须补充内置平台检查,以确保区块链系统和应用程序的适当可靠性。本文介绍的工作使智能合同开发人员能够意识到智能合约中可能的错误,并了解其存在的影响。它还为中间件开发人员提供了有价值的信息,以改善其系统的行为(例如,整体容忍度)。

Blockchain has become particularly popular due to its promise to support business-critical services in very different domains (e.g., retail, supply chains, healthcare). Blockchain systems rely on complex middleware, like Ethereum or Hyperledger Fabric, that allow running smart contracts, which specify business logic in cooperative applications. The presence of software defects or faults in these contracts has notably been the cause of failures, including severe security problems. In this paper, we use a software implemented fault injection (SWIFI) technique to assess the behavior of permissioned blockchain systems in the presence of faulty smart contracts. We emulate the occurrence of general software faults (e.g., missing variable initialization) and also blockchain-specific software faults (e.g., missing require statement on transaction sender) in smart contracts code to observe the impact on the overall system dependability (i.e., reliability and integrity). We also study the effectiveness of formal verification (i.e., done by solc-verify) and runtime protections (e.g., using the assert statement) mechanisms in detection of injected faults. Results indicate that formal verification as well as additional runtime protections have to complement built-in platform checks to guarantee the proper dependability of blockchain systems and applications. The work presented in this paper allows smart contract developers to become aware of possible faults in smart contracts and to understand the impact of their presence. It also provides valuable information for middleware developers to improve the behavior (e.g., overall fault tolerance) of their systems.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源