Skip to main content

Module release

Module release 

Source
Expand description

Committed versus released (SPEC-v2 §6.9, §7.9). Mirrors Go release_v2.go.

super::verify_proof_bundle_v2 commits a terminal Protocol result and returns an opaque CommittedV2Outcome holding the handoff tuple {claim_id, receipt_body_digest, challenge_expires_at, allow_horizon} and the sealed receipt outbox body. It exposes no decision. release_v2_decision is the only path to an actionable decision; it returns released, pending (retryable), withheld (permanent for the claim once recorded), or rejected (a result of that call’s inputs that changes no claim state).

There is no production local-log substitute for an independent checkpoint. The in-memory store in super::reference exists only for tests and conformance scenarios.

Structs§

CommittedV2Outcome
The immutable, non-actionable handoff from a committed verification to publication and release_v2_decision. It carries no decision.
V2ReleaseConfig
Caller-authenticated release configuration.
V2ReleaseRecord
The durable release record of SPEC-v2 §6.9: the release of step 9 (outcome released, reason empty) or a withheld result of steps 7 and 8 (outcome withheld, reason clock_regressed, challenge_expired, or allow_horizon_passed). entry_hash and ack_timestamp name the verified receipt entry and its acknowledgement. The first record for a claim wins; a claim store returns V2StoreError::ReleaseStateMismatch for any different later record and must persist and return every field unchanged.
V2ReleaseResult
The result of release_v2_decision. decision is present only when status is released; reason is empty only when released. Only V2ReleasedDecision::allowed may gate a side effect.
V2ReleasedDecision
The only actionable value in this crate (SPEC-v2 §6.9). It is sealed: every field is private, release_v2_decision is its only constructor, it implements neither Default, Clone nor any deserializer, and every accessor returns a copy, so a caller can neither forge a released decision nor change one it was given.
V2TerminalClaimRecord
What the claim store returns to release (§7.3): the sealed handoff values, the recorded finalization time T_final, any receipt_abandoned marking, and any prior release record.

Enums§

V2ReleaseStatus
The release outcome class of §6.9.

Traits§

V2ReceiptCheckpoint
The caller-configured independent checkpoint (§7.8). acknowledge_v2_receipt accepts only the next sequence of the log, linked by previous_entry_hash, and returns the original acknowledgement on an identical retry. get_v2_acknowledgement returns an acknowledgement, V2StoreError::AcknowledgementNotFound, or another error for unavailability.
V2ReceiptPublisher
The Part B receipt outbox drain (§7.7). It signs and appends the exact committed body for claim_id at the next ordered log position, or returns the receipt already appended for that claim, and returns the signed receipt wire. It refuses a body that differs from the committed outbox body.
V2ReleaseClaimStore
The claim-store view release needs. load_v2_terminal_claim reports a claim the store does not hold with a claim_not_found error, which release answers with rejected / release_state_mismatch; any other error is store unavailability (pending / claim_store_unavailable). record_v2_release returns V2StoreError::ReleaseStateMismatch when a different release or withheld record already exists for the claim.

Functions§

receipt_outbox_digest_v2
"sha384:" + hex(SHA-384("ratify-protocol-receipt-outbox-v2" || 0x00 || body)).
release_v2_decision
Go ReleaseV2Decision: the release steps of SPEC-v2 §6.9 in order, stopping at the first that does not pass. signed_receipt is the publisher’s signed receipt wire, or None when it has not been appended yet.
valid_v2_release_record_outcome
Go ValidV2ReleaseRecordOutcome: whether outcome and reason form a release record: released with no reason, or withheld with one of the reasons release steps 7 and 8 record.