Solidity smart contracts are programs that manage up to 2^160 users on a blockchain. Verifying a smart contract relative to all users is intractable due to state explosion. Existing solutions either restrict the number of users to under-approximate behaviour, or rely on manual proofs. In this paper, we present local bundles that reduce contracts with arbitrarily many users to sequential programs with a few representative users. Each representative user abstracts concrete users that are locally symmetric to each other relative to the contract and the property. Our abstraction is semi-automated. The representatives depend on communication patterns, and are computed via static analysis. A summary for the behaviour of each representative is provided manually, but a default summary is often sufficient. Once obtained, a local bundle is amenable to sequential static analysis. We show that local bundles are relatively complete for parameterized safety verification, under moderate assumptions. We implement local bundle abstraction in SmartACE, and show order-of-magnitude speedups compared to a state-of-the-art verifier.
翻译:固态智能合同是管理链条上多达2 160个用户的程序。 对所有用户的智能合同进行验证是因国家爆炸而难以解决的。 现有的解决方案要么将用户数量限制在接近度, 要么依靠人工证明。 在本文件中, 我们提出本地捆包, 将与任意多用户的合同减少为与少数有代表性的用户的相继程序。 每个有代表性的用户都摘要列出与合同和财产相对应的本地混凝土用户。 我们的抽象化是半自动的。 代表取决于通信模式, 并通过静态分析进行计算。 每位代表的行为摘要是手工提供的, 但默认摘要往往足够。 获得后, 本地捆包可以按顺序进行静态分析 。 我们显示本地捆包在适度假设下相对完整的参数化安全核查 。 我们在SmartACE 中执行本地捆绑式的抽象, 并显示与最先进的验证器相比, 显示本地绑定的放大速度 。