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 by
15//! 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
18pub mod config;
19pub mod content;
20mod db_proxy;
21pub mod errors;
22mod neighbors;
23pub mod ping;
24pub mod probe;
25pub mod traits;
26
27pub use crate::{config::ProbeConfig, db_proxy::DbProxy, probe::Probe};
28
29#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, strum::Display)]
30pub enum HoprProbeProcess {
31 #[strum(to_string = "probe emission")]
32 Emit,
33 #[strum(to_string = "probe processing")]
34 Process,
35}