v1.0.0 — Stable API #2
jamesgober
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
raft-io v1.0.0 — Stable
A complete, frozen Raft. From the first scaffold,
raft-iowas built to be theconsensus engine three projects could stake their correctness on. With
1.0theprotocol is complete, every safety property is proven under adversarial fault
injection, the performance baseline is set, and the public API, wire format, and
durable log format are frozen — no backward-incompatible change before
2.0.What is raft-io?
A from-scratch implementation of the Raft consensus algorithm, built as a clean,
embeddable library rather than a framework. The protocol core is a deterministic,
sans-I/O state machine: you feed a node events and it returns actions. Time,
networking, and storage are injected through trait seams, which is what makes the
core provable and reproducible from a seed. It is the consensus layer above
wal-dband the coordination substrate for Hive DB clustering.The complete protocol
Everything Raft needs to run a real replicated system, and nothing it does not:
stickiness, and pre-vote so a partitioned node cannot disrupt a healthy
cluster when it rejoins.
AppendEntries, per-follower progress withoptimistic pipelining, conflict-hint backtracking, and commit on a quorum.
restarted node recovers and rejoins without violating safety (the
WalLog,under the
persistencefeature).InstallSnapshotcatch-up for afar-behind follower, driven by a snapshot-policy hint.
non-voting learners that catch up without affecting any quorum, then get
promoted to voters.
TimeoutNow.committed write, confirmed against a quorum, with no log append.
Proven, not just written
partitions, message loss, reordering, duplication, membership churn, and
snapshotting under one randomised schedule — and asserts all five Raft safety
properties continuously: Election Safety, Leader Append-Only, Log Matching,
Leader Completeness / State Machine Safety, and apply ordering. Run sustained to
PROPTEST_CASES=6000+.state on every node — and serves stale-free linearizable reads — under the same
faults.
to a valid value or fail cleanly, never panicking or over-allocating.
reproducible from a seed and a sequence of events.
Built to a standard
#![forbid(unsafe_code)]; nounwrap/expect/panic/todoon any productionpath (enforced by
denylints); every fallible operation returnsResult.every shape of
stepindocs/BENCHMARKS.md(a follower tickis ~8 ns).
tunes timing; traits plug in real storage and transport.
docs/API.md, and theprotocol is specified normatively in
docs/PROTOCOL.md.The freeze
As of
1.0, the public API, theMessageset and itspack-ioframing, theWalLogrecord format, and the configuration encoding are frozen and will notchange incompatibly before
2.0. Future additions stay compatible through#[non_exhaustive]enums and tagged encodings.Breaking changes
None versus
0.10.1. This release is documentation, an added example, and thefinal specification pass; behaviour is unchanged.
Verification
All green. At this tag: 122 unit + 22 integration / property tests + 60 doctests,
nine runnable examples, and the hardening suite soaked at
PROPTEST_CASES=6000.MSRV: Rust 1.85 (edition 2024).
loomis not exercised: the core is asingle-threaded, owned state machine with no lock-free or shared-state path.
Installation
Documentation
Full diff:
v0.10.1...v1.0.0.Changelog:
CHANGELOG.md.This discussion was created from the release v1.0.0 — Stable API.
All reactions