pub enum InitPayload {
BlobShare {
blob_id: BlobId,
},
KeyShare,
DeltaRequest {
context_id: ContextId,
delta_id: [u8; 32],
},
DagHeadsRequest {
context_id: ContextId,
},
SnapshotBoundaryRequest {
context_id: ContextId,
requested_cutoff_timestamp: Option<u64>,
},
SnapshotStreamRequest {
context_id: ContextId,
boundary_root_hash: Hash,
page_limit: u16,
byte_limit: u32,
resume_cursor: Option<Vec<u8>>,
},
TreeNodeRequest {
context_id: ContextId,
node_id: [u8; 32],
max_depth: Option<u8>,
},
LevelWiseRequest {
context_id: ContextId,
level: u32,
parent_ids: Option<Vec<[u8; 32]>>,
},
}Expand description
Initial request payloads for various sync protocols.
Each variant represents a different type of sync request that can be initiated by a node.
Variants§
Request to share a blob.
Request to share encryption keys.
DeltaRequest
Request a specific delta by ID (for DAG gap filling).
Fields
DagHeadsRequest
Request peer’s current DAG heads for catchup.
SnapshotBoundaryRequest
Request snapshot boundary negotiation.
Fields
SnapshotStreamRequest
Request to stream snapshot pages.
Fields
TreeNodeRequest
Request tree node(s) for HashComparison sync (CIP §4).
Used by the HashComparison protocol to request subtrees from a peer for Merkle tree comparison.
Fields
LevelWiseRequest
Request nodes at a specific level for LevelWise sync (CIP Appendix B).
Used by the LevelWise protocol for breadth-first tree synchronization, optimized for wide, shallow trees (depth ≤ 2).
Trait Implementations§
Source§impl BorshDeserialize for InitPayload
impl BorshDeserialize for InitPayload
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for InitPayload
impl BorshSerialize for InitPayload
Source§impl Clone for InitPayload
impl Clone for InitPayload
Source§fn clone(&self) -> InitPayload
fn clone(&self) -> InitPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InitPayload
impl Debug for InitPayload
Auto Trait Implementations§
impl Freeze for InitPayload
impl RefUnwindSafe for InitPayload
impl Send for InitPayload
impl Sync for InitPayload
impl Unpin for InitPayload
impl UnsafeUnpin for InitPayload
impl UnwindSafe for InitPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more