fix: fallback to public relays for Nostr profile resolution - #3603
Open
sethforprivacy wants to merge 1 commit into
Open
fix: fallback to public relays for Nostr profile resolution#3603sethforprivacy wants to merge 1 commit into
sethforprivacy wants to merge 1 commit into
Conversation
- queryProfile no longer rejects NIP-05 profiles without relay hints - processRelays queries author relays + well-known public relays in parallel, returning as soon as one relay serves kind-0 metadata - fallback set: relay.nos.social, nos.lol, offchain.pub, relay.damus.io, relay.nostr.band, purplepag.es, relay.primal.net (measured coverage) - add unit test for fallback relay list
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
Nostr (NIP-05) address resolution in the send screen now falls back to
well-known public relays when the author's NIP-05 relay hints are missing or
none of them serve the profile metadata (kind 0), and resolves as long as a
single relay has the profile.
queryProfileno longer rejects NIP-05 profiles whosenostr.jsonhas norelaysmap (e.g.cakewallet@cakewallet.comandmonero@monero.com—both verified live to have a
namesentry and norelaysentry, so theycould never resolve before).
the first hit wins (bounded by the existing 3s relay timeout, replacing a
sequential worst case of N×3s).
popular profiles):
relay.nos.social(fastest, 10/11),nos.lol(9/11),offchain.pub(7/11);relay.primal.netcovers only Primal-app profiles,so it is last. Removed the obsolete domain-matching relay flow.
Test plan
test/core/address_resolver/nostr/nostr_api_test.dart(all tests passedlocally on flutter 3.47.2).
vik@monero.comin the XMR send screen → should resolve tothe Monero address in the profile.
flutter test/ analyzer cannot run in a bare checkout(pubspec.yaml is generated; see
scripts/linux/app_config.sh), so CI'sLinux container (flutter 3.41.9) is authoritative for the rest of the
suite.