hopr_transport_probe/lib.rs
1//! The crate provides the probing functionality used by the transport layer
2//! to identify different attributes of possible transport paths in the network.
3//!
4//! The goal of probing is to establish a map with weighted properties that will
5//! allow the caller to optimize transport, verify transport path properties and
6//! lay groundworks for mitigating potential adversarial behavior.
7//!
8//! There are 2 fundamental types of probing:
9//! 1. **Immediate hop probing** - collects telemetry for direct 0-hop neighbors. Such telemetry can be identified and
10//! potentially gamed by an adversary, but it is still useful to identify the basic properties of the most immediate
11//! connection to the neighbor, since in the worst case scenario the mitigation strategy can discard unsuitable
12//! peers.
13//!
14//! 2. **Multi-hop probing** - collects telemetry using a probing mechanism based on looping. A loop is a message sent
15//! by this peer to itself through different pre-selected peers. This probing mechanism can be combined together with
16//! the cover traffic into a single mechanism improving the network view.
17//!
18//!
19//! Probing is fully configurable mechanism and **MAY** be used as a dispersion for the `Cover Traffic`.
20
21pub mod config;
22pub mod content;
23pub mod errors;
24pub mod neighbors;
25pub mod ping;
26pub mod probe;
27pub mod traits;
28pub mod types;
29
30pub use crate::{
31 config::ProbeConfig,
32 content::Message as TrafficReturnedObservation,
33 probe::Probe,
34 traits::TrafficGeneration,
35 types::{NeighborTelemetry, Telemetry},
36};
37
38#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, strum::Display)]
39pub enum HoprProbeProcess {
40 #[strum(to_string = "probe emission")]
41 Emit,
42 #[strum(to_string = "probe processing")]
43 Process,
44}