Expand description
HoprSession object providing the session functionality over the HOPR transport
The session proxies the user interactions with the transport to hide the advanced interactions and functionality.
The SessionManager allows for automatic management of sessions via the Start protocol.
This crate implements RFC-0007.
Modules§
- balancer 🔒
- counters
- Process-global packet-flow diagnostic counters for the throughput stress harness.
- errors
- flow_
control - HOPR-transport wiring for the Session send-window flow control.
- manager 🔒
- supervision 🔒
- Exit-side PIX supervision: the lifecycle state machine, the egress gate, and the per-session worker that drives them. PIX supervision for incoming PIX-enabled sessions.
- types 🔒
- utils 🔒
Structs§
- Agreed
SsaQuota - Representation of a data quota per SSA agreed upon during the Session establishment.
- Application
Data In - Wrapper for incoming [
ApplicationData] with optional [IncomingPacketInfo]. - Application
Data Out - Wrapper for outgoing [
ApplicationData] with optional [IncomingPacketInfo]. - Atomic
Surb Flow Estimator - An implementation of
SurbFlowEstimatorthat tracks the number of produced and consumed SURBs via twoAtomicU64s. - Balancer
State Values - Runtime state of the
SurbBalancer. - Fill
Rate - A rate at which the Exit originates PIX fill keep-alives.
- Flow
Control Config - Client-tunable flow-control parameters. Defaults are deliberately conservative (anti-grief-preserving): the window starts at the floor and only grows on proven delivery, and the opt-in robustness knobs are off. This is the clean profile.
- Hopr
Session - Represents the Session protocol socket over HOPR.
- Hopr
Session Capabilities - Wrapper for
Capabilitiesthat makes conversion to/fromu8possible. - Hopr
Session Config - Configures the Session protocol socket over HOPR.
- Incoming
Session PixConfig - Configuration of the PIX protocol for incoming Sessions on Exit nodes.
- PixFill
Config - How the Exit fills the return direction of a funded PIX cycle when the application will not.
- PixParams
- Everything about PIX two nodes must agree on for a Session, and the only encoding of it: three dimensions and the curve suite they are dimensions of.
- PixToolbox
- PIX protocol toolbox to enable
SessionManagerto use PIX protocol. - Session
Client Config - Configuration for the session.
- Session
Manager - Manages lifecycles of Sessions.
- Session
Manager Config - Configuration for the
SessionManager. - Supervisor
Config - Configuration for the
SessionPixSupervisor. - Surb
Balancer Config - Configuration for the
SurbBalancer.
Enums§
- Acknowledgement
Mode - Indicates the acknowledgement mode of a stateful Session socket.
- Capability
- Individual capabilities of a Session.
- Closure
Reason - Indicates the closure reason of a
HoprSession. - Destination
Routing - Routing information containing forward or return routing options.
- Dispatch
Result - Indicates the result of processing a message.
- Drop
Reason - Why an inbound session data packet was dropped without being delivered.
- Hopr
Session InPix Event - Events received by the
crate::manager::SessionManagerin reaction to received shares from the packet pipeline. - Hopr
Session OutPix Event - Events raised by the
crate::manager::SessionManagerin response to received PIX messages. - Invalid
PixParams - Why a
PixParamsquadruple was rejected. - IpOr
Host - Implements a host name with port.
This could be either a DNS name with port
or an IP address with port represented by
std::net::SocketAddr. - IpProtocol
- Lists some of the IP protocols.
- Sealed
Host - Contains optionally encrypted
IpOrHost. - Session
Target SessionId,ServiceId, andSessionTargetare provided byhopr-typesand re-exported here viahopr-utils, so they match the publishedhopr-apisession types.
Constants§
- DEFAULT_
MAX_ SSAS_ PER_ SSA_ REQUEST - Default for
SessionManagerConfig::max_ssas_per_ssa_request— how many SSA commitments an Entry accepts in a singleSsaServerCommitmentMessage. - DEFAULT_
PIX_ POLYS_ PER_ SSA - Default number of polynomials (“SSA parts”) a single SSA is split into.
- DEFAULT_
PIX_ SHARES_ PER_ POLY - Default number of shares required to reconstruct a single SSA part.
- DEFAULT_
PIX_ SSA_ QUOTA - Nominal per-SSA data quota implied by the default PIX dimensions.
- DEFAULT_
PIX_ SURPLUS_ SHARES - Default number of shares emitted per SSA part beyond
DEFAULT_PIX_SHARES_PER_POLY. - DEFAULT_
SSAS_ PER_ SSA_ REQUEST - Default for
SupervisorConfig::ssas_per_request— how many SSAs an Exit may ask for in a singleSsaServerCommitmentMessage. It is the maximum in dynamic mode and the exact batch in fixed mode. - DEPOSIT_
DATA_ REQUEST_ TIMEOUT - How long an Exit waits for the deposit pool to answer a
DepositDataRequestbefore sending the batch without what has not arrived. - LOCAL_
PIX_ SUITE - The elliptic curve suite this build instantiates PIX over, as announced to peers.
- MAX_
ASSUMED_ SESSION_ PACKET_ RATE - Fastest return-path rate a Session is assumed to sustain, in packets per second.
- MAX_
OVERLAPPING_ BATCHES - SSA batches whose reconstructor state can be live on the Exit at the same moment.
- MAX_
SSA_ BATCH_ SIZE - Hard ceiling on both SSA batch-size knobs, whatever the configuration says.
- MIN_
BALANCER_ SAMPLING_ INTERVAL - Smallest possible interval for balancer sampling.
- MIN_
SURB_ BUFFER_ DURATION - Minimum time the SURB buffer must endure if no SURBs are being produced.
- PIX_
QUOTA_ BYTES_ PER_ SHARE - Bytes of quota one PIX share is priced at: the Session data the packet it rides on can carry.
- 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§
- IpOr
Host Ext - Runtime-specific extensions for
IpOrHost.
Functions§
- cycle_
budget_ for - What a PIX Session at these dimensions costs the node’s live-cycle budget.
- max_
cycle_ budget_ for_ quota - The largest reservation any offer inside a
quota_rangeending atquota_bytescan produce. - transfer_
session - Bidirectionally copies data between a
HoprSessionand an arbitrary async IO stream. - transfer_
session_ datagram - Bidirectionally copies data between a
HoprSessionand an arbitrary async IO stream. - validate_
incoming_ session_ pix_ config - Validates the incoming-PIX invariants that span quota, supervision and memory settings.
- validate_
pix_ supervision - Validates that
SupervisorConfigandSsaReconstructorConfigare mutually consistent.
Type Aliases§
- Capabilities
- Set of Session capabilities.
- Hopr
Start Protocol - Start protocol instantiation for HOPR.
- Incoming
Session - Wrapper for an incoming
HoprSessioncarrying theSessionIdandSessionTargetextracted from the Start protocol during session establishment. - Service
Id SessionId,ServiceId, andSessionTargetare provided byhopr-typesand re-exported here viahopr-utils, so they match the publishedhopr-apisession types.- Session
Admission Reply - Where a
SessionAdmissionRequest’s answer is delivered. - Session
Admission Sink - How the
SessionManagerreaches whoever decides admission. - Session
Id SessionId,ServiceId, andSessionTargetare provided byhopr-typesand re-exported here viahopr-utils, so they match the publishedhopr-apisession types.