Skip to main content

ALPN

Constant ALPN 

Source
pub const ALPN: &[u8] = b"/iroh/n0des/1";
Expand description

The main ALPN for connecting from the client to the cloud node.

§Versioning

The wire protocol is append-only and does not bump this ALPN for additive changes. postcard encodes enum variants by index, so as long as new IrohServicesProtocol and RemoteError variants are only appended (never inserted, reordered, or removed), older messages stay wire-compatible:

  • An older client always works against a newer server: the server decodes every request the client can send, and only replies with error variants the client already knows.
  • A newer client against an older server keeps working for the pre-existing requests (auth, metrics, and so on); a request the old server does not know fails as a per-request error rather than breaking the connection.

The cloud node is deployed at or ahead of the clients that talk to it, so the second case is transient and limited to the new calls. A breaking change (reordering or removing variants, or changing a message’s shape) requires a new ALPN.