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.
翻译:屏障链由一组参与者组成的网络维护,这些参与者的算法旨在集体维持一个对拜占庭攻击容忍的分布式机器。从用户的角度来看,阻段链提供了中央计算机的幻觉,这些计算机进行可信赖的可核查计算,所有计算都是决定性的,结果无法操纵或取消。智能合同可以用确定性语义的特殊目的编程语言写成。每笔交易的起始点是外部用户对智能合同的召唤。合同有当地储存,可以调用其他合同,更重要的是,它们储存、发送和接收加密货币。在部署之前,必须保证合同的特性是正确的,因为其代码不能在部署后修改。然而,由此产生的生态系统使得很难解释程序是否正确,因为恶意用户或恶意合同可以用来利用其他要求它们的合同。许多攻击和错误都是由多种合同模式、被攻击的合同和进行开发的未知代码之间意想不到的相互作用造成的。此外,在扩大用户文件基础之前,它们储存、发送和接收加密合同之前,我们快速地进行多链式合同的争论, 最终地进行一个执行,我们使用一个快速的进度的进度, 使得每个合同的进度能让每个交易成为一个执行过程。