Skip to main content
QUICK REVIEW

[论文解读] Formal Verification of Blockchain Byzantine Fault Tolerance

Pierre Tholoniat, Vincent Gramoli|arXiv (Cornell University)|Sep 16, 2019
Distributed systems and fault tolerance被引用 9
一句话总结

本文提出使用 ByMC 模型检测器对区块链中的拜占庭容错共识组件进行形式化验证,证明关键组件——如拜占庭广播原语和 Red Belly Blockchain 共识的变体——可在 64 核机器上于 17 分钟内自动验证。作者表明,形式化验证如今在生产级区块链系统中既可行又不可或缺。

ABSTRACT

To implement a blockchain, the trend is now to integrate a non-trivial Byzantine fault tolerant consensus algorithm instead of the seminal idea of waiting to receive blocks to decide upon the longest branch. After a decade of existence, blockchains trade now large amounts of valuable assets and a simple disagreement could lead to disastrous losses. Unfortunately, Byzantine consensus solutions used in blockchains are at best proved correct "by hand" as we are not aware of any of them having been formally verified. In this paper, we propose two contributions: (i) we illustrate the severity of the problem by listing six vulnerabilities of blockchain consensus including two new counter-examples; (ii) we then formally verify two Byzantine fault tolerant components of Red Belly Blockchain using the ByMC model checker. First, we specify a simple broadcast primitive in 116 lines of code that is verified in 40 seconds on a 2-core Intel machine. Then, we specify a blockchain consensus algorithm in 276 lines of code that is verified in 17 minutes on a 64-core AMD machine using MPI. To conclude, we argue that it has now become both relatively simple and crucial to formally verify the correctness of blockchain consensus protocols.

研究动机与目标

  • 为解决区块链共识协议中形式化验证的严重缺失问题,这些协议目前仅通过人工证明,因而容易出错。
  • 通过识别六个问题,包括两个针对 Casper FFG 和 HoneyBadger 的新反例,展示共识漏洞的严重性。
  • 表明使用现代工具(如 ByMC)进行拜占庭容错组件的形式化验证如今在实践上是可行且对非专家也易于实现的。
  • 提供使用阈值自动机形式化描述的广播原语和 Red Belly Blockchain 共识变体的公开可访问、机器可检查的规格说明。
  • 倡导将形式化验证作为区块链开发的标准实践,以防止生产系统中出现灾难性故障。

提出的方法

  • 作者将区块链共识组件建模为阈值自动机,基于消息阈值抽象正确进程的状态,从而实现高效的态空间压缩。
  • 他们使用 ByMC 模型检测器验证广播和共识组件的安全性和活性属性,假设最多有 t < n/3 个进程为拜占庭故障。
  • 广播原语以 116 行代码指定,并在 2 核英特尔机器上用 40 秒完成验证。
  • Red Belly Blockchain 共识变体以 276 行代码指定,并在 64 核 AMD 机器上使用 MPI 用 17 分钟完成验证。
  • 验证假设了轮次刚性对手以建模公平调度,从而实现异步拜占庭共识的有限态模型检测。
  • 规格说明使用领域特定语言编写,抽象掉底层消息排序,聚焦于协议不变式。

实验结果

研究问题

  • RQ1是否可以使用自动化工具对区块链中的拜占庭容错共识组件进行形式化验证,若可以,效率如何?
  • RQ2广泛部署的共识算法(如 Casper FFG 和 HoneyBadger)中存在哪些漏洞,为何它们无法终止?
  • RQ3非形式化验证专家是否能成功使用现代工具(如 ByMC)验证复杂的区块链共识组件?
  • RQ4轮次刚性假设在多大程度上使异步拜占庭共识的有限态模型检测成为可能?
  • RQ5与传统人工证明或其他形式化方法(如 TLA+ 或 Coq)相比,使用 ByMC 的自动化验证在可扩展性和实用性方面如何?

主要发现

  • 作者发现了两个新的反例,表明在某些对抗条件下,Casper FFG 和 HoneyBadger 可能无法终止,尽管它们已被广泛部署。
  • 拜占庭广播原语在 2 核英特尔机器上用 40 秒完成形式化验证,确认其在最多 t < n/3 个拜占庭故障下的正确性。
  • Red Belly Blockchain 共识变体在 64 核 AMD 机器上用 17 分钟完成验证,展示了在真实硬件上形式化验证的可扩展性。
  • 验证过程揭示了非形式化证明中的细微缺陷,凸显了仅依赖人工论证的风险。
  • 使用阈值自动机和 ByMC 可实现系统化、机器可检查的验证,且无需深入掌握形式化方法知识。
  • 结果表明,形式化验证如今在生产系统中确保区块链共识协议正确性方面既实际又必要。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。