论文标题
多人:多智能合同互动的正式操场
Multi: a Formal Playground for Multi-Smart Contract Interaction
论文作者
论文摘要
区块链由一个参与者网络维护,这些参与者运行算法,旨在保持对拜占庭式攻击的分布式机器的耐受性。从用户的角度来看,区块链提供了执行可信可靠的计算的集中计算机的错觉,其中所有计算都是确定性的,并且无法操纵或撤消结果。智能合同用具有确定性语义的专用编程语言编写。每笔交易始于从外部用户到智能合约的调用。合同具有本地存储空间,可以致电其他合同,更重要的是,它们存储,发送和接收加密货币。保证合同在部署前是正确的,因为在部署后不能修改其代码,因此合同是正确的。但是,由此产生的生态系统使得很难理解程序正确性,因为合同可以由恶意用户执行或恶意合同可以设计用于利用其他称为它们的合同。许多攻击和错误是由多个合同,攻击合同和执行漏洞的未知代码之间的意外互动引起的。此外,不同区块链之间存在非常激进的竞争,以扩大其用户群。想法是快速实施的,区块链竞争以迅速提供和采用新功能。在本文中,我们提出了一个正式的可扩展操场,允许对多合同交互的推理,以最终证明在将功能纳入真实区块链中之前。我们实施了一个模型,该模型对执行平台进行建模,抽象每个单独合同的内部代码,并专注于合同互动。此外,我们显示可以使用多少个现有或提议的功能来推理多合同交互。
Blockchains are maintained by a network of participants that run algorithms designed to maintain collectively a distributed machine tolerant to Byzantine attacks. From the point of view of users, blockchains provide the illusion of centralized computers that perform trustable verifiable computations, where all computations are deterministic and the results cannot be manipulated or undone. Smart-contracts are written in a special-purpose programming language with deterministic semantics. Each transaction begins with an invocation from an external user to a smart contract. Contracts have local storage and can call other contracts, and more importantly, they store, send and receive cryptocurrency. It is very important to guarantee that contracts are correct before deployment since their code cannot be modified afterward deployment. However, the resulting ecosystem makes it very difficult to reason about program correctness, since contracts can be executed by malicious users or malicious contracts can be designed to exploit other contracts that call them. Many attacks and bugs are caused by unexpected interactions between multiple contracts, the attacked contract and unknown code that performs the exploit. Moreover, there is a very aggressive competition between different blockchains to expand their user base. Ideas are implemented fast and blockchains compete to offer and adopt new features quickly. In this paper, we propose a formal extensible playground that allows reasoning about multi-contract interactions to ultimately prove properties before features are incorporated into the real blockchain. We implemented a model of computation that models the execution platform, abstracts the internal code of each individual contract and focuses on contract interactions. Moreover, we show how many features, existing or proposed, can be used to reason about multi-contract interactions.