Byz-GentleRain: An Efficient Byzantine-tolerant Causal Consistency Protocol

Kaile Huang, Hengfeng Wei, Yu Huang, Haixiang Li, Anqun Pan

Abstract

Causal consistency is a widely adopted consistency model for distributed systems due to its balance between performance and intuitive semantics. However, most existing causally consistent systems are vulnerable to Byzantine faults, where nodes or clients may act maliciously. This paper introduces Byz-GentleRain, the first causal consistency protocol designed to withstand both Byzantine servers and an unlimited number of Byzantine clients. By integrating the stabilization mechanism of the GentleRain protocol with the Practical Byzantine Fault Tolerance (PBFT) algorithm, Byz-GentleRain ensures that malicious actors cannot violate causal order or forge data dependencies. Experimental results demonstrate that the protocol maintains high efficiency, particularly in read-heavy workloads, while providing robust security guarantees.

1. Introduction

In distributed systems, causal consistency ensures that if one operation "causes" another (e.g., a reply to a comment), all users see the cause before the effect. While many systems implement this for performance and availability, almost none account for Byzantine faults—where nodes or clients behave maliciously, provide conflicting data, or ignore protocols entirely.

Existing solutions like Byz-RCM handle Byzantine servers but assume all clients are honest. This is a major security gap: a malicious client could "lie" about the order of its operations, or a malicious server could forge metadata to hide updates from certain users. Byz-GentleRain bridges this gap by creating a protocol that remains causally consistent even when both servers and clients are actively trying to subvert the system.

2. Methods and Protocol Design

Byz-GentleRain builds upon the foundation of GentleRain, a protocol that uses physical clocks to determine when an update is "stable" (i.e., visible to everyone). To achieve Byzantine tolerance, the authors introduced several key architectural changes. The protocol utilizes several key notations to manage state and stability across replicas, as summarized in Figure 2.

Figure 2: Notations used in the Byz-GentleRain protocol.

Key components of the protocol include:

  • Client-Side Timestamps and Signatures: To prevent malicious servers from forging causal dependencies, clients assign their own totally ordered timestamps to updates and sign them digitally. This ensures that the provenance and order of updates are verifiable by any honest replica.
  • Common Global Stable Time (cgst): In standard GentleRain, servers compute a "Global Stable Time" (GST) independently. In a Byzantine environment, different servers having different GSTs allows a malicious server to selectively hide or show updates. Byz-GentleRain uses PBFT to reach a consensus among servers on a common GST.
  • Restricted Visibility: An update only becomes visible to clients once its timestamp is less than or equal to the current cgst. This ensures that all replicas agree on which updates are "safe" to show, preventing "forking" attacks where different clients see different histories.
Figure 1: Illustration of the synchronization problem where different replicas have different views of stability (gst). A malicious replica (Replica 3) can exploit these differences to violate causal consistency.

As shown in Figure 1, without a common global stable time, a malicious replica (Replica 3) can exploit minor local clock skews or report false stability information to hide dependencies, leading to a causal violation. The PBFT-based synchronization in Byz-GentleRain mitigates this risk.

3. Key Insights and Results

The core innovation of Byz-GentleRain lies in the "Synchronization Necessity." The authors discovered that simply calculating a lower bound on clocks isn't enough when servers are malicious. Without a synchronized "Common GST," a Byzantine server could use its slightly different local time to "hide" a dependency.

The protocol was implemented in Java using Google’s Protocol Buffers and evaluated on Aliyun using 4 instances acting as data centers. The authors used synthetic workloads with varying GET:PUT ratios. Key findings include:

  • Efficiency: In failure-free scenarios, Byz-GentleRain's throughput is lower than Byz-RCM due to the cost of digital signatures but remains efficient. For a 32:1 GET:PUT ratio, it handles roughly 3000 operations per second.
  • Read-Heavy Performance: The protocol is particularly well-suited for read-heavy workloads. When digital signatures were removed for testing, Byz-GentleRain performed nearly identically to Byz-RCM, proving the core logic is highly optimized and that the primary bottleneck is cryptographic verification.
  • Resilience: The system was tested against active Byzantine attacks, including clients sending incorrect timestamps and servers broadcasting conflicting stable times. The protocol successfully maintained causal consistency in all tested scenarios. The paper also formally defines Byzantine-Causal Consistency (Byz-CC), acknowledging that while we cannot force session order on a Byzantine client, we can ensure that honest clients always see a consistent, causal view of the world.

4. Conclusion and Future Work

Byz-GentleRain is the first protocol to provide causal consistency in the presence of both Byzantine servers and clients. By combining clock-based stability with PBFT-based consensus, it provides a practical and efficient way to maintain causal consistency in adversarial environments. Future work will focus on scaling the PBFT synchronization to larger numbers of nodes and exploring more efficient authentication schemes to reduce the signature overhead.

Summary updated

BibTeX
@inproceedings{huang2021byz,
  author = {Kaile Huang and Hengfeng Wei and Yu Huang and Haixiang Li and Anqun Pan},
  title = {{Byz-GentleRain: An Efficient Byzantine-tolerant Causal Consistency Protocol}},
  booktitle = {Sss},
  year = {2021},
  doi = {10.1007/978-3-030-91081-5\_36},
}
Figure