Skip to content

Wire Compatibility ​

DSM runtime sync supports rolling upgrades across a bounded wire-version window. Current dsm-sync services advertise:

FieldValue
minimum supported wire version2
maximum supported wire version4
preferred peer-to-peer wire version4

Send Rules ​

  • Legacy broadcast traffic uses the minimum supported version, currently 2.
  • Peer-targeted traffic uses the highest negotiated common version, capped by the local preferred version.
  • Batch register delta broadcasts use wire version 4 only when delta coalescing is enabled and every active peer advertises both wire-version 4 support and the batch-delta-sync capability.
  • Peers that do not advertise min_wire_version and max_wire_version are treated as 2/2.

Capability Advertisement ​

CapabilityAdvertisement carries three forms of the capability set:

FieldTypePurpose
capability_bitsbytesLegacy packed byte mask.
capability_namerepeated stringHuman-readable compatibility form.
capability_bits_v2uint64Preferred fixed-width mask for current peers.

Readers consume capability state in this order: capability_bits_v2, then capability_bits, then capability_name.

Advertised Capabilities ​

BitWire nameFeature
0runtimeBaseline runtime v2 protocol.
1collection-routingCollection-addressed routing.
2descriptor-advertisementCollection descriptor advertisement.
3register-delta-syncRegister delta replication.
4lease-controlLease collection management.
5verify-currentVerify-current lease fencing check.
6fencing-rejectFencing-based write rejection.
7reliable-data-planeReliable data-plane transport.
8snapshot-streamingSnapshot-based repair.
9crdt-delta-syncCRDT delta replication.
10batch-delta-syncBatched register delta broadcasts.
11suspicion-protocolSWIM-style suspicion before FAILED.
12proactive-anti-entropyBackground anti-entropy sweep.
13payload-encryptionPer-envelope AEAD payload encryption.
14conflict-resolverPluggable per-collection conflict resolver.
15adaptive-repairEWMA-based adaptive snapshot/replay planner.

Capabilities 11-15 are informational. They describe active runtime features but do not directly downgrade send paths.

Trace Context Fields ​

PlatformEnvelope can carry optional W3C trace context:

FieldNumberMeaning
trace_parent21W3C traceparent from the current TraceContextHolder.
trace_state22Optional W3C tracestate.

Older peers ignore these fields through protobuf unknown-field tolerance. No wire-version gate is required.

Compatibility Matrix ​

Local nodeRemote nodeTraffic kindSelected versionOutcome
v2-onlyv2-onlyany2works
v4-capablev2-onlylegacy broadcast2works
v4-capablev2-onlytargeted2works
v4-capablev3-capabletargeted3works
v4-capablev4-capable without batch-delta-syncregister broadcast2legacy delta sync
v4-capablev4-capable with batch-delta-synccoalesced register broadcast4batch delta sync
current nodepeer < 2inboundn/adropped as too old
current nodepeer > 4inboundn/adropped as too new

Digest Encoding ​

Wire versionDigest behavior
2Legacy per-entry digest list.
3Compact digest with aggregate hash and bucket hashes.
4Same compact digest plus batch register delta envelopes when enabled.

Rollout Guidance ​

  1. Deploy nodes that understand versions 2 through 4.
  2. Allow capability advertisements to propagate.
  3. Let targeted traffic negotiate higher common versions automatically.
  4. Keep legacy broadcasts on version 2 while mixed-version peers exist.
  5. Enable dsm.sync.delta-coalescing.enabled=true only after every active peer advertises version 4 and batch-delta-sync.