chore(relay)!: make v1 hop opt-in#2785
Open
richard-ramos wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2785 +/- ##
==========================================
- Coverage 81.30% 81.29% -0.02%
==========================================
Files 171 171
Lines 31013 31013
Branches 12 12
==========================================
- Hits 25216 25212 -4
- Misses 5797 5801 +4
🚀 New features to boost your workflow:
|
vladopajic
approved these changes
Jul 8, 2026
gmelodie
approved these changes
Jul 8, 2026
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.
Summary
This PR changes the default relay service codec set so
Relay.new()advertises only circuit relay v2 HOP.Legacy relay v1 HOP remains available, but only when explicitly constructing the relay with
circuitRelayV1 = true.This is needed because relay v1 HOP currently bridges raw streams and does not apply the relay v2 data/duration limits. Previously, enabling the default relay service exposed that legacy path implicitly, even when users intended to run the bounded v2 relay.
Affected Areas
Circuit relay service protocol advertisement.
Impact on Library Users
This is a breaking behavior change for users relying on default
Relay.new()to serve relay v1 HOP. Those users must opt in withRelay.new(circuitRelayV1 = true).Users relying on the default v2 relay behavior continue to get v2 HOP.
Risk Assessment
The main compatibility risk is for peers or deployments that still expect a default relay service to support v1 HOP. The change reduces accidental exposure of legacy v1 circuits when users intended to run the default v2 relay service.