🤖 AI Summary
This work addresses the lack of systematic formal verification for DAG-based blockchain consensus protocols. We propose a refinement-based hierarchical modeling methodology and, for the first time, establish a unified safety specification covering five mainstream protocols: DAG-Rider, Cordial Miners, Hashgraph, Eventual Synchronous BullShark, and an Aleph variant. Using TLA+ for high-level modeling and TLAPS for automated proof discharge, we verify over 2,000 proof obligations, completing all safety proofs within 6–8 minutes. Our contributions are threefold: (1) the first reusable and composable formal verification framework for DAG consensus safety; (2) a progressive safety verification strategy—from leader blocks to all nodes and all blocks—enabling modular correctness guarantees; and (3) open-sourced, rigorously documented TLA+ specifications (492–732 lines), facilitating protocol design, analysis, and trustworthy cross-chain interoperability evolution.
📝 Abstract
DAG-based consensus protocols are being adoption by blockchain companies to decrease energy footprints and improve security. A DAG-based consensus protocol collaboratively constructs a partial order of blocks of transactions and produces linearly ordered blocks. The ubiquity and strategic importance of blockchains call for formal proof of the correctness of key components, namely, consensus protocols. This paper presents a safety-proven formal specification of two DAG-based protocols. Our specification highlights several dissemination, DAG construction, and ordering variations that can be combined to express the two protocols. The formalization requires a refinement approach for modeling the consensus. In an abstract model, we first show the safety of DAG-based consensus on leader blocks and then further refine the specification to encompass all blocks for all processes. The TLA+ specification for a given protocol consists of 492-732 lines, and the proof system TLAPS verifies 2025-2294 obligations in 6-8 minutes.