Abstract
The CAP theorem says that no blockchain can be live under dynamic participation and safe under temporary network partitions. To resolve this availability-finality dilemma, we formulate a new class of flexible consensus protocols, ebb-and-flow protocols, which support a full dynamically available ledger in conjunction with a finalized prefix ledger. The finalized ledger falls behind the full ledger when the network partitions but catches up when the network heals. Gasper, the current candidate protocol for Ethereum 2.0’s beacon chain, combines the finality gadget Casper FFG with the LMD GHOST fork choice rule and aims to achieve this property. However, we discovered an attack in the standard synchronous network model, highlighting a general difficulty with existing finality-gadget-based designs. We present a construction of provably secure ebb-and-flow protocols with optimal resilience. Nodes run an off-the-shelf dynamically available protocol, take snapshots of the growing available ledger, and input them into a separate off-the-shelf BFT protocol to finalize a prefix. We explore connections with flexible BFT and improve upon the state-of-the-art for that problem.
Introduction: The Availability-Finality Dilemma
In distributed systems, the CAP theorem presents a fundamental challenge: a system cannot simultaneously maintain liveness under dynamic participation (Availability) and safety during network partitions (Consistency/Finality). Traditional blockchain designs typically prioritize one side. Longest-chain protocols like Bitcoin favor availability, continuing to produce blocks even as nodes go offline, but risk safety breaks during network partitions. Conversely, BFT-based protocols like Algorand or Tendermint prioritize safety, stalling entirely if participation falls below a specific threshold.
Ethereum 2.0’s candidate protocol, Gasper, attempts to bridge this gap by combining a finality gadget (Casper FFG) with a fork choice rule (LMD GHOST). However, the authors discovered a "balancing attack" on Gasper that can prevent it from ever reaching finality in standard network models. This paper introduces ebb-and-flow protocols, a new class of consensus mechanisms designed to provide a provably secure resolution to this dilemma.
The Snap-and-Chat Construction
To achieve the ebb-and-flow property, the authors propose a modular construction called Snap-and-Chat. This approach decouples the availability and finality layers, allowing for a robust and flexible design that can utilize existing protocols as building blocks.
The construction consists of two primary components:
- The "Snap" ($\Pi_{lc}$): Nodes run a dynamically available protocol, such as a longest-chain rule. This generates a continuously growing available ledger ($LOG_{da}$).
- The "Chat" ($\Pi_{bft}$): Nodes take periodic snapshots of their confirmed available ledger and input them into a partially synchronous BFT protocol (e.g., Streamlet). This layer produces a finalized prefix ($LOG_{fin}$).
A critical safety rule ensures consistency: honest nodes only vote to finalize a BFT snapshot if it is already confirmed in their local available ledger. This "boycotting" mechanism prevents the BFT layer from finalizing branches that lack support in the underlying available chain.
Key Insights and Resilience
The primary innovation is the ebb-and-flow property: the finalized ledger is guaranteed to be a prefix of the available ledger. During network partitions, the finalized ledger "ebbs" (falls behind), while the available ledger continues to grow. Once the network heals, the finalized ledger "flows" forward to catch up.
This modularity provides several advantages:
- Optimal Resilience: The protocol is live for availability as long as more than half of the active nodes are honest, and safe for finality as long as fewer than one-third of the total nodes are malicious.
- Modularity: By keeping the layers decoupled, developers can swap the underlying longest-chain or BFT protocols with newer versions without redesigning the security proof from scratch.
Results and Simulations
The effectiveness of the Snap-and-Chat construction was validated through both formal proofs and simulations. Simulations modeled 100 nodes with fluctuating participation (modeled using reflected Brownian motion) and intermittent network partitions.
As shown in the simulation results, the available ledger ($LOG_{da}$) maintains steady growth regardless of network conditions. In contrast, the finalized ledger ($LOG_{fin}$) advances in steps. During periods of "network partition" (shaded grey), finality stalls. However, as soon as the partition is resolved and enough nodes are "awake" (shaded green), the finalized ledger rapidly catches up to the available tip.
Conclusion and Future Work
Ebb-and-flow protocols offer a robust path forward for blockchains requiring both high availability and strong finality. While this work focuses on the permissioned core, future research will extend these principles to full Proof-of-Stake systems, addressing challenges like stake grinding. Additionally, improving the communication complexity of the BFT component remains a key area for enhancing scalability in networks with thousands of validators.
Summary updated