Expand description
The crate aggregates and composes individual transport level objects and functionality
into a unified crate::HoprTransport object with the goal of isolating the transport layer
and defining a fully specified transport API.
See also the hopr_protocol_start crate for details on Start sub-protocol which initiates a Session.
As such, the transport layer components should be only those that are directly necessary to:
- send and receive a packet, acknowledgement or ticket aggregation request
- send and receive a network telemetry request
- automate transport level processes
- algorithms associated with the transport layer operational management
- interface specifications to allow modular behavioral extensions
Re-exports§
pub use stats::PeerPacketStats;pub use crate::config::HoprProtocolConfig;pub use crate::stats::PeerPacketStatsSnapshot;pub use hopr_transport_session as session;pub use hopr_api as api;
Modules§
- config
- Configuration of the crate::HoprTransport.
- constants
- Constants used and exposed by the crate.
- errors
- Errors used by the crate.
- socket
- stats
Structs§
- Application
Data - Represents the to-be-sent or received decrypted packet carrying the application-layer data.
- Application
Data In - Wrapper for incoming
ApplicationDatawith optional [IncomingPacketInfo]. - Application
Data Out - Wrapper for outgoing
ApplicationDatawith optional [IncomingPacketInfo]. - Chain
Keypair - Represents a keypair consisting of a secp256k1 private and public key
- Channel
Ticket Statistics - Contains ticket statistics for one or more channels.
- Half
KeyChallenge - Represents a challenge for the half-key in Proof of Relay.
- Hopr
Session - Represents the Session protocol socket over HOPR.
- Hopr
Transport - Interface into the physical transport mechanism allowing all off-chain HOPR-related tasks on the transport.
- Incoming
Session - Wrapper for incoming
HoprSessionalong with other information extracted from the Start protocol during the session establishment. - Multiaddr
- Representation of a Multiaddr.
- Neighbor
Telemetry - Intermediate neighbor telemetry object.
- Offchain
Keypair - Represents a keypair consisting of an Ed25519 private and public key
- Offchain
Public Key - Represents an Ed25519 public key.
- Path
Telemetry - Path telemetry data for multi-hop loopback probing.
- PeerId
- Identifier of a peer of the network.
- Ping
Query Replier - Helper object allowing to send a ping query as a wrapped channel combination
that can be filled up on the transport part and awaited locally by the
Pinger. - Session
Client Config - Configuration for the session.
- Session
Id - Unique ID of a specific Session in a certain direction.
- Session
Lifetime Snapshot - Snapshot of session lifetime metrics.
- Session
Metric Definition - Session
Metric Sample - Session
Stats Snapshot - Complete snapshot of all session metrics at a point in time.
- Surb
Balancer Config - Configuration for the
SurbBalancer.
Enums§
- Health
- Network health represented with colors, where green is the best and red is the worst possible observed network quality.
- Hopr
Transport Process - Probe
Error - Protocol
Protocoldescribes all possible multiaddress protocols.- Routing
Options - Represents routing options in a mixnet with a maximum number of hops.
- Session
AckMode - The acknowledgement mode configured for the session.
- Session
Capability - Individual capabilities of a Session.
- Session
Lifecycle State - The lifecycle state of a session from the perspective of metrics.
- Session
Manager Error - Session
Metric Kind - Session
Metric Value - Session
Target - Defines what should happen with the data at the recipient where the
data from the established session are supposed to be forwarded to some
target. - Tag
- Tags distinguishing different application-layer protocols.
- Ticket
Event - Ticket events emitted from the packet processing pipeline.
- Transport
Session Error - Enumeration of errors thrown from this library.
Constants§
- APPLICATION_
TAG_ RANGE - SESSION_
MTU - Number of bytes that can be sent in a single Session protocol payload.
- SURB_
SIZE - Size of the HOPR SURB in bytes.
Traits§
- Keypair
- Represents a generic key pair The keypair contains a private key and public key. Must be comparable in constant time and zeroized on drop.
- Network
View - Trait representing a read-only view of the network state.
Functions§
- peer_
id_ to_ public_ key - PeerId -> OffchainPublicKey is a CPU-intensive blocking operation.
- session_
snapshot_ metric_ definitions - session_
snapshot_ metric_ samples - session_
snapshot_ metric_ value - session_
telemetry_ snapshots - transfer_
session - Convenience function to copy data in both directions between a
Sessionand arbitrary async IO stream. This function is only available with Tokio and will panic with other runtimes.
Type Aliases§
- Hash
- Represents an Ethereum 256-bit hash value.
- Hopr
Pseudonym - Alias for the
Pseudonymused in the HOPR protocol. - Service
Id - Describes a node service target.
These are specialized
SessionTargetsthat are local to the Exit node and have different purposes, such as Cover Traffic. - Session
Capabilities - Set of Session capabilities.