Skip to main content

Module ledger

Module ledger 

Source
Expand description

The Ledger Entry (λ) — one tamper-evident record.

The ledger is event-sourced rather than telemetry, and that single choice buys three features from one mechanism: audit, deterministic replay, and time travel.

Tamper-evidence comes from the chain. Each entry commits to the digest of the one before it, so altering entry N invalidates every entry after it. Rewriting history therefore means rewriting the whole tail, and the root digest gives that away.

This module defines the entry and how the chain links. Writing entries anywhere is US-1001, and the sinks are US-1002 onward.

Structs§

CostRecord
What a step cost.
GrantDelta
What a step asked for, what it got, and what was taken away.
JournalRef
Points at the journalled nondeterministic inputs for a step.
LedgerEntry
λ — one append-only, hash-chained ledger record.

Constants§

GENESIS_PREV
The digest a genesis entry links back to: no predecessor.