pub const REPLICATION_PROTOCOL_ID: &str = "autonomi.ant.replication.v2";Expand description
Protocol identifier for replication operations.
Bumped to v2 for the v12 storage-bound audit. That change extends the
wire types (NeighborSyncRequest/Response carry an optional trailing
StorageCommitment, and the gossip-triggered storage-commitment audit adds
the SubtreeAuditChallenge/SubtreeAuditResponse and SubtreeByteChallenge/
SubtreeByteResponse messages). The bump is for SEMANTIC interop, not
decode failure: postcard tolerates the appended optional field (an old
decoder reads the fields it knows and ignores the trailer — pinned by the
old_decoder_tolerates_new_neighbor_sync_* tests in protocol.rs), but
tolerating bytes is not interoperating. A v1 node cannot decode the NEW
message variants at all (unknown enum discriminant) and never acts on a
piggybacked commitment, so mixed-version replication would half-function —
audit challenges unanswered, commitments silently dropped — and a v2 node
could read that silence as misbehaviour. Rather than reason about each
such case, we route v12 replication on a distinct protocol id: a node only
delivers messages whose topic matches its own id (see the topic check in
mod.rs), so v1 and v2 nodes simply do not exchange replication traffic
during a mixed-version window. This is the rollout-safe behaviour: no
half-interpreted exchange, no spurious eviction. Replication between
matched-version peers is unaffected. (DHT routing/lookups are a separate
protocol and continue to span both versions.)