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§
- Archived
Version Handshake - An archived
VersionHandshake - Negotiated
Version - Outcome of a successful negotiation.
- Version
Handshake - First-frame body each side sends. Carries the peer’s supported version window so the other side can compute the negotiated version (or refuse).
- Version
Handshake Resolver - 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.