pub enum HeaderSyncEvent {
Show 20 variants
PeerConnected(HeaderSyncPeerSession),
PeerDisconnected(ZakuraPeerId),
AdvisoryHeaderSummary {
peer: ZakuraPeerId,
summary: HeaderSyncServiceSummary,
},
FullBlockCommitted {
height: Height,
hash: Hash,
},
NewBlockAccepted {
peer: ZakuraPeerId,
height: Height,
hash: Hash,
block: Arc<Block>,
},
NewBlockDuplicate {
peer: ZakuraPeerId,
height: Height,
hash: Hash,
},
NewBlockAcceptedNonBestChain {
peer: ZakuraPeerId,
height: Height,
hash: Hash,
},
NewBlockRejected {
peer: ZakuraPeerId,
hash: Hash,
},
SessionWireMessage {
peer: ZakuraPeerId,
session_id: u64,
msg: HeaderSyncMessage,
},
WireHeaders {
peer: ZakuraPeerId,
session_id: u64,
request_id: HeaderSyncRequestId,
headers: Vec<Arc<Header>>,
body_sizes: Vec<u32>,
tree_aux_roots: Vec<BlockCommitmentRoots>,
},
WireGetHeaders {
peer: ZakuraPeerId,
session_id: u64,
request_id: HeaderSyncRequestId,
start_height: Height,
count: u32,
want_tree_aux_roots: bool,
},
WireDecodeFailed {
peer: ZakuraPeerId,
error: Arc<HeaderSyncWireError>,
},
WireProtocolFailure {
peer: ZakuraPeerId,
reason: HeaderSyncMisbehavior,
error: Arc<HeaderSyncWireError>,
},
StateFrontiersChanged(HeaderSyncFrontiers),
VctRootRepairRequested {
height: Height,
generation: u64,
anchor_hash: Hash,
expected_hashes: Vec<(Height, Hash)>,
},
VctRootRepairResolved {
generation: u64,
},
HeaderRangeCommitted {
start_height: Height,
tip_height: Height,
tip_hash: Hash,
},
HeaderRangeCommitFailed {
peer: ZakuraPeerId,
session_id: u64,
start_height: Height,
count: u32,
kind: HeaderSyncCommitFailureKind,
},
HeaderRangeResponseFinished {
peer: ZakuraPeerId,
session_id: u64,
request_id: HeaderSyncRequestId,
start_height: Height,
requested_count: u32,
returned_count: u32,
},
HeaderRangeResponseReady {
peer: ZakuraPeerId,
session_id: u64,
request_id: HeaderSyncRequestId,
start_height: Height,
requested_count: u32,
want_tree_aux_roots: bool,
headers: Vec<Arc<Header>>,
body_sizes: Vec<u32>,
tree_aux_roots: Vec<BlockCommitmentRoots>,
},
}Expand description
Facts accepted by the header-sync reactor.
Variants§
PeerConnected(HeaderSyncPeerSession)
A peer became available for negotiated header sync.
PeerDisconnected(ZakuraPeerId)
A peer disconnected; all of its outstanding work is dropped.
AdvisoryHeaderSummary
First-party header-sync summary observed over the authenticated discovery stream.
Fields
peer: ZakuraPeerIdPeer that supplied its own summary.
summary: HeaderSyncServiceSummaryAdvisory header-sync summary for dial/admission preference only.
FullBlockCommitted
State committed a full block.
NewBlockAccepted
The node’s block pipeline accepted an inbound NewBlock body.
Fields
peer: ZakuraPeerIdSource peer.
NewBlockDuplicate
The node’s block pipeline reported an inbound NewBlock was already known.
Fields
peer: ZakuraPeerIdSource peer.
NewBlockAcceptedNonBestChain
The node’s block pipeline accepted an inbound NewBlock body, but it
did not land on the best chain. The block is remembered for dedup only:
a non-best-chain block must not advance the header or verified
frontiers and must not be forwarded to peers, or the whole Zakura layer
gossips a losing branch while the node’s own chain stays on the best
one.
Fields
peer: ZakuraPeerIdSource peer.
NewBlockRejected
The node’s block pipeline rejected an inbound NewBlock body.
SessionWireMessage
Inbound control message from a specific transport session.
WireHeaders
Inbound Headers response with its mandatory request ID.
Fields
peer: ZakuraPeerIdServing peer.
request_id: HeaderSyncRequestIdRequest ID echoed by the peer.
tree_aux_roots: Vec<BlockCommitmentRoots>Per-height commitment roots, parallel to headers.
WireGetHeaders
Inbound GetHeaders request with its mandatory request ID.
Fields
peer: ZakuraPeerIdRequesting peer.
request_id: HeaderSyncRequestIdRequest ID supplied by the peer.
WireDecodeFailed
Header-sync frame decoding failed after handler admission.
Fields
peer: ZakuraPeerIdPeer that sent the malformed frame.
error: Arc<HeaderSyncWireError>Decode/validation error.
WireProtocolFailure
Header-sync protocol failure decoded by the peer-owned session.
Fields
peer: ZakuraPeerIdPeer that sent the invalid message.
reason: HeaderSyncMisbehaviorMisbehavior classification for the protocol failure.
error: Arc<HeaderSyncWireError>Decode/validation error.
StateFrontiersChanged(HeaderSyncFrontiers)
State finalized or verified-body frontiers changed.
VctRootRepairRequested
State needs a bounded re-delivery of VCT supplied roots for a covered height.
Fields
VctRootRepairResolved
State successfully committed the formerly parked VCT height.
HeaderRangeCommitted
State successfully committed a header range.
Fields
HeaderRangeCommitFailed
State rejected a previously requested range.
Fields
peer: ZakuraPeerIdPeer that supplied the failed range.
kind: HeaderSyncCommitFailureKindWhether state rejected peer data or hit a local resource/channel failure.
HeaderRangeResponseFinished
Node wiring finished or abandoned a Headers response to an inbound GetHeaders.
Fields
peer: ZakuraPeerIdPeer whose served-response slot can be released.
request_id: HeaderSyncRequestIdRequest ID supplied by the peer.
HeaderRangeResponseReady
State returned headers requested by a peer and the reactor should send them.
Fields
peer: ZakuraPeerIdPeer whose inbound request is being served.
request_id: HeaderSyncRequestIdRequest ID supplied by the peer.
tree_aux_roots: Vec<BlockCommitmentRoots>Per-height commitment roots, parallel to headers.
Trait Implementations§
Source§impl Clone for HeaderSyncEvent
impl Clone for HeaderSyncEvent
Source§fn clone(&self) -> HeaderSyncEvent
fn clone(&self) -> HeaderSyncEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HeaderSyncEvent
impl !UnwindSafe for HeaderSyncEvent
impl Freeze for HeaderSyncEvent
impl Send for HeaderSyncEvent
impl Sync for HeaderSyncEvent
impl Unpin for HeaderSyncEvent
impl UnsafeUnpin for HeaderSyncEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> 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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.