Skip to main content

Crate linera_core

Crate linera_core 

Source
Expand description

This module defines the core Linera protocol.

The consensus protocol it drives is specified and proved correct in the linera-spec crate, which indexes both halves of the argument: safety and accountability in linera_chain, and progress and liveness in proof, next to the client code that discharges them.

Re-exports§

pub use client::Client;
pub use crate::join_set_ext::JoinSetExt;
pub use crate::join_set_ext::TaskHandle;
pub use environment::wallet;
pub use environment::wallet::Wallet;
pub use environment::Environment;
pub use genesis_config::GenesisConfig;

Modules§

client
The high-level client for interacting with chains and validators.
data_types
Data types exchanged between clients, workers, and validator nodes.
environment
The execution environment tying together storage, networking, signing, and the wallet. The runtime environment (storage, network, signer and wallet) used by the client.
genesis_config
The genesis configuration describing a network’s initial chains and committee.
join_set_ext
An extension trait to allow determining at compile time how tasks are spawned on the Tokio runtime.
node
Traits for communicating with validator nodes.
notifier
Utilities for notifying subscribers about chain events.
proof
The progress and liveness half of the microchain consensus correctness specification.
remote_node
A validator node paired with the validator’s public key.
test_utils
Helpers for writing tests against the core protocol.
worker
The worker that validates and processes blocks and certificates for chains.

Structs§

BlockExportConfig
Configuration for pushing executed blocks to the other committee validators.
BlockExportHandle
The chain workers’ end of the export queue: hands blocks over and reads back progress.
ChainWorkerConfig
Configuration parameters for the chain worker and its owning WorkerState.

Enums§

LocalNodeError
Error type for the operations on a local node.
ProcessConfirmedBlockMode
How to handle a confirmed block.

Constants§

CHAIN_INFO_MAX_RECEIVED_LOG_ENTRIES
The maximum number of entries in a received_log included in a ChainInfo response.
DEFAULT_QUORUM_GRACE_PERIOD
The default amount of time we wait for additional validators to contribute to the result, as a fraction of how long it took to reach a quorum.

Functions§

init_metrics
Registers every metric this crate declares.
spawn_block_export_queue
Spawns the process-wide export queue task and returns the handle chain workers push to.