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.
翻译:封锁链因其承诺支持不同领域(如零售、供应链、医疗保健等)的对商业至关重要的服务而变得特别受欢迎。 封锁链系统依靠智能合同中复杂的中间软件(如Etheum或Hyperledger Fabric),这些软件可以运行智能合同,具体规定合作应用中的商业逻辑。这些合同中存在软件缺陷或缺陷,这显然是造成失败的原因,包括严重的安全问题。在本文中,我们使用软件实施错误注入(SWIFI)技术来评估在存在错误的智能合同的情况下获得许可的连锁系统的行为。我们在发现中层错误(如缺少易变的初始化)和特定链软件故障(如缺少交易发送人说明)时,也采用复杂的中间软件(如缺少易变的初始化)和具体链软件故障(如缺少交易发送人说明)时,在智能合同代码中观察对系统(即可靠性和完整性的影响。我们还研究了正式核查(即通过Solc核查完成)和运行时间保护(如使用硬声明声明)机制,在发现中发现中间缺陷(如缺少整体初始初始初始缺陷)时,结果显示正式核查作为正常合同的可靠程度的可靠核查。结果,从而可以保证系统在正常合同中建立智能合同中进行进一步核查。