linera_core/lib.rs
1// Copyright (c) Facebook, Inc. and its affiliates.
2// Copyright (c) Zefchain Labs, Inc.
3// SPDX-License-Identifier: Apache-2.0
4
5//! This module defines the core Linera protocol.
6
7#![recursion_limit = "256"]
8#![deny(missing_docs)]
9// We conditionally add autotraits to the traits here.
10#![allow(async_fn_in_trait)]
11
12mod chain_worker;
13pub use chain_worker::{ChainWorkerConfig, ProcessConfirmedBlockMode};
14/// The high-level client for interacting with chains and validators.
15pub mod client;
16pub use client::Client;
17/// Data types exchanged between clients, workers, and validator nodes.
18pub mod data_types;
19pub mod join_set_ext;
20mod local_node;
21/// Traits for communicating with validator nodes.
22pub mod node;
23/// Utilities for notifying subscribers about chain events.
24pub mod notifier;
25mod remote_node;
26/// Helpers for writing tests against the core protocol.
27#[cfg(with_testing)]
28#[path = "unit_tests/test_utils.rs"]
29pub mod test_utils;
30/// The worker that validates and processes blocks and certificates for chains.
31pub mod worker;
32
33pub(crate) mod updater;
34
35pub use local_node::LocalNodeError;
36pub use updater::DEFAULT_QUORUM_GRACE_PERIOD;
37
38pub use crate::join_set_ext::{JoinSetExt, TaskHandle};
39
40/// The execution environment tying together storage, networking, signing, and the wallet.
41pub mod environment;
42/// The genesis configuration describing a network's initial chains and committee.
43pub mod genesis_config;
44pub use environment::{
45 wallet::{self, Wallet},
46 Environment,
47};
48pub use genesis_config::GenesisConfig;
49
50/// The maximum number of entries in a `received_log` included in a `ChainInfo` response.
51// TODO(#4638): Revisit the number.
52pub const CHAIN_INFO_MAX_RECEIVED_LOG_ENTRIES: usize = 20_000;