One sentence in NIP-01 that helps resolves a huge issue with relay connection management.#2307
Open
dskvr wants to merge 2 commits intonostr-protocol:masterfrom
Open
One sentence in NIP-01 that helps resolves a huge issue with relay connection management.#2307dskvr wants to merge 2 commits intonostr-protocol:masterfrom
dskvr wants to merge 2 commits intonostr-protocol:masterfrom
Conversation
Member
|
I agree with you but I don't think anyone will read this. I don't think anyone ever intended to accept connections to multiple paths, they do it by ommission because libraries do that automatically. My own relay, for example, I don't even know if it works like this or not. I think we would gain more by having strfry reject any subpath connections by default. |
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.
The one sentence:
Rationale
wss://relay.damus.io/<insert_any_random_string>is the exact same relay aswss://relay.damus.io/.Facts:
wss://relay.damus.io/<insert_any_random_string>establishes a relay connection and conforms to the protocolProblem:
The ambiguity of relay URLs is a real problem that has always plagued clients. It’s difficult to track and even harder to mitigate. It also creates a tangible attack surface: clients may end up in situations where a large portion of their relay connections actually resolve to just a handful of relays.
String-based de-duplication
Clients all handle this differently, while most either ignore the issue or approach it naively. Of the solutions I’ve seen, I have yet to see one that is even remotely correct on a technical level.
wss://lang.relays.landor relays with/outboxand/inboxpath segments).NIP-11 de-duplication
Right now, ensuring a client isn’t connecting to the same relay more times than it thinks requires building a full manifest of all intended relay connections, fetching each relay’s NIP-11 document, and attempting to de-duplicate based on that.
Problems with NIP-11 de-duplication
idproperty that is just the request URL, leading to false positives during de-duplication.What this ammendment does not restrict:
/inbox,/outbox,/npub1....,/<hex_pubkey>Important Note: