Skip to main content

Module version

Module version 

Source
Expand description

Version-negotiation handshake.

Every connection opens with both sides exchanging a VersionHandshake — their max-supported version + their min- supported version (the floor of their backwards-compat window). Each side then takes min(my_max, their_max) as the negotiated version. If that’s below either side’s min, the connection is refused with a typed error.

Discipline: every breaking change to a wire type bumps MAX_LOCAL_PROTOCOL_VERSION and (if it’s been long enough since the last bump) MIN_LOCAL_PROTOCOL_VERSION. The window in between is the support contract.

Structs§

ArchivedVersionHandshake
An archived VersionHandshake
NegotiatedVersion
Outcome of a successful negotiation.
VersionHandshake
First-frame body each side sends. Carries the peer’s supported version window so the other side can compute the negotiated version (or refuse).
VersionHandshakeResolver
The resolver for an archived VersionHandshake

Constants§

MAX_LOCAL_PROTOCOL_VERSION
Maximum local-protocol version this build can speak.
MIN_LOCAL_PROTOCOL_VERSION
Minimum local-protocol version this build understands. Older peers negotiating below this floor are refused.