arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.07958cs.LOcs.DC
收藏

技术报告:探索以太坊规范的自动化模型检测

Technical Report: Exploring Automatic Model-Checking of the Ethereum specification

Igor Konnov, Jure Kukovec, Thomas Pani, Roberto Saltini, Thanh Hai Tran

AI总结:

本研究针对以太坊3SF共识协议的可问责安全性,基于其Python规范用TLA+形式化并结合多层手动抽象,通过Apalache等工具实现小规模实例的穷举验证,未发现安全违规,证明了手动抽象对模型检测效率的提升作用。

摘要:

我们研究了以太坊规范的自动化模型检测,重点关注3SF共识协议的可问责安全性(Accountable Safety)属性。我们选择3SF是因为其相关性以及它给形式化验证带来的独特挑战。我们的主要工具是用于规范编写的TLA+和用于验证的Apalache模型检测器。\n 我们的形式化工作基于3SF的可执行Python规范。首先,我们将该规范手动翻译为TLA+,发现可问责安全性的定义存在显著的组合复杂性。为应对这些挑战,我们引入了多层手动抽象:(1)用折叠(folds)替代递归,(2)用整数替换抽象图,(3)分解链配置。为交叉验证我们的结果,我们还开发了SMT(CVC5)和Alloy中的替代编码方案。\n 尽管存在固有复杂性,我们的结果表明,对小规模实例进行可问责安全性的穷举验证是可行的——最多支持7个检查点和24个验证者投票。此外,即使在稍大的配置中,也未观察到可问责安全性的违规情况。除这些发现外,我们的研究强调了手动抽象和领域专业知识在提升模型检测效率方面的重要性,并展示了TLA+在处理复杂规范方面的灵活性。

英文摘要:

We investigate automated model-checking of the Ethereum specification, focusing on the Accountable Safety property of the 3SF consensus protocol. We select 3SF due to its relevance and the unique challenges it poses for formal verification. Our primary tools are TLA+ for specification and the Apalache model checker for verification. Our formalization builds on the executable Python specification of 3SF. To begin, we manually translate this specification into TLA+, revealing significant combinatorial complexity in the definition of Accountable Safety. To address these challenges, we introduce several layers of manual abstraction: (1) replacing recursion with folds, (2) substituting abstract graphs with integers, and (3) decomposing chain configurations. To cross-validate our results, we develop alternative encodings in SMT (CVC5) and Alloy. Despite the inherent complexity, our results demonstrate that exhaustive verification of Accountable Safety is feasible for small instances - supporting up to 7 checkpoints and 24 validator votes. Moreover, no violations of Accountable Safety are observed, even in slightly larger configurations. Beyond these findings, our study highlights the importance of manual abstraction and domain expertise in enhancing model-checking efficiency and showcases the flexibility of TLA+ for managing intricate specifications.

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

↑