Skip to main content

Crate linera_chain

Crate linera_chain 

Source
Expand description

This module manages the state of a Linera chain, including cross-chain communication.

Modules§

block
Block types and the wrappers that pair them with their execution outcomes.
data_types
Data types exchanged while proposing, voting on, and confirming blocks.
justification
Fault attributability
manager
Chain manager
test
Test utilities
types
Convenience re-exports of the public block and certificate types.

Structs§

ChainIdSet
A set of fully-tracked chains. Wrapped in Hashed (as Hashed<ChainIdSet>) so the hash that identifies the set — stored in ChainStateView::outbox_index_tracked_hash to detect when the outbox indices must be reconciled — is computed once when the tracked set changes rather than on every cross-chain operation. The hash is order-independent because BTreeSet iterates in sorted order.
ChainStateView
A view accessing the state of a chain.
ChainTipState
Block-chaining state.
StreamCounts
The event indices we track for a stream, maintained whenever a block is processed (executed or merely preprocessed).

Enums§

BlockExecutionPhase
The protocol phase a block is executed in. Recorded as the phase label on the block-execution metrics so the three distinct paths — staging a proposal, validating a received proposal, and committing a confirmed certificate — are separate time series in Prometheus.
ChainError
An error that occurred while validating or executing a block on a chain.
ChainExecutionContext
The phase of block execution during which an error occurred.

Traits§

ExecutionResultExt
Extension trait for attaching a ChainExecutionContext to an execution error.