Theophilus John
See it running on the home page

03/05#hmna-0003/052026Sole engineer

Homonoia: Raft, made visible

Raft consensus implemented from the paper and made visible in the browser.

ticks fuzzed
3M
leader changes
8,422
safety violations
0
tests
128

How it works, in 4 steps

  1. The leader stops being heard from.
  2. A follower’s election timeout fires, and it stands as a candidate.
  3. Three votes out of five settle the term.
  4. Replication resumes from whoever won it.

Notes

Homonoia is an implementation of the Raft consensus algorithm, written from the paper and made visible in the browser. Five simulated nodes on a network you can break — you set latency and drop rate, cut partitions, and kill or revive nodes, then watch leader elections and log replication behave correctly under whatever you do to them.

The consensus core is pure: state in, state out, no I/O and no timers. The same code runs the visualization and the fuzz harness, so what you see on screen is the thing that was verified rather than a diagram of it. The fuzz sweep runs 1,000 seeds of 3,000 ticks each and checks all five safety properties after every tick; across 8,422 leader changes, 89,253 committed entries and 1,993,145 messages (96,741 of them duplicated), it finds no violations.

Deleting a safety rule to check that the tests catch it produced the more interesting result. With Raft’s current-term commit restriction removed, 5,000 seeds and 15 million ticks of random fuzzing found nothing, while a hand-written Figure 8 scenario fails at tick 1529. Random schedules essentially never line up the four conditions that bug needs; you have to know it exists and construct it.

Built with

  • TypeScript
  • React
  • Canvas
  • Vite
Top00
Enargeia01
Dianome02
Homonoia03
Philoi04
Basis05
About06
Contact07
Fly the night/fly/
Fly freely/fly/#free
Enargeia — the full casepage
Dianome — the full casepage
Homonoia — the full casepage
Philoi — the full casepage
Basis — the full casepage
Enargeia liveenargeia.dev
Enargeia sourcegithub
Dianome livedianome.dev
Dianome sourcegithub
Dianome writeupdianome.dev/writeup
Homonoia livehomonoia.dev
Homonoia sourcegithub
Philoi livephiloi.net
Philoi sourcegithub
Basis sourcegithub
Copy email addresstheophilusjohn@gmail.com
Open the résumépdf
GitHub profilegithub
LinkedInlinkedin
Reduce motionoff
High contrastoff
Single-key shortcutson
Source of this sitegithub