Enum lumina_node::events::NodeEvent
source · #[non_exhaustive]pub enum NodeEvent {
Show 17 variants
ConnectingToBootnodes,
PeerConnected {
id: PeerId,
trusted: bool,
},
PeerDisconnected {
id: PeerId,
trusted: bool,
},
SamplingStarted {
height: u64,
square_width: u16,
shares: Vec<(u16, u16)>,
},
ShareSamplingResult {
height: u64,
square_width: u16,
row: u16,
column: u16,
accepted: bool,
},
SamplingFinished {
height: u64,
accepted: bool,
took: Duration,
},
FatalDaserError {
error: String,
},
AddedHeaderFromHeaderSub {
height: u64,
},
FetchingHeadHeaderStarted,
FetchingHeadHeaderFinished {
height: u64,
took: Duration,
},
FetchingHeadersStarted {
from_height: u64,
to_height: u64,
},
FetchingHeadersFinished {
from_height: u64,
to_height: u64,
took: Duration,
},
FetchingHeadersFailed {
from_height: u64,
to_height: u64,
error: String,
took: Duration,
},
FatalSyncerError {
error: String,
},
PrunedHeaders {
to_height: u64,
},
FatalPrunerError {
error: String,
},
NetworkCompromised,
}Expand description
The events that Node can generate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConnectingToBootnodes
Node is connecting to bootnodes
PeerConnected
Peer just connected
PeerDisconnected
Peer just disconnected
SamplingStarted
Sampling just started.
Fields
The coordinates of the shares that will be sampled.
A share was sampled.
SamplingFinished
Sampling just finished.
Fields
FatalDaserError
Data sampling fatal error.
AddedHeaderFromHeaderSub
A new header was added from HeaderSub.
FetchingHeadHeaderStarted
Fetching header of network head just started.
FetchingHeadHeaderFinished
Fetching header of network head just finished.
FetchingHeadersStarted
Fetching headers of a specific block range just started.
FetchingHeadersFinished
Fetching headers of a specific block range just finished.
Fields
FetchingHeadersFailed
Fetching headers of a specific block range just failed.
Fields
FatalSyncerError
Header syncing fatal error.
PrunedHeaders
Pruned headers up to and including specified height.
FatalPrunerError
Pruning fatal error.
NetworkCompromised
Network was compromised.
This happens when a valid bad encoding fraud proof is received. Ideally it would never happen, but protection needs to exist. In case of compromised network, syncing and data sampling will stop immediately.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeEvent
impl RefUnwindSafe for NodeEvent
impl Send for NodeEvent
impl Sync for NodeEvent
impl Unpin for NodeEvent
impl UnwindSafe for NodeEvent
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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