Skip to content

Commit 204d7c9

Browse files
kixelatedclaude
andauthored
moq-lite-04: explicit hop IDs and exclude hop filter (#21)
* moq-lite-04: explicit hop IDs and exclude hop filter - Replace ANNOUNCE `Hops` count with explicit `Hop Count` + `Hop ID` list for relay loop detection. - Add `Exclude Hop` field to ANNOUNCE_PLEASE so relays can filter out announces that passed through themselves. - Hop ID 0 reserved for unknown hops (bridging from older versions). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * moq-lite-04: clarify hop tracking semantics and fix editorial issues Strengthen ANNOUNCE hop tracking: add MUST-level validation for Hop Count matching Hop ID entries, require relays to append Hop IDs when forwarding, and clarify Hop ID value 0 vs Hop Count value 0 semantics. Also fix grammar ("An series" → "A series"), a duplicate "section" word, and invalid BCP 14 keyword "SHOULD BE". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 95a28c2 commit 204d7c9

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

draft-lcurley-moq-lite.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ moq-lite consists of:
6565

6666
- **Session**: An established QUIC connection between a client and server.
6767
- **Broadcast**: A collection of Tracks from a single publisher.
68-
- **Track**: An series of Groups, each of which can be delivered and decoded *out-of-order*.
69-
- **Group**: An series of Frames, each of which must be delivered and decoded *in-order*.
68+
- **Track**: A series of Groups, each of which can be delivered and decoded *out-of-order*.
69+
- **Group**: A series of Frames, each of which must be delivered and decoded *in-order*.
7070
- **Frame**: A sized payload of bytes within a Group.
7171

7272
The application determines how to split data into broadcast, tracks, groups, and frames.
@@ -133,7 +133,7 @@ The contents are opaque to the moq-lite layer.
133133

134134
# Flow
135135
This section outlines the flow of messages within a moq-lite session.
136-
See the section for Messages section for the specific encoding.
136+
See the Messages section for the specific encoding.
137137

138138
## Connection
139139
moq-lite runs on top of WebTransport.
@@ -319,7 +319,7 @@ Group age is computed relative to the latest group by sequence number.
319319
A group is never expired until at least the next group (by sequence number) has been received or queued.
320320
Once a newer group exists, a group is considered expired if the time between its arrival and the latest group's arrival exceeds `Max Latency`.
321321
The arrival time is when the first byte of a group is received (subscriber) or queued (publisher).
322-
An expired group SHOULD BE reset at the QUIC level to avoid consuming flow control.
322+
An expired group SHOULD be reset at the QUIC level to avoid consuming flow control.
323323

324324
## Unidirectional Streams
325325
Unidirectional streams are used for data transmission.
@@ -374,12 +374,17 @@ A subscriber sends an ANNOUNCE_INTEREST message to indicate it wants to receive
374374
ANNOUNCE_INTEREST Message {
375375
Message Length (i)
376376
Broadcast Path Prefix (s),
377+
Exclude Hop (i),
377378
}
378379
~~~
379380

380381
**Broadcast Path Prefix**:
381382
Indicate interest for any broadcasts with a path that starts with this prefix.
382383

384+
**Exclude Hop**:
385+
If non-zero, the publisher SHOULD skip ANNOUNCE messages for broadcasts whose Hop ID entries contain this value.
386+
This is used by relays to avoid routing loops in a cluster.
387+
383388
The publisher MUST respond with ANNOUNCE messages for any matching and active broadcasts, followed by ANNOUNCE messages for any future updates.
384389
Implementations SHOULD consider reasonable limits on the number of matching broadcasts to prevent resource exhaustion.
385390

@@ -397,7 +402,8 @@ ANNOUNCE Message {
397402
Message Length (i)
398403
Announce Status (i),
399404
Broadcast Path Suffix (s),
400-
Hops (i),
405+
Hop Count (i),
406+
Hop ID (i) ...,
401407
}
402408
~~~
403409

@@ -410,10 +416,16 @@ A flag indicating the announce status.
410416
**Broadcast Path Suffix**:
411417
This is combined with the broadcast path prefix to form the full broadcast path.
412418

413-
**Hops**:
414-
The number of hops from the origin publisher.
415-
This is used as a tiebreaker when there are multiple paths to the same broadcast.
416-
A relay SHOULD increment this value when forwarding an announcement.
419+
**Hop Count**:
420+
The number of Hop ID entries that follow.
421+
A value of 0 means no Hop ID entries are present, indicating a fully unknown path (e.g. the announcement originated locally or was received from a peer that does not support hop tracking).
422+
A receiver MUST close the stream with a PROTOCOL_VIOLATION if the Hop Count does not match the number of subsequent Hop ID entries.
423+
424+
**Hop ID**:
425+
A unique identifier for each relay in the path from the origin publisher.
426+
Each relay MUST append its own Hop ID and increment the Hop Count when forwarding an announcement, even if no prior Hop ID entries are present (e.g. when receiving from an older protocol version).
427+
The Hop Count is used as a tiebreaker when there are multiple paths to the same broadcast.
428+
A Hop ID value of 0 indicates an unknown or bridged relay hop (e.g. when bridging from an older protocol version that does not assign Hop IDs); the Hop Count still reflects the total number of entries including unknown hops.
417429

418430

419431
## SUBSCRIBE
@@ -646,6 +658,8 @@ A generic library or relay MUST NOT inspect or modify the contents unless otherw
646658
# Appendix A: Changelog
647659

648660
## moq-lite-04
661+
- ANNOUNCE `Hops` count replaced with explicit `Hop ID` list for loop detection.
662+
- Added `Exclude Hop` to ANNOUNCE_PLEASE for relay loop avoidance.
649663
- Added GOAWAY stream for graceful session shutdown and migration.
650664
- Renamed ANNOUNCE_PLEASE to ANNOUNCE_INTEREST.
651665
- Added RTT to PROBE message. Bitrate and RTT use 0 for unknown.

0 commit comments

Comments
 (0)