An interactive, single-page visualizer for Trireme — a leaderless consensus protocol with weighted quorums and epoch reconfiguration.
Open index.html in any browser. There is no build step, no server, and no
network access: the page is fully self-contained.
Five replicas sit on a ring, each drawn with its epoch weight rendered as oars. Messages travel between them in real time.
| Mechanism | What to look for |
|---|---|
| Weighted quorums | The meter tracks OK weight against W/2 = 10 and the fast-path threshold Φ = 15. |
| Fast / slow path | Reaching Φ with matching dependencies commits immediately; otherwise the command falls back to an Accept round. |
| Reconfiguration | RECONF fences replicas at pre-accept, drains the outstanding epoch, then switches weights. |
| Epoch gates (5a / 16a) | A fenced replica with no trace of an old-epoch command answers ClosedEpoch instead of OK. Commands born in the new epoch pass the fence untouched. |
| Explicit Prepare | Recovery for stragglers: Prepare is answered even by fenced replicas, and a committed record found anywhere is re-broadcast. |
- Proposer — pick which replica issues the next command.
- New command / RECONF — propose a value, or a reconfiguration barrier.
- Click a replica — crash or heal it.
- Drop next message — lose exactly one message, to force timeouts and recovery.
- Explicit Prepare — manually rescue a drain that is waiting on an undelivered commit.
- Auto-recover / anti-entropy — toggle the two mechanisms that resolve stragglers on their own.
- Step / speed — advance one event at a time and read the ship's log.
The panels below the ring show per-replica log state (pre-accepted / accepted /
committed) and the execution graph, where RECONF appears as a barrier that
every old-epoch command sorts before and every new-epoch command sorts after.
This is an illustrative simulator, not a bit-exact rendering of the formal specification. Command interference is simplified to a single object, so every command depends on every earlier one. The mechanisms it does model — weighted thresholds, the fast/slow split, fencing, drain, the epoch gates, and Explicit Prepare — follow the protocol's rules.
| Path | Role |
|---|---|
trireme-visualizer.html |
Source (markup, styles, and simulator). |
build-standalone.mjs |
Wraps the source into a complete HTML document. |
index.html |
Generated output. Regenerate with node build-standalone.mjs. |