SyncFrame

Enum SyncFrame 

Source
pub enum SyncFrame {
Show 13 variants Hello { nonce: [u8; 32], max_frame: u32, min_protocol: u16, max_protocol: u16, }, DomainRequest { domain_id: DomainId, epoch: u64, proof: [u8; 32], capability_chain: Vec<Vec<u8>>, }, AuthorityState { epoch: u64, sequence: u64, head: Option<[u8; 32]>, }, ControlGrant { transition: Vec<u8>, epoch_key: [u8; 32], capability_chain: Vec<Vec<u8>>, }, ControlEvidence { transition: Vec<u8>, }, Frontier { commits: Vec<CommitId>, }, Need { commits: Vec<CommitId>, }, Refs { commits: Vec<CommitId>, }, Ack { commit: CommitId, }, Done, Error { code: u16, }, InvitationRequest, Invitation { payload: Vec<u8>, },
}
Expand description

One canonical /iroh-db/sync/1 control-plane message.

Variants§

§

Hello

Negotiates the protocol and binds a fresh session nonce.

Fields

§nonce: [u8; 32]

Random session nonce.

§max_frame: u32

Largest control frame accepted by the sender.

§min_protocol: u16

Oldest object protocol the sender can safely accept.

§max_protocol: u16

Newest object protocol the sender can safely accept.

§

DomainRequest

Proves possession of authorization material for exactly one domain.

Fields

§domain_id: DomainId

Requested security domain.

§epoch: u64

Historical epoch selected for the nonce-bound proof.

§proof: [u8; 32]

Nonce-bound capability/key proof.

§capability_chain: Vec<Vec<u8>>

Root-to-leaf capability evidence for the authenticated endpoint.

§

AuthorityState

Advertises the durable authority position before data reconciliation.

Fields

§epoch: u64

Active domain epoch.

§sequence: u64

Accepted control sequence, equal to the epoch for control format v3.

§head: Option<[u8; 32]>

Canonical control-head ID, absent at genesis.

§

ControlGrant

Delivers one signed successor and digest-bound key over authenticated QUIC.

Fields

§transition: Vec<u8>

Canonical signed iroh_db_security::ControlTransition bytes.

§epoch_key: [u8; 32]

Symmetric key for the transition’s new epoch.

§capability_chain: Vec<Vec<u8>>

Capability evidence required to validate transition authority.

§

ControlEvidence

Exchanges a signed control head as equivocation evidence without key material.

Fields

§transition: Vec<u8>

Canonical signed iroh_db_security::ControlTransition bytes.

§

Frontier

Advertises the bounded causal frontier used as dependency-discovery roots.

Fields

§commits: Vec<CommitId>

Canonically sorted unique commit IDs.

§

Need

Requests missing immutable commit objects.

Fields

§commits: Vec<CommitId>

Canonically sorted unique commit IDs.

§

Refs

Announces immutable hashes available through iroh-blobs.

Fields

§commits: Vec<CommitId>

Canonically sorted unique commit IDs.

§

Ack

Acknowledges durable acceptance of one commit.

Fields

§commit: CommitId

Accepted commit ID.

§

Done

Completes a successful reconciliation round.

§

Error

Reports a bounded protocol error without sensitive context.

Fields

§code: u16

Stable protocol error code.

§

InvitationRequest

Requests an endpoint-targeted invitation before domain membership exists.

§

Invitation

Delivers signed invitation bytes inside the authenticated QUIC session.

Fields

§payload: Vec<u8>

Canonical signed invitation payload.

Implementations§

Source§

impl SyncFrame

Source

pub fn encode_canonical(&self) -> Result<Vec<u8>, SyncFrameError>

Encodes a strict, deterministic control frame.

Source

pub fn decode_canonical(bytes: &[u8]) -> Result<Self, SyncFrameError>

Strictly decodes one bounded canonical control frame.

Trait Implementations§

Source§

impl Clone for SyncFrame

Source§

fn clone(&self) -> SyncFrame

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SyncFrame

Source§

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

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

impl PartialEq for SyncFrame

Source§

fn eq(&self, other: &SyncFrame) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for SyncFrame

Source§

impl StructuralPartialEq for SyncFrame

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> 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.