moq-lite-05: revert Hop ID to varint; reserve 0 as Unknown#41
Merged
Conversation
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>
|
Caution Review failedPull request was closed or merged during review WalkthroughThe 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)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reverts the Hop ID wire encoding back to a variable-length integer and reserves
0as a sentinel.Changes
(64)→ varint(i), dropping the fixed-width rationale text.0as "unknown": an assigned Hop ID MUST be non-zero.0now 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
0removes the (vanishing but real) chance an assigned ID collides with the unknown sentinel.🤖 Generated with Claude Code