Skip to main content

Crate chio_store_sqlite

Crate chio_store_sqlite 

Source
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

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::FrostCoordinatorShare;
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::FrostSignerShare;
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::scope_fixed_authority_ids_for_current_thread;
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 DeadLetterRecord rows.
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§

CanonicalBytes
Canonical JSON bytes paired with a phantom validation witness.
CanonicalJsonWitness
Type-level witness for bytes produced by the canonical JSON serializer.
EvidenceExportQuery
Full-export query used for offline evidence packaging.
SqlitePoolConfig
SQLite pool sizing and per-connection growth bound for receipt-store read and write paths.
SqliteStoreOptions
Receipt-store construction options.

Enums§

EvidenceChildReceiptScope
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 any file:...?mode=memory URI 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 (no file: scheme) is returned unchanged.

Type Aliases§

SharedCanonicalBytes
Shared canonical JSON bytes suitable for signing and verification.