Building a Verifiable Logical Clock for P2P Networks

Guangda Sun,Tianyang Tao,Yanpei Guo,Michael Yiqing Hu,Jialin Li
2024-08-13
Abstract:Logical clocks are a fundamental tool to establish causal ordering of events in a distributed system. They have been applied in weakly consistent storage systems, causally ordered broadcast, distributed snapshots, deadlock detection, and distributed system debugging. However, prior logical clock constructs fail to work in an open network with Byzantine participants. In this work, we present Chrono, a novel logical clock system that targets such challenging environment. We first redefine causality properties among distributed processes under the Byzantine failure model. To enforce these properties, Chrono defines a new validator abstraction for building fault-tolerant logical clocks. Furthermore, our validator abstraction is customizable: Chrono includes multiple backend implementations for the abstraction, each with different security-performance trade-offs. We have applied Chrono to build two decentralized applications, a mutual exclusive service and a weakly consistent key-value store. Chrono adds only marginal overhead compared to systems that tolerate no Byzantine faults. It also out-performs state-of-the-art BFT total order protocols by significant margins.
Distributed, Parallel, and Cluster Computing
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve This paper aims to address the issues of validity and consistency of logical clocks in peer-to-peer (P2P) networks under the presence of Byzantine participants. Specifically: - **Background and Challenges**: - Traditional logical clocks (such as Lamport clocks and vector clocks) are used in distributed systems to establish causal relationships between events. - In open, decentralized network environments, any participant can join or leave the system at any time, which poses significant scalability challenges for vector-based logical clocks. - The presence of Byzantine behavior can lead to logical clocks violating causal relationship properties, resulting in application state corruption or undefined behavior. - **Main Contributions**: - Proposes a new logical clock system—Chrono, which can provide secure causal reasoning in P2P networks. - The core of Chrono is a Verifiable Logical Clock (VLC), which can record the clock value of each process and ensure that the size of each VLC is related only to its causal history, not the system scale. - Each VLC comes with a verifiable proof that any third party can verify to ensure that the VLC was generated by a series of legitimate clock operations. - This recursive verifiability allows VLC to maintain the same causal correctness properties as traditional logical clocks, even in the presence of Byzantine processes. - **Application Scenarios**: - Two decentralized applications were built using Chrono: a mutual exclusion service and a weakly consistent key-value store. - Experimental results show that Chrono adds only marginal overhead compared to systems that do not consider Byzantine faults and significantly outperforms existing Byzantine fault-tolerant total order protocols. Through these improvements, the paper addresses the reliability and consistency issues of logical clocks in open network environments, enabling distributed systems to better cope with the challenges posed by Byzantine behavior.