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.
It also implements the Session negotiation via Start sub-protocol.
See the hopr_transport_session::initiation
module for details on Start sub-protocol.
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 crate::config::HoprTransportConfig;
pub use crate::helpers::PeerEligibility;
pub use crate::helpers::TicketStatistics;
Modules§
- config
- Configuration of the crate::HoprTransport.
- constants
- Constants used and exposed by the crate.
- errors
- Errors used by the crate.
- helpers
- network_
notifier - proxy
- Objects used and possibly exported by the crate for re-use for transport functionality
Structs§
- Application
Data - Represents the received decrypted packet carrying the application-layer data.
- Chain
Keypair - Represents a keypair consisting of a secp256k1 private and public key
- Half
KeyChallenge - Represents a challenge for the half-key in Proof of Relay. Half-key challenge is equivalent to a secp256k1 curve point. Therefore, HalfKeyChallenge can be obtained from a HalfKey.
- Hash
- Represents an Ethereum 256-bit hash value This implementation instantiates the hash via Keccak256 digest.
- Hopr
Transport - Interface into the physical transport mechanism allowing all off-chain HOPR-related tasks on the transport, as well as off-chain ticket manipulation.
- Incoming
Session - Wrapper for incoming Session along with other information extracted from the Start protocol during the session establishment.
- Multiaddr
- Representation of a Multiaddr.
- Network
- The network object storing information about the running observed state of the network, including peers, connection qualities and updates for other parts of the system.
- Offchain
Keypair - Represents a keypair consisting of an Ed25519 private and public key
- Offchain
Public Key - Represents an Ed25519 public key.
- PeerId
- Identifier of a peer of the network.
- Peer
Status - Status of the peer as recorded by a network component.
- Session
- Session
Client Config - Configuration for the session.
- Session
Id - Unique ID of a specific session.
- Ticket
Aggregator Proxy
Enums§
- Health
- Network health represented with colors, where green is the best and red is the worst possible observed nework quality.
- Hopr
Transport Process - Network
Triggered Event - Events generated by the Network object allowing it to physically interact with external systems, including the transport mechanism.
- Peer
Discovery - Processed indexer generated events.
- Peer
Origin - Actual origin.
- Routing
Options - Represents routing options in a mixnet with a maximum number of hops.
- Session
Capability - Capabilities of a session.
- 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
. - Transport
Session Error - Enumeration of errors thrown from this library.
Constants§
- SESSION_
USABLE_ MTU_ SIZE - Inner MTU size of what the HOPR payload can take (payload - peer_id - application_tag)
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.
- SendMsg
Functions§
- execute_
on_ tick - Construct an infinitely running background loop producing ticks with a given period with the maximum tick duration at most the period.
- transfer_
session - Convenience function to copy data in both directions between a Session and arbitrary async IO stream. This function is only available with Tokio and will panic with other runtimes.
Type Aliases§
- Service
Id - Describes a node service target.
These are specialized
SessionTargets
that are local to the Exit node and have different purposes, such as Cover Traffic.