arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.05217cs.CRcs.PLcs.SE
收藏

迈克尔逊智能合约的抽象解释

Abstract interpretation of Michelson smart-contracts

Guillaume Bau, Antoine Miné, Vincent Botbol, Mehdi Bouaziz

摘要:

智能合约的静态分析在区块链平台上变得越来越普遍。分析器依赖于符号执行或模型检验等技术,但很少有分析器能同时提供强可靠性和保证分析的终止性。由于智能合约经常操纵经济资产,因此证明数字属性超出了运行时错误的情况也是可取的。智能合约执行模型与主流程序设计语言有很大不同,并且因区块链而异,使得最先进的分析难以适应。例如,智能合约调用可能会修改影响后续调用的持久性存储。这使得工具很难推断出正式确保不存在可利用漏洞所需的不变量。Tezos区块链中使用的Michelson智能合约语言是强类型的,基于堆栈的,并且具有严格的执行模型,几乎没有隐式运行时错误的机会。我们提出了一个正在进行的静态分析迈克尔逊的基础上抽象解释和MOPSA,一个模块化的静态分析器内实现。我们的工具支持迈克尔逊语义特征,包括对外部契约的内部调用。它可以证明不存在运行时错误,并在无限数量的调用上推断持久存储上的不变量。它也被扩展到证明高级别的数值和安全属性。CCS概念:$\bullet$安全和隐私$\rightarrow$逻辑和验证; $\bullet$软件及其工程$\rightarrow$自动化静态分析。

英文摘要:

Static analysis of smart-contracts is becoming more widespread on blockchain platforms. Analyzers rely on techniques like symbolic execution or model checking, but few of them can provide strong soundness properties and guarantee the analysis termination at the same time. As smart-contracts often manipulate economic assets, proving numerical properties beyond the absence of runtime errors is also desirable. Smart-contract execution models differ considerably from mainstream programming languages and vary from one blockchain to another, making state-of-the-art analyses hard to adapt. For instance, smart-contract calls may modify a persistent storage impacting subsequent calls. This makes it difficult for tools to infer invariants required to formally ensure the absence of exploitable vulnerabilities. The Michelson smart-contract language, used in the Tezos blockchain, is strongly typed, stack-based, and has a strict execution model leaving few opportunities for implicit runtime errors. We present a work in progress static analyzer for Michelson based on Abstract Interpretation and implemented within MOPSA, a modular static analyzer. Our tool supports the Michelson semantic features, including inner calls to external contracts. It can prove the absence of runtime errors and infer invariants on the persistent storage over an unbounded number of calls. It is also being extended to prove high-level numerical and security properties. CCS Concepts: $\bullet$ Security and privacy $\rightarrow$ Logic and verification; $\bullet$ Software and its engineering $\rightarrow$ Automated static analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑