Goal
The seam itself: the minimal trait set through which the pure core sees the world, plus an in-memory reference implementation. This is what makes "cesr has everything except db/runtime/config" concrete — and it's deliberately tiny.
Design
/// The ONLY window the pure core gets onto stored KELs. Sync, allocation-light,
/// GAT-friendly borrows (house style — not cesride's owned-everything API).
pub trait KelProvider {
type Event<'a>: /* borrowed event view */ where Self: 'a;
fn event_at(&self, pre: &Prefix, sn: u64) -> Option<Self::Event<'_>>;
fn latest(&self, pre: &Prefix) -> Option<Self::Event<'_>>;
fn key_state(&self, pre: &Prefix) -> Option<&KeyState>;
}
Plus the verdict-output pattern (replaces keripy's in-place self.db.* mutation): validation returns data describing what happened — the caller commits.
pub struct Acceptance<'a> { pub new_state: KeyState, pub event: KeriEvent<'a>, /* digests, receipts counted, … */ }
// The layer above persists it (nexus repository, LMDB, whatever) — cesr never writes.
Keep it minimal on purpose: no EscrowStore trait (escrow storage is runtime-owned; K2 verdicts are enough), no async (a sync trait is trivially adapted upward; the reverse poisons no_std).
Acceptance
K1–K5 compile against KelProvider only (grep proves no other storage touchpoint); MemKel passes the whole verdict suite; no_std + wasm32 green.
From the 2026-07-05 keripy teardown (the anti-Baser: keripy's 50-table basing.py collapses to one lookup trait on the read side). Depends on: K1 types. Co-designs with: K3/K4/K5.
Goal
The seam itself: the minimal trait set through which the pure core sees the world, plus an in-memory reference implementation. This is what makes "cesr has everything except db/runtime/config" concrete — and it's deliberately tiny.
Design
Plus the verdict-output pattern (replaces keripy's in-place
self.db.*mutation): validation returns data describing what happened — the caller commits.Keep it minimal on purpose: no EscrowStore trait (escrow storage is runtime-owned; K2 verdicts are enough), no async (a sync trait is trivially adapted upward; the reverse poisons no_std).
MemKel: in-memoryKelProviderimpl (featuretestingor always-on — it's tiny) used by all K1–K5 tests and any wasm demostdtypes in signaturesAcceptance
K1–K5 compile against
KelProvideronly (grep proves no other storage touchpoint); MemKel passes the whole verdict suite; no_std + wasm32 green.From the 2026-07-05 keripy teardown (the anti-Baser: keripy's 50-table
basing.pycollapses to one lookup trait on the read side). Depends on: K1 types. Co-designs with: K3/K4/K5.