Skip to main content
QUICK REVIEW

[Paper Review] Formal Verification of Blockchain Byzantine Fault Tolerance

Pierre Tholoniat, Vincent Gramoli|arXiv (Cornell University)|Sep 16, 2019
Distributed systems and fault toleranceComputer Science9 citations
TL;DR

This paper proposes the formal verification of Byzantine fault-tolerant consensus components in blockchains using the ByMC model checker, demonstrating that critical components—such as a Byzantine broadcast primitive and a variant of Red Belly Blockchain's consensus—can be verified automatically in under 17 minutes on a 64-core machine. The authors show that formal verification is now both feasible and essential for ensuring correctness in production-grade blockchain systems.

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.

Motivation & Objective

  • To address the critical lack of formal verification in blockchain consensus protocols, which are currently proven only 'by hand' and thus error-prone.
  • To demonstrate the severity of consensus vulnerabilities by identifying six issues, including two new counter-examples for Casper FFG and HoneyBadger.
  • To show that formal verification of Byzantine fault-tolerant components is now practical and accessible even to non-experts using modern tools like ByMC.
  • To provide publicly available, machine-checked specifications of a broadcast primitive and a Red Belly Blockchain consensus variant using threshold automata.
  • To advocate for the adoption of formal verification as a standard practice in blockchain development to prevent catastrophic failures in production systems.

Proposed method

  • The authors model blockchain consensus components as threshold automata, abstracting the state of correct processes based on message thresholds, enabling efficient state-space reduction.
  • They use the ByMC model checker to verify safety and liveness properties of the broadcast and consensus components under the assumption that up to t < n/3 processes are Byzantine.
  • The broadcast primitive is specified in 116 lines of code and verified in 40 seconds on a 2-core Intel machine.
  • The Red Belly Blockchain consensus variant is specified in 276 lines of code and verified in 17 minutes on a 64-core AMD machine using MPI.
  • The verification assumes a round-rigid adversary to model fair scheduling, which enables finite-state model checking of asynchronous Byzantine consensus.
  • Specifications are written in a domain-specific language for threshold automata, abstracting away low-level message ordering and focusing on protocol invariants.

Experimental results

Research questions

  • RQ1Can Byzantine fault-tolerant consensus components in blockchains be formally verified using automated tools, and if so, how efficiently?
  • RQ2What vulnerabilities exist in widely deployed consensus algorithms like Casper FFG and HoneyBadger, and why do they fail to terminate?
  • RQ3Can non-experts in formal verification successfully verify complex blockchain consensus components using modern tools like ByMC?
  • RQ4To what extent does the round-rigidity assumption enable finite-state model checking of asynchronous Byzantine consensus?
  • RQ5How does automated verification with ByMC compare in scalability and practicality to traditional 'by hand' proofs or other formal methods like TLA+ or Coq?

Key findings

  • The authors discovered two new counter-examples showing that Casper FFG and HoneyBadger may not terminate under certain adversarial conditions, despite being widely deployed.
  • The Byzantine broadcast primitive was formally verified in 40 seconds on a 2-core Intel machine, confirming its correctness for up to t < n/3 Byzantine faults.
  • The Red Belly Blockchain consensus variant was verified in 17 minutes on a 64-core AMD machine, demonstrating scalability of formal verification on realistic hardware.
  • The verification process revealed subtle flaws in informal proofs, highlighting the risk of relying solely on hand-constructed arguments.
  • The use of threshold automata and ByMC enables systematic, machine-checked verification without requiring deep expertise in formal methods.
  • The results show that formal verification is now both practical and necessary for ensuring the correctness of blockchain consensus protocols in production systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.