Skip to content

moq-lite-05: revert Hop ID to varint; reserve 0 as Unknown#41

Merged
kixelated merged 1 commit into
mainfrom
claude/silly-dewdney-dc98e1
Jun 25, 2026
Merged

moq-lite-05: revert Hop ID to varint; reserve 0 as Unknown#41
kixelated merged 1 commit into
mainfrom
claude/silly-dewdney-dc98e1

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Reverts the Hop ID wire encoding back to a variable-length integer and reserves 0 as a sentinel.

Changes

  • Hop ID (ANNOUNCE_OK, ANNOUNCE_BROADCAST) and Exclude Hop (ANNOUNCE_REQUEST): fixed-width (64) → varint (i), dropping the fixed-width rationale text.
  • Reserve 0 as "unknown": an assigned Hop ID MUST be non-zero. 0 now unambiguously marks a hop that was either never assigned (e.g. bridging from an older protocol version) or one a relay deliberately withholds to obscure the underlying routing.

Since Hop IDs are random, reserving 0 removes the (vanishing but real) chance an assigned ID collides with the unknown sentinel.

🤖 Generated with Claude Code

Hop ID (ANNOUNCE_OK, ANNOUNCE_BROADCAST) and Exclude Hop
(ANNOUNCE_REQUEST) go back to varint encoding from fixed 64-bit.
Reserve the value 0 to mean "unknown": an assigned Hop ID MUST be
non-zero, so 0 unambiguously marks a hop that was never assigned
(e.g. bridging from an older version) or one a relay withholds to
obscure the underlying routing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kixelated kixelated merged commit 0b5b126 into main Jun 25, 2026
2 checks passed
@kixelated kixelated deleted the claude/silly-dewdney-dc98e1 branch June 25, 2026 20:42
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The draft updates ANNOUNCE_REQUEST, ANNOUNCE_OK, and ANNOUNCE_BROADCAST hop identifier fields from fixed-width 64-bit encoding to variable-length integer encoding. It also changes the described meaning of Hop ID 0 to a reserved unknown/withheld value in ANNOUNCE_OK and ANNOUNCE_BROADCAST, while keeping Hop Count inclusive of unknown hops. The changelog entry describing fixed-width hop ID encoding is removed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main wire-encoding change and the new reserved 0 sentinel.
Description check ✅ Passed The description matches the PR scope, describing the varint encoding changes and the reserved 0 unknown value.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/silly-dewdney-dc98e1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant