cfxcore/pos/consensus/
mod.rs

1// Copyright (c) The Diem Core Contributors
2// SPDX-License-Identifier: Apache-2.0
3
4// Copyright 2021 Conflux Foundation. All rights reserved.
5// Conflux is free software and distributed under GNU General Public License.
6// See http://www.gnu.org/licenses/
7
8#![forbid(unsafe_code)]
9
10//! Consensus for the Diem Core blockchain
11//!
12//! The consensus protocol implemented is DiemBFT (based on
13//! [HotStuff](https://arxiv.org/pdf/1803.05069.pdf)).
14
15#![cfg_attr(not(feature = "fuzzing"), deny(missing_docs))]
16#![cfg_attr(feature = "fuzzing", allow(dead_code))]
17
18mod block_storage;
19mod consensusdb;
20mod epoch_manager;
21mod error;
22mod liveness;
23mod logging;
24pub(crate) mod network;
25mod pending_votes;
26mod persistent_liveness_storage;
27mod round_manager;
28mod state_computer;
29mod state_replication;
30#[cfg(any(test, feature = "fuzzing"))]
31mod test_utils;
32mod txn_manager;
33mod util;
34
35/// DiemBFT implementation
36pub mod consensus_provider;
37
38pub use self::network::NetworkTask;
39pub use consensusdb::ConsensusDB;
40#[cfg(feature = "fuzzing")]
41pub use round_manager::round_manager_fuzzing;
42pub use util::TestCommand;