Skip to main content

FORMAT_VERSION

Constant FORMAT_VERSION 

pub const FORMAT_VERSION: u16 = 3;
Expand description

The version stamped on every envelope this build encodes, and the only one it decodes.

§What bumping it means

Carried on every message, never negotiated per connection, and version 3 is this envelope and the message set below it (ADR-0097, ADR-0104). It is bumped whenever the shape of any wire type changes: a field added, removed, retyped or moved between types — per-type versioning cannot say VT-30’s move of after into Guard, which changed no single type. Version 3 added a last responder to Pulled and Ack.

§What must never bump it

A change to a capacity bound. That is WF-9’s territory, and it is not this constant’s: an over-capacity value decodes to Ok and is refused by the store that cannot hold it, with an error naming the store. Conflating the two makes every peer in a heterogeneous deployment unreachable the moment one of them raises a limit — the raiser bumps the version, and every peer that has not been redeployed refuses every message from it, including the ones well inside the old bound.