NIP-42 does not work [500k Bounty] #520
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#520
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
It seems NIP-42 was once added to snort but no longer works. We are offering a 500k sats bounty to fix this feature.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should respond to the AUTH correctly and then re-send the REQs (poorly defined in the NIP-42 spec how to handle the "lost" REQs).
I originally implemented NIP-42 a long while ago.
I'll try to make time this week to take a look and see what broke.
Is it just broken with this particular server? Do other NIP-42 servers respond ok?
Currently on mobile so can't debug but will def look at this week.
Thank you for taking a look! The only two I know of are wss://nostr.kollider.xyz and wss://filter.nostr.wine and it does not work with either.
Playing with this a bit more today, it seems if you select an AUTH relay in global, then select a different one, then go back to the AUTH relay, it will load events (sometimes).
So it does seem to be working, but perhaps the flow of what happens to the REQs that were sent before/simultaneously the AUTH event is received needs to be improved. I don't expect relays to keep track of the missing state with the way the NIP is currently written.
Ah yeah, I think I know what's going on.
When we originally implemented it the global feed did not allow you to select a specific relay.
I'm going to try to find some time and dig into how it can be fixed.
Like you said, the REQ has a race condition with AUTH. I have some ideas but will need to find some time this week to mess with it.
No rush, thanks for your help. We appreciate it.
On some of the other relays, they implemented some buffering of pending REQ messages, seems like your relay doesnt do this, any chance you could send AUTH on connect?
We do prompt for AUTH on connect at wss://filter.nostr.wine (but we do not buffer pending REQs).
Ok, can you enable
auth_required
inlimitations
?I can. It's a bit unclear because right now its optional (we still support using /npub if you don't use AUTH) but I will add it regardless. I don't think there is any harm. I'm on it now.
auth_required has been flipped to "true" in limitations.
I just want to add that we sympathize with the REQ/AUTH race condition and really wish there was some clarity in the NIP of how clients and relays are expected to address it. Using NIP-42 to do some granular limiting (like only on kind 4 REQs) will result in these same issues.
Thank you! Bounty paid.