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
8pub mod election;
9mod networking;
10mod node_implementation;
11
12pub use hotshot_libp2p_networking::network::NetworkNodeConfigBuilder;
13pub use hotshot_types::traits::{BlockPayload, ValidatedState};
14pub use networking::{NetworkError, NetworkReliability};
15pub use node_implementation::{NodeImplementation, TestableNodeImplementation};
16
17/// Module for publicly usable implementations of the traits
18pub mod implementations {
19    pub use super::networking::{
20        combined_network::{CombinedNetworks, UnderlyingCombinedNetworks},
21        libp2p_network::{
22            derive_libp2p_keypair, derive_libp2p_multiaddr, derive_libp2p_peer_id, GossipConfig,
23            Libp2pMetricsValue, Libp2pNetwork, PeerInfoVec, RequestResponseConfig,
24        },
25        memory_network::{MasterMap, MemoryNetwork},
26        push_cdn_network::{
27            CdnMetricsValue, KeyPair, ProductionDef, PushCdnNetwork, TestingDef, Topic as CdnTopic,
28            WrappedSignatureKey,
29        },
30    };
31}