hotshot/
traits.rs

1// Copyright (c) 2021-2024 Espresso Systems (espressosys.com)
2// This file is part of the HotShot repository.
3
4// You should have received a copy of the MIT License
5// along with the HotShot repository. If not, see <https://mit-license.org/>.
6
7/// Sortition trait
8mod networking;
9mod node_implementation;
10
11pub use hotshot_libp2p_networking::network::NetworkNodeConfigBuilder;
12pub use hotshot_types::traits::{BlockPayload, ValidatedState};
13pub use networking::{NetworkError, NetworkReliability};
14pub use node_implementation::{NodeImplementation, TestableNodeImplementation};
15
16/// Module for publicly usable implementations of the traits
17pub mod implementations {
18    pub use super::networking::{
19        Cliquenet, CompatNetwork,
20        combined_network::{CombinedNetworks, UnderlyingCombinedNetworks},
21        libp2p_network::{
22            GossipConfig, Libp2pMetricsValue, Libp2pNetwork, PeerInfoVec, RequestResponseConfig,
23            derive_libp2p_keypair, derive_libp2p_multiaddr, derive_libp2p_peer_id,
24        },
25        memory_network::{MasterMap, MemoryNetwork},
26        push_cdn_network::{
27            CdnMetricsValue, KeyPair, ProductionDef, PushCdnNetwork, TestingDef, Topic as CdnTopic,
28            WrappedSignatureKey,
29        },
30    };
31}