Expand description
SQLite-backed append-only log storage.
Schema:
entries— primary log table. One row per append. Primary key issequence(auto-incremented). The Merkle tree is materialized intree_nodesfor O(log N) incremental recomputation.tree_nodes— cached Merkle tree nodes, indexed by(level, index). The root is at the highest level for the current size.cert_entries— join table mapping cert fingerprints to log entries. Carries parsed metadata (issuer, subject, validity window) so the API can serve cert-specific queries without re-parsing.ots_proofs— Bitcoin OTS proofs keyed by tree head sequence.witness_sigs— witness countersignatures keyed by tree head sequence + witness ID.
Structs§
- Database
- Wrapper around the SQLite connection. Cheaply cloneable because
Connectionis wrapped in aMutexinside anArc. - Entry
- Rebuild
Row - One stored entry, parsed into the shape the Merkle rebuild needs. The sequence is the 0-based leaf index (rowid minus one).
Type Aliases§
- OtsProof
Row - OTS proof row: encoded proof bytes, optional Bitcoin block height, anchor timestamp (ISO 8601).