Skip to main content

JournalCheckpoint

Struct JournalCheckpoint 

Source
pub struct JournalCheckpoint {
Show 20 fields pub type_: String, pub checkpoint_id: String, pub checkpoint_kind: CheckpointKind, pub from_record_index: u64, pub to_record_index: u64, pub merkle_root: String, pub leaf_count: u64, pub journal_id: String, pub created_at: String, pub hub_id: String, pub hub_public_key: String, pub hub_signature: String, pub signed_at: String, pub covered_use_ids: Vec<String>, pub covered_grant_ids: Vec<String>, pub previous_record_digest: String, pub record_digest: String, pub signature: Option<String>, pub signature_alg: Option<String>, pub signing_key_id: Option<String>,
}
Expand description

A signed Merkle commitment to a contiguous range of journal records. Lets a verifier check journal continuity (and, with a Hub-signed variant, replay across machines) without reading every record.

Two kinds with the same shape:

  • LocalJournal (default): committed by the local journal as a compaction primitive. Verify only emits replay-included-checkpoint.

  • HubOrg: signed by a Hub/org. Carries hub_id, hub_public_key, hub_signature, signed_at, and covered_use_ids listing every use the checkpoint asserts coverage over. Verify emits replay-hub-org PASS only when every Hub-signature check passes and every embedded use is in covered_use_ids.

Fields§

§type_: String§checkpoint_id: String§checkpoint_kind: CheckpointKind

Discriminator. Defaults to LocalJournal for back-compat with pre-PR-6 records that didn’t serialize this field.

§from_record_index: u64

Inclusive range of use_numbers (or revocation_ids) covered by this checkpoint, in journal order.

§to_record_index: u64§merkle_root: String

Merkle root over the canonical JSON of every record in [from_record_index, to_record_index].

§leaf_count: u64§journal_id: String§created_at: String§hub_id: String

Hub identity (e.g. “hub://org-foo”). Required when checkpoint_kind == HubOrg. Empty/absent for local-journal.

§hub_public_key: String

Hub’s signing public key. base64-url no-pad. Required for HubOrg. Embedded so a verifier can check the signature without a separate trust root lookup; PR 7+ adds a trusted issuer registry that pins acceptable hub_public_keys.

§hub_signature: String

base64-url-no-pad Ed25519 signature over the canonical signing payload (canonical_hub_signing_bytes). Required for HubOrg.

§signed_at: String

RFC 3339 timestamp when the Hub signed this checkpoint. Distinct from created_at (which is the local journal’s recorded creation time).

§covered_use_ids: Vec<String>

Use IDs the Hub asserts this checkpoint covers. The verifier MUST confirm every package use_id is in this list before emitting replay-hub-org PASS.

§covered_grant_ids: Vec<String>

Grant IDs covered. Informational; the per-use check is what gates the row.

§previous_record_digest: String§record_digest: String§signature: Option<String>§signature_alg: Option<String>§signing_key_id: Option<String>

Implementations§

Source§

impl JournalCheckpoint

Source

pub fn is_hub_signed(&self) -> bool

True only when EVERY Hub field is populated – the precondition for replay-hub-org PASS to be considered. Signature verification is a separate step.

Source

pub fn canonical_hub_signing_bytes(&self) -> Vec<u8>

Canonical bytes the Hub signs. Stable JSON of every field except hub_signature and record_digest (those depend on the signature itself). Sibling helper to record_digest’s approach in this same module.

Trait Implementations§

Source§

impl Clone for JournalCheckpoint

Source§

fn clone(&self) -> JournalCheckpoint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JournalCheckpoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for JournalCheckpoint

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for JournalCheckpoint

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V