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        combined_network::{CombinedNetworks, UnderlyingCombinedNetworks},
20        libp2p_network::{
21            derive_libp2p_keypair, derive_libp2p_multiaddr, derive_libp2p_peer_id, GossipConfig,
22            Libp2pMetricsValue, Libp2pNetwork, PeerInfoVec, RequestResponseConfig,
23        },
24        memory_network::{MasterMap, MemoryNetwork},
25        push_cdn_network::{
26            CdnMetricsValue, KeyPair, ProductionDef, PushCdnNetwork, TestingDef, Topic as CdnTopic,
27            WrappedSignatureKey,
28        },
29    };
30}