Faultline

Break a Raft cluster on purpose. Prove whether it stayed correct.

Cluster at 0.000 s

Select a node to inspect it and inject a fault at this moment.

Inject now

History

What this is

A Raft key-value store and two more protocols, Viewstamped Replication and Multi-Paxos, written from scratch in Rust and run inside a deterministic simulator that owns the network, the disks and every clock. The nemesis partitions (both ways or one way), drops, delays, duplicates and reorders messages, crashes nodes with or without their unsynced writes, damages synced log entries, skews clocks and steps them. Afterwards a linearizability checker searches for any legal order of the observed history. Same seed, same run: the fingerprint above is a hash of every event, and the browser computes the same one as the native build.

Thirty-two bugs are planted behind switches. Most are mistakes real systems have shipped; four are bugs Faultline found in itself: one in its VR by the sweep, one in its Raft membership changes by the model checker, one in its leadership transfer with lease reads, and one in its ReadIndex by the sweep. Turn one on, let the nemesis loose, and watch the checker catch it, then shrink the failure to a handful of faults.

Results

Seed sweeps run in GitHub Actions.

BugCaughtDetectorShrunkModel checker

Model checker

Random runs sample. The model checker enumerates: breadth first over every order of deliveries, drops, timeouts, crashes, restarts and proposals that fits in a small bound, using the same Rust Raft, Viewstamped Replication and Multi-Paxos code with the clocks taken out. It proves the safety invariants hold within that bound, or returns the shortest sequence of steps that breaks them. It runs here, in your browser.

Pick one. Most finish in a second or two.

Smarter search

Search comparisons run in GitHub Actions.

Gallery

One shrunk failure per planted bug. Each link replays the exact run, and the lab checks on load that it still produces the fingerprint it was published with. One of them is a bug the sweep found in Faultline itself: the case study.

No server. Everything on this page runs in your browser from one WebAssembly file. Read the code and the limits.