Add compact telemetry schema V2 for storage efficiency #7
+466
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a V2 telemetry schema to address storage inefficiencies (60-80% reduction expected) while preserving wire compatibility with existing V1 format.
Changes
New proto file:
proto/telemetry/v1/telemetry_compact.protobase_time_unix_nanos+ typed metadata (server_id, mode, level); deltas from base per-frame instead of repeatedTimestampsint32 delta_nanosfrom base time (±2.1s range, ~11ms/frame typical)float32with packed encoding for all vectors (disc position/velocity, game state); enums for pause_state and match_typechanged_maskbitmask (little-endian bit ordering); translations (3×N floats), orientations (4×N quaternions)Storage Impact
Usage
Wire Compatibility
Existing
Envelope,TelemetryHeader,LobbySessionStateFrameremain unchanged. Consumers can adopt V2 progressively alongside V1.Out of Scope
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
buf.build/tmp/buf /tmp/buf lint(dns block)esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Goal
Add a compact telemetry schema (V2) alongside existing telemetry to
address storage inefficiencies without breaking wire compatibility.
Primary inefficiencies observed
LobbySessionStateFrame. Solution: base time in header + per-frame delta
varint.
static or infrequently changing. Solution: split static vs dynamic;
static in header; dynamic in frames; or use change events.
Solution: float32 and/or quantization (packed repeated) in compact
messages.
team_name, weapon/ordnance/tac_mod, etc.). Solution: enums or ID table
in header.
with bitmask of changed indices; store float32.
typed fields and keep a small extra map.
Scope of this PR
numbers of existing messages. Keep existing telemetry intact.
LobbySessionStateFrameV2.
bones.
adopt V2 progressively.
Acceptance criteria
Proposed changes (new file)