echd — Echo on Encore · E5
The Record — Ledger and Vault
The system's critical objects refuse to be eventual — one transaction books every change, sealed segments keep the history, and replay is an explicit third clock.
echd speaks in the present tense over a build ladder. Every module, verb, key, and port named on this page is real; the composition into one standing platform is the vision the ladder builds.
The chapter
codemojex wallet · echo_store/graft · echo_graftThe system's critical objects refuse to be eventual. The ledger is the consistency-first persistence layer beneath them: one Repo.transaction — row locks taken FOR UPDATE, exactly-once enforced by a partial unique index, every change paired with a signed entry in an append-only ledger under the RVL brand. No transaction composer, no second idiom: the wallet — the worked instance, where the critical objects happen to be money — states the rule in its own source, and the platform holds it. Constraints back the discipline — non-negative balances checked in the schema, the revenue ledger deliberately signed.
Beneath the ledger, the deep record. Graft runs two engines under one law: the native engine on CubDB's append-only immutable B-tree — commits and pages keyed by LSN, snapshots for free — beside the Rust engine on Fjall; both speak to the same bus. The Streamer ships sealed segments to Tigris in real time and resumes from a watermark; the multi-writer fence is a conditional create — If-None-Match: "*" with X-Tigris-Consistent: true — so exactly one writer wins each LSN. Streams fold into the archive and trim; time travel reads a window by mint instant and hydrates a table. The synthesis is the vault: traces outliving the daemon's reaper under branded TRC keys, bytes verbatim, replayed through the same stores on an explicit third clock, every answer stamped with its plane.
The record ladder
hover a rungFOR UPDATE, enforces exactly-once with a partial unique index on (player, ref), books the pool with an atomic SQL increment, and pairs every debit with a signed house credit — all inside one Repo.transaction. The schema holds the floor: balances checked non-negative, the revenue ledger signed on purpose.segments/ and logs/…/commits/ — and the fence is a conditional create: a taken LSN answers 412, so writers race safely and exactly one history exists.TRC keys with their bytes verbatim — the wrapper indexes, never re-models. Replay drives the same stores the live clocks fill, stamped plane:"vault" so the third clock never masquerades as the first two.Hover or focus a rung to read it; click to pin. Without scripting, all four read in sequence.
The modules
E5.1–E5.4The Ledger, One Transaction
one-transaction-no-multi · exactly-once-by-index · the-paired-credit
Graft, Two Engines
the-append-only-btree · the-rust-backend · snapshots-and-lsn
The Tigris Horizon
streamer-not-litestream · the-conditional-create-fence · fold-trim-time-travel
The Vault and the Third Clock (synthesis)
the-harvester-vs-the-reaper · trc-keys-verbatim-bytes · replay-a-third-clock
Doors
the sibling coursesReferences
sources · relatedSources
- PostgreSQL — Documentationrow locks, partial unique indexes, and the transaction the ledger stands on
- Ecto — Repothe one transaction idiom, at its source
- CubDBthe append-only immutable B-tree under the native engine
- Fjallthe Rust storage engine under the second Graft
- Fly.io — Tigristhe object horizon behind the sealed segments
Related
- Echo Persistencethe dial, whole
- E4 — The Memorythe tier above — where truth is near
- E6 — The Surfacewhere the vault becomes visible
- echd — the course homethe master frame's record tier