Struct jormungandr::blockchain::process::Process
source · struct Process {
blockchain: Blockchain,
blockchain_tip: Tip,
stats_counter: Metrics,
network_msgbox: MessageBox<NetworkMsg>,
fragment_msgbox: MessageBox<TransactionMsg>,
watch_msgbox: MessageBox<WatchMsg>,
garbage_collection_interval: Duration,
tip_update_mbox: MessageBox<Arc<Ref>>,
pull_headers_scheduler: FireForgetScheduler<HeaderHash, NodeId, Checkpoints>,
get_next_block_scheduler: FireForgetScheduler<HeaderHash, NodeId, ()>,
service_info: TokioServiceInfo,
}
Expand description
The blockchain process is comprised mainly of two parts:
- Bookkeeping of all blocks known to the node: This is the most resource heavy operation but can be parallelized depending on the chain structure.
- Tip selection and update: Tip updates must be serialized to avoid inconsistent states but are very light on resources. No performance penalty should come from this synchronization point.
Fields§
§blockchain: Blockchain
§blockchain_tip: Tip
§stats_counter: Metrics
§network_msgbox: MessageBox<NetworkMsg>
§fragment_msgbox: MessageBox<TransactionMsg>
§watch_msgbox: MessageBox<WatchMsg>
§garbage_collection_interval: Duration
§tip_update_mbox: MessageBox<Arc<Ref>>
§pull_headers_scheduler: FireForgetScheduler<HeaderHash, NodeId, Checkpoints>
§get_next_block_scheduler: FireForgetScheduler<HeaderHash, NodeId, ()>
§service_info: TokioServiceInfo
Implementations§
source§impl Process
impl Process
async fn start( self, input: MessageQueue<BlockMsg>, tip_update_queue: MessageQueue<Arc<Ref>> )
fn handle_input(&mut self, input: BlockMsg)
fn start_garbage_collector(&self, info: &TokioServiceInfo)
Auto Trait Implementations§
impl !RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl !UnwindSafe for Process
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request