Expand description
SQLite-backed persistence, query, and report layer for the Chio protocol.
This crate is the concrete persistent backend for the kernel’s receipt log
and its supporting state. It implements the receipt store and query path,
budget and approval stores, capability-lineage and revocation stores, an
execution-nonce store, an encrypted-blob store, IOU and dead-letter stores,
and evidence-export queries. The store traits it implements are defined by
chio-kernel and chio-core. Reader-heavy receipt queries use a
connection pool (eight readers by default); writes are serialized through a
group-commit actor onto a single writer connection.
§Modules
receipt_store/receipt_query– receipt persistence and the query path.budget_store– durable budget state.approval_store/batch_approval_store– human-approval state.capability_lineage/revocation_store– capability provenance and revocation.execution_nonce_store/dead_letters/iou_store– nonce replay guard, settlement dead letters, and IOU envelopes.encrypted_blob/memory_provenance_store/evidence_export– encrypted payloads, memory provenance, and evidence export.
Re-exports§
pub use admission_operation_store::CreditExposureAccountSnapshot;pub use admission_operation_store::DurableObligationV1;pub use admission_operation_store::SqliteAdmissionOperationStore;pub use approval_store::SqliteApprovalStore;pub use authority::SqliteCapabilityAuthority;pub use batch_approval_store::SqliteBatchApprovalStore;pub use budget_store::BudgetStoreSnapshot;pub use budget_store::SqliteBudgetStore;pub use channel_lifecycle_store::ChannelLifecycleStoreError;pub use channel_lifecycle_store::ChannelPreparedAdmissionRecordV1;pub use channel_lifecycle_store::ChannelPreparedBeginResult;pub use channel_lifecycle_store::ChannelReservationDispositionV1;pub use channel_lifecycle_store::ChannelReservationStageRecordV1;pub use channel_lifecycle_store::SqliteChannelLifecycleStore;pub use channel_release_publisher_store::ChannelReleasePublicationRecordV1;pub use channel_release_publisher_store::ChannelReleasePublicationStatusV1;pub use channel_release_publisher_store::ChannelReleasePublisherError;pub use channel_release_publisher_store::ChannelReleaseSubmissionOutcomeV1;pub use channel_release_publisher_store::SqliteChannelReleasePublisherStore;pub use channel_release_publisher_store::VerifiedChannelReleasePublicationV1;pub use clearing_lifecycle_store::ClearingLifecycleStoreError;pub use clearing_lifecycle_store::SqliteClearingLifecycleStore;pub use economic_state_cache::admission_terminal_projection_effect_result;pub use economic_state_cache::EconomicOperationStageBinding;pub use economic_state_cache::EconomicOperationStageContext;pub use economic_state_cache::EconomicStateCacheError;pub use economic_state_cache::EconomicStateStageDescriptor;pub use economic_state_cache::EconomicStateStageRecord;pub use economic_state_cache::EconomicStateStageStatus;pub use economic_state_cache::SqliteEconomicStateCache;pub use encrypted_blob::decrypt_blob;pub use encrypted_blob::encrypt_blob;pub use encrypted_blob::BlobHandle;pub use encrypted_blob::BlobStoreError;pub use encrypted_blob::DecryptError;pub use encrypted_blob::EncryptError;pub use encrypted_blob::EncryptedBlob;pub use encrypted_blob::SqliteEncryptedBlobStore;pub use encrypted_blob::TenantId;pub use encrypted_blob::TenantKey;pub use execution_nonce_store::SqliteExecutionNonceStore;pub use execution_nonce_store::SqliteExecutionNonceStoreError;pub use frost_store::FrostActiveRosterRecord;pub use frost_store::FrostCeremonyRecord;pub use frost_store::FrostCeremonyRound1Record;pub use frost_store::FrostCeremonyRound2Record;pub use frost_store::FrostCeremonyState;pub use frost_store::FrostCoordinatorCancellation;pub use frost_store::FrostCoordinatorCommitment;pub use frost_store::FrostCoordinatorLease;pub use frost_store::FrostCoordinatorSessionRecord;pub use frost_store::FrostCoordinatorSessionRequest;pub use frost_store::FrostCoordinatorSessionState;pub use frost_store::FrostCoordinatorSigningPackage;pub use frost_store::FrostCustodyKey;pub use frost_store::FrostRotationRecord;pub use frost_store::FrostRotationState;pub use frost_store::FrostSignerCommitment;pub use frost_store::FrostSignerSessionRecord;pub use frost_store::FrostSignerSessionRequest;pub use frost_store::FrostSignerSessionState;pub use frost_store::FrostStoreError;pub use frost_store::SqliteFrostStore;pub use frost_store::StagedFrostRotation;pub use frost_store::StoredFrostCeremonyCompletion;pub use iou_store::SqliteIouEnvelopeStore;pub use iou_store::IOU_ENVELOPE_MIGRATION;pub use memory_provenance_store::SqliteMemoryProvenanceStore;pub use memory_provenance_store::SqliteMemoryProvenanceStoreError;pub use receipt_store::BackgroundCheckpointSigner;pub use receipt_store::SqliteReceiptStore;pub use revocation_store::SqliteRevocationStore;pub use schema_version::check_schema_version;pub use schema_version::stamp_schema_version;pub use schema_version::SchemaVersionError;pub use schema_version::CHIO_SQLITE_APPLICATION_ID;pub use serving_owner::FixedAuthorityIdScope;pub use serving_owner::SqliteAuthorityStore;pub use serving_owner::SqliteServingOwnerError;pub use settle_attempts::SqliteSettlementOutcomeStore;pub use settle_attempts::SETTLE_ATTEMPTS_MIGRATION;pub use tool_outcome_store::SqliteToolOutcomeStore;
Modules§
- admission_
operation_ store - approval_
store - SQLite-backed HITL approval store.
- authority
- batch_
approval_ store - SQLite-backed
BatchApprovalStore. - budget_
store - capability_
lineage - channel_
lifecycle_ store - channel_
release_ publisher_ store - clearing_
lifecycle_ store - dead_
letters - SQLite-backed persistence for
DeadLetterRecordrows. - economic_
state_ cache - encrypted_
blob - Tenant-scoped encrypted BLOB persistence for tee capture payloads.
- evidence_
export - execution_
nonce_ store - SQLite-backed
ExecutionNonceStore. - fiscal_
store - frost_
store - iou_
store - SQLite-backed persistence for IOU envelopes.
- memory_
provenance_ store - SQLite-backed
MemoryProvenanceStore. - receipt_
query - receipt_
store - revocation_
store - schema_
version - Schema stamping shared by every Chio operator store.
- serving_
owner - settle_
attempts - SQLite-backed leased settlement work.
- tool_
outcome_ store
Structs§
- Canonical
Bytes - Canonical JSON bytes paired with a phantom validation witness.
- Canonical
Json Witness - Type-level witness for bytes produced by the canonical JSON serializer.
- Evidence
Export Query - Full-export query used for offline evidence packaging.
- Sqlite
Pool Config - SQLite pool sizing and per-connection growth bound for receipt-store read and write paths.
- Sqlite
Store Options - Receipt-store construction options.
Enums§
- Evidence
Child Receipt Scope - Coverage mode for child receipts in an export bundle.
Constants§
- DEFAULT_
READER_ POOL_ MAX_ SIZE - Default SQLite reader pool size.
- DEFAULT_
WRITER_ POOL_ MAX_ SIZE - Default SQLite writer pool size.
Functions§
- is_
in_ memory_ sqlite_ path - Whether a SQLite path opens a database that lives only in memory for the life
of the process. rusqlite enables URI filenames, so the bare
:memory:sentinel,file::memory:, and anyfile:...?mode=memoryURI all open a non-durable database that loses its contents on restart and must not be mistaken for a durable store. Durability gates use this to refuse an in-memory path where they would otherwise advertise durable persistence. - sqlite_
filesystem_ path - The filesystem path a rusqlite path points at, resolving a
file:URI to its on-disk filename by stripping the scheme, any//authority, and the?query. A plain path (nofile:scheme) is returned unchanged.
Type Aliases§
- Shared
Canonical Bytes - Shared canonical JSON bytes suitable for signing and verification.