Skip to main content

Module chain

Module chain 

Source
Expand description

Chain-aware publication using host-supplied authenticated head state.

This module cannot itself provide a durable head, lease, rollback defence, or atomic compare-and-swap. The host must supply and qualify those services. A bundle may be published without its head being committed; such an orphan requires host-controlled recovery and must not be treated as a chain member.

Structs§

ChainPublication
Result is based on the host’s commit assertion, not local proof of durable head state or directory synchronization.

Enums§

ChainAuthorityError
A failure to obtain current authenticated chain state is not an empty chain.
ChainHead
Current chain state asserted by a host-protected, anti-rollback registry. Empty must mean authenticated absence, not an unavailable lookup.
ChainPublicationError
HeadCommit
Result reported by the host’s atomic head update.

Traits§

ChainAuthority
Host boundary for an exact root and chain. Implementations must provide an authenticated, complete, anti-rollback head and maintain the exclusive chain lease through publication and commit. compare_and_commit must be atomic with respect to competing writers and check current Store policy; the host must hold a policy lease through the complete head update so expiry and revocation checks do not race a blocking commit; on uncertain completion it must return Indeterminate, never Committed. Durability and trusted freshness are host obligations, not checked here.

Functions§

publish_chain_bundle
Verify and publish a bundle against an authenticated head, then ask the host for atomic compare-and-commit. Store policy, locality and receipt authority are also checked by publish_bundle. A publish error, panic, process crash, or indeterminate head response can leave artifacts or an uncertain outcome; callers must reconcile using the host’s authenticated recovery protocol.