Wire Compatibility
DSM runtime sync supports rolling upgrades across a bounded wire-version window. Current dsm-sync services advertise:
| Field | Value |
|---|---|
| minimum supported wire version | 2 |
| maximum supported wire version | 4 |
| preferred peer-to-peer wire version | 4 |
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
4only when delta coalescing is enabled and every active peer advertises both wire-version4support and thebatch-delta-synccapability. - Peers that do not advertise
min_wire_versionandmax_wire_versionare treated as2/2.
Capability Advertisement
CapabilityAdvertisement carries three forms of the capability set:
| Field | Type | Purpose |
|---|---|---|
capability_bits | bytes | Legacy packed byte mask. |
capability_name | repeated string | Human-readable compatibility form. |
capability_bits_v2 | uint64 | Preferred fixed-width mask for current peers. |
Readers consume capability state in this order: capability_bits_v2, then capability_bits, then capability_name.
Advertised Capabilities
| Bit | Wire name | Feature |
|---|---|---|
| 0 | runtime | Baseline runtime v2 protocol. |
| 1 | collection-routing | Collection-addressed routing. |
| 2 | descriptor-advertisement | Collection descriptor advertisement. |
| 3 | register-delta-sync | Register delta replication. |
| 4 | lease-control | Lease collection management. |
| 5 | verify-current | Verify-current lease fencing check. |
| 6 | fencing-reject | Fencing-based write rejection. |
| 7 | reliable-data-plane | Reliable data-plane transport. |
| 8 | snapshot-streaming | Snapshot-based repair. |
| 9 | crdt-delta-sync | CRDT delta replication. |
| 10 | batch-delta-sync | Batched register delta broadcasts. |
| 11 | suspicion-protocol | SWIM-style suspicion before FAILED. |
| 12 | proactive-anti-entropy | Background anti-entropy sweep. |
| 13 | payload-encryption | Per-envelope AEAD payload encryption. |
| 14 | conflict-resolver | Pluggable per-collection conflict resolver. |
| 15 | adaptive-repair | EWMA-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:
| Field | Number | Meaning |
|---|---|---|
trace_parent | 21 | W3C traceparent from the current TraceContextHolder. |
trace_state | 22 | Optional W3C tracestate. |
Older peers ignore these fields through protobuf unknown-field tolerance. No wire-version gate is required.
Compatibility Matrix
| Local node | Remote node | Traffic kind | Selected version | Outcome |
|---|---|---|---|---|
| v2-only | v2-only | any | 2 | works |
| v4-capable | v2-only | legacy broadcast | 2 | works |
| v4-capable | v2-only | targeted | 2 | works |
| v4-capable | v3-capable | targeted | 3 | works |
| v4-capable | v4-capable without batch-delta-sync | register broadcast | 2 | legacy delta sync |
| v4-capable | v4-capable with batch-delta-sync | coalesced register broadcast | 4 | batch delta sync |
| current node | peer < 2 | inbound | n/a | dropped as too old |
| current node | peer > 4 | inbound | n/a | dropped as too new |
Digest Encoding
| Wire version | Digest behavior |
|---|---|
2 | Legacy per-entry digest list. |
3 | Compact digest with aggregate hash and bucket hashes. |
4 | Same compact digest plus batch register delta envelopes when enabled. |
Rollout Guidance
- Deploy nodes that understand versions
2through4. - Allow capability advertisements to propagate.
- Let targeted traffic negotiate higher common versions automatically.
- Keep legacy broadcasts on version
2while mixed-version peers exist. - Enable
dsm.sync.delta-coalescing.enabled=trueonly after every active peer advertises version4andbatch-delta-sync.