Skip to main content

Module accountability_ledger

Module accountability_ledger 

Source
Expand description

Tamper-evident accountability ledger — the append-only, ed25519-signed, hash-chained store that makes the conduct + disclosure records un-erasable (tamper-evident) and attributable (signed).

ADR 0011 (D4/D5) needs the conduct trail and disclosure events to survive revocation and to resist a betrayer quietly deleting them. This module realises the “tamper-evident signed-WAL” property with real primitives (sha2 + ed25519-dalek): each entry carries a monotone sequence, the previous entry’s hash (the chain), a hash of its own content, and an ed25519 signature over that hash by the actor. Any modification, deletion, insertion, or reordering breaks a hash link or a signature, so AccountabilityLedger::verify detects it and names the entry.

Scope: this gives tamper-evidence (deletion is detectable). Anti-deletion durability — that copies cannot all be removed — is the commons replication layer (swarm/WebTorrent; coordinate), and the two compose: replicate the ledger, and any diverging/pruned copy is provably tampered. The ledger is generic over the record kind ("conduct", "disclosure", "switch", …) carrying serialised JSON, so it does not couple to those types.

Structs§

AccountabilityLedger
An append-only, tamper-evident ledger of accountability records.
LedgerEntry
One ledgered, signed, chained entry.

Enums§

LedgerTamper
A detected tamper, naming the offending entry.