#[non_exhaustive]pub enum BroadcastMessage<'a> {
StateDelta {
context_id: ContextId,
author_id: PublicKey,
delta_id: [u8; 32],
parent_ids: Vec<[u8; 32]>,
hlc: HybridTimestamp,
root_hash: Hash,
artifact: Cow<'a, [u8]>,
nonce: Nonce,
events: Option<Cow<'a, [u8]>>,
},
HashHeartbeat {
context_id: ContextId,
root_hash: Hash,
dag_heads: Vec<[u8; 32]>,
},
SpecializedNodeDiscovery {
nonce: [u8; 32],
node_type: SpecializedNodeType,
},
SpecializedNodeJoinConfirmation {
nonce: [u8; 32],
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StateDelta
HashHeartbeat
Hash heartbeat for divergence detection
Periodically broadcast by nodes to allow peers to detect silent divergence. If a peer has a different hash for the same DAG heads, it indicates a problem.
Fields
SpecializedNodeDiscovery
Specialized node discovery request
Broadcast by a node to discover and invite specialized nodes (e.g., read-only TEE nodes). Specialized nodes receiving this will respond via request-response protocol to the message source (available from gossipsub message).
Note: context_id is NOT included - it’s tracked internally by the requesting node using the nonce as the lookup key.
Fields
node_type: SpecializedNodeTypeType of specialized node being invited
SpecializedNodeJoinConfirmation
Confirmation that a specialized node has joined a context
Broadcast by specialized nodes on the context topic after successfully joining. The inviting node receives this and removes the pending invite entry.
Trait Implementations§
Source§impl<'a> BorshDeserialize for BroadcastMessage<'a>
impl<'a> BorshDeserialize for BroadcastMessage<'a>
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>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<'a> BorshSerialize for BroadcastMessage<'a>
impl<'a> BorshSerialize for BroadcastMessage<'a>
Source§impl<'a> Debug for BroadcastMessage<'a>
impl<'a> Debug for BroadcastMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for BroadcastMessage<'a>
impl<'a> RefUnwindSafe for BroadcastMessage<'a>
impl<'a> Send for BroadcastMessage<'a>
impl<'a> Sync for BroadcastMessage<'a>
impl<'a> Unpin for BroadcastMessage<'a>
impl<'a> UnsafeUnpin for BroadcastMessage<'a>
impl<'a> UnwindSafe for BroadcastMessage<'a>
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
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>
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>
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