Skip to main content

Crate hns_light_p2p

Crate hns_light_p2p 

Source
Expand description

Bounded standard Handshake P2P session for light clients.

The state machine is runtime independent: socket adapters exchange hns-p2p-wire frames and provide an explicit clock. Only standard HSD version/verack, ping/pong, headers, name-proof, and wallet-filter traffic is admitted here. Chain and wallet evidence remains authoritative only after local verification. Experimental HIP sessions remain separate.

Structs§

ExpiredRequests
Requests that exceeded their explicit deadline.
PeerConfig
Standard-peer session bounds and admission.
PeerConnection
One standard peer session bound to a blocking byte stream.
PeerMetadata
Admitted remote version metadata.
PeerSession
One bounded standard HSD peer session.

Enums§

PeerError
Standard peer handshake, correlation, or deadline failure.
PeerEvent
Event emitted by one admitted inbound frame.
PeerState
Peer session phase.
RequestKind
Response-bearing request category.
WalletPeerEvent
Standard wallet traffic admitted after version/verack.

Constants§

DEFAULT_HANDSHAKE_TIMEOUT_SECONDS
Default complete version/verack deadline.
DEFAULT_MAX_CLOCK_SKEW_SECONDS
Default maximum peer wall-clock skew.
DEFAULT_REQUEST_TIMEOUT_SECONDS
Default header/proof/ping response deadline.
MAX_PENDING_PEER_FRAMES
Maximum decoded frames retained between caller polls.
PEER_READ_BUFFER_SIZE
Bounded stack read used by the standard stream adapter.

Functions§

light_wallet_version
Construct the standard version packet for a non-serving light wallet.