Skip to main content

Module store

Module store 

Source
Expand description

Persistence-backend traits for proof ledger, revocation cache, and evidence archive. Implementations live in separate crates (tf-store-*).

These traits let tf-daemon (and other components) treat their proof ledger, revocation cache, and evidence archive as pluggable backends: a deployment can run SQLite for a home profile, Postgres or MySQL for enterprise, and Redis as a fast revocation cache fronting any of the durable ledgers, all without touching daemon code.

Implementations:

  • tf-store-file — first-party file-backed local store, all three traits.
  • tf-store-sqlite — single-file embedded SQLite, all three traits.
  • tf-store-postgres — sqlx-backed Postgres, all three traits.
  • tf-store-mysql — sqlx-backed MySQL, all three traits.
  • tf-revoke-redis — Redis-backed RevocationCache only (Redis is the wrong shape for an append-only ledger but an excellent fast-path for revocation checks).

Enums§

StoreError
Errors returned by every persistence backend.

Traits§

EvidenceArchive
Opaque-byte evidence-bundle archive (e.g. compliance bundles per TF-0012). Bundles are addressed by an external bundle id, not a content hash, because callers may want to overwrite or version a bundle outside the archive’s responsibility.
ProofLedger
Append-only ledger of TrustForge proof events.
RevocationCache
Revocation set. Conceptually a (target_kind, target_id) -> effective_at map; is_revoked answers “was this target revoked at or before at?”