Crisis BFT consensus protocol — Go PoC, Python recorder, and CrisisViz: a native macOS scrubbable curriculum visualizer (10 chapters, ~18 minutes at 1×, signed-speed slider with reverse playback).
Find a file
saymrwulf 37e9f26204 Fix round advancement and end-to-end consensus convergence
Five bugs prevented the full consensus pipeline from producing results:

1. k-reachability with k=0 required weight > 0, but some vertices had
   weight 0. Fixed: k <= 0 degenerates to simple past-containment check.

2. SVP incorrectly included the current round (v.round). The paper's
   Algorithm 6 only includes rounds strictly < v.round. With the current
   round in SVP, the voting set contained only the vertex itself (peers
   are spacelike), making agreement impossible.

3. Stage delta (δ) was computed as the SVP index, but the paper defines
   δ = d_{svp}(s, t) as distance from s=max(svp). Fixed: δ=0 at the
   newest round (initial proposal), increasing toward older rounds.

4. The voting set was recomputed per-round, but Algorithm 7 line 6
   computes it ONCE for s=max(svp). Fixed: single voting set S shared
   across all stages.

5. Demo parameters (difficulty=2, pow_zeros=0) made thresholds
   unreachable. Calibrated: difficulty=1, pow_zeros=2 gives weights
   that cross both the is_last (3*d) and SVP (6*d) thresholds.

Result: 3 honest nodes now converge on identical total order. Leaders
are elected via the full BA* pipeline (initial proposal → presorting →
gradecast → BBA binary agreement). Byzantine nodes cannot prevent
convergence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-23 15:13:41 +02:00
src/crisis Fix round advancement and end-to-end consensus convergence 2026-04-23 15:13:41 +02:00
tests Initial implementation of the Crisis protocol (Richter, 2019) 2026-04-23 13:20:30 +02:00
.gitignore Initial implementation of the Crisis protocol (Richter, 2019) 2026-04-23 13:20:30 +02:00
Crisis.mirco-richter-2019.pdf Initial implementation of the Crisis protocol (Richter, 2019) 2026-04-23 13:20:30 +02:00
pyproject.toml Initial implementation of the Crisis protocol (Richter, 2019) 2026-04-23 13:20:30 +02:00