Expand description
SQLite-backed MemoryProvenanceStore.
Durable append-only hash-chain of memory-write provenance entries.
Keeps the same contract as InMemoryMemoryProvenanceStore in
chio-kernel::memory_provenance: append computes the chain linkage
atomically, verify_entry checks both the stored hash and the
prev_hash linkage, and chain_digest returns the tail hash.
Schema:
CREATE TABLE chio_memory_provenance (
seq INTEGER PRIMARY KEY AUTOINCREMENT,
entry_id TEXT NOT NULL UNIQUE,
store TEXT NOT NULL,
entry_key TEXT NOT NULL,
capability_id TEXT NOT NULL,
receipt_id TEXT NOT NULL,
written_at INTEGER NOT NULL,
prev_hash TEXT NOT NULL,
hash TEXT NOT NULL
);
CREATE INDEX idx_chio_memory_provenance_key
ON chio_memory_provenance(store, entry_key, seq);The monotonic seq column is the chain position; verify_entry
looks up the preceding row by seq to confirm linkage.
Structsยง
- Sqlite
Memory Provenance Store - SQLite-backed durable memory-provenance chain.
- Sqlite
Memory Provenance Store Error - Opaque error type for the SQLite-backed memory provenance store.