Five guardians, one node
TSUNAGI is a from-scratch Zig implementation of the Cardano block-producer role. Its design is organized around five named subsystems. Each exists because a real failure demanded it — none of this is speculative architecture.
The peer is an unmodified cardano-node. TSUNAGI speaks the standard
node-to-node mini-protocols; nothing on the other side knows or cares that the block
came from an independent implementation. That is the point.
A node that cannot see itself cannot be trusted. KAGAMI is TSUNAGI's
self-observation layer: every forged block enters an acceptance tracker
that follows it through forged → pending → arrived → canonical (or
unknown, honestly recorded when a block is lost). Internal belief is
continuously cross-checked against external reality — a poller queries the public
Koios API and compares the chain's view of the pool's blocks against the node's own.
When the two disagree, that disagreement is itself a signal — the Zig 0.16 child-spawn regression (P5) was caught exactly this way: Koios said canonical, the internal verdict said unknown, and the gap became incident INC-013.
TSUNAGI refuses to broadcast any block it cannot prove valid to itself first. The forge path is a chain of gates, each born from a real incident:
82 07 85 (Conway era 7). Born from INC-001, where era-6 tagging made cardano-node route blocks to the wrong decoder.A refused forge is logged with its reason — visible, attributable, recoverable. A bad broadcast would be none of those.
Failure is contained, never cascaded. The orphan watchdog distinguishes a genuinely
diverged block (quarantine, probe, roll back state) from a slow confirmation
(disarm, assume accepted). Artifact publication is two-phase — a .ready
sentinel renamed into place only after the full artifact is written — so a reader
can never observe a half-written block. Every deployed binary keeps a verified
rollback chain on disk: any version can be restored by swapping one file, with the
environment and state never touched.
Producing a valid block is half the job; the network must fetch it before a competing block wins the slot race. MUSUBI is the propagation layer, hardened through four incidents (P1 → P2.2):
MsgAwaitReply instead of being disconnected, so a serve-ready connection always exists at forge time.The measurable result: connection churn went from ~140 disconnect cycles to zero, and a single parked connection has served multiple canonical blocks across many hours of uptime.
Kintsugi is the Japanese art of repairing broken pottery with gold — the repair is displayed, not hidden. TSUNAGI's failure-memory system works the same way: every incident that ever cost a block is recorded with its root cause, fix, regression test, and live closure evidence. The record is machine-readable; a recurring log signature can be matched against past incidents before anyone debugs from scratch.
The full story — every crack and every gold seam — is on the Kintsugi page.
Single static binary. The whole 0.15-era codebase runs on 0.16 through one compatibility shim.
Including replay tests that reconstruct real on-chain failures, and tests that really fork child processes.
Standard node-to-node mini-protocols against an unmodified cardano-node.
Praos leadership, evolving-key signatures, pinned operational certificate.