-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nip-64: inbox model #1135
base: master
Are you sure you want to change the base?
nip-64: inbox model #1135
Conversation
I don't really see what this accomplishes. All it does is make an empty filter meaningful for auth'd users. This seems like a job for a content recommendations DVM instead, or a tool that can pull Walter's notes into Sarah's relay. But if she wants to retrieve Walter's content she should just ask for it. |
|
||
```jsonc | ||
{ | ||
"kind": 10064, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inboxes and outboxes are both just relays in reality. Put another way, an outbox is a relay with a "write" marker, and an inbox is a relay with a "read" marker. So this nip can reuse kind 10002 events from NIP-65.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we gain nothing by conflating two different kinds of relays. Relays specified on kind 10002 are already there and already being used. Relays that implement this NIP would require a little bit of special behavior, so it's better to signal them properly.
Also I think it's very important that users announce that they support this NIP before others start engaging with them through it, having a special kind published serves that purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's very important that users announce that they support this NIP
After #991 gets merged, you can pick a new relay usage flag to mean "nip64 relay" instead of introducing nip65 regular inbox relays may be enough don't know..nip11 may help client choose to load feed using nip64 while it can default to always send follow intent when user follows someone?kind:10064
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use a different tag in kind 10002 if people prefer that, but I honestly thinks it's always better to use a different event kind when the use case and implementation contexts are different. It's not a super strong argument, more like a rule-of-thumb I came up with, same as I said in #686 (comment).
What I don't think we should do is just rely on the "read" relays that already exist in kind 10002, as they were not chosen to be there explicitly to deal with the inbox model specified in this NIP and won't be prepared to handle it.
} | ||
``` | ||
|
||
Now Sarah can publish a `kind:6401` _follow intent_ to `wss://walter.inbox` tagging Walter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use kind 10 and 11 events? #349
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These kinds are already being used by NIP-29.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be useful https://undocumented.nostrkinds.info/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6401 is within the reserved DVM Job Result range. 🤦
The idea is good and it serves as an alternative to the pull model. We can have both running at the same time. To @staab's point, we can also use the subscription events to help a service provider or a DVM to redistribute events where they are supposed to be. But I do think the unfollow event should just be a deletion request. |
The inbox model has different characteristics from the outbox model. Neither replaces the other and both can co-exist. ... but the outbox model is superior of course. I'm not sure we need a separate list of inbox relays for the inbox model. It adds complexity, and I don't see the benefit. |
|
||
Whenever Sarah's inbox relay receive a note from Walter, they will know that Sarah is following him, so they index that note in a way that it is associated with Sarah. If the relays receive a note from someone else they can simply reject the note. | ||
|
||
When Sarah turns on her client she will connect to her inbox relay, perform [NIP-42](42.md) `AUTH` and create a subscription that doesn't specify `"authors"` (for example, `["REQ", "_", {}]`). The relays, aware of who she is and who she is following, can deliver to her just Walter's notes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks how absent authors
filter works.
Instead of NIP-42, better to filter like this { "nip64": "<sarah-pubkey>", kinds: [1], ...etc }
. The nip64
key clearly asks for relay to change how an absent authors
filter should be treated.
It is ok to let anyone see the "feed" as Sarah cause follow list is public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces unnecessary complexity. A new term to remember, libraries would have to add support for this and everything would be awful.
I don't see any issue with using an empty "authors"
and expecting the relay to treat that in a certain way, as long as the relay is carefully chosen to be treated differently by the client. A relay is already allowed to return anything they want as long as it matches the filter, it isn't mandated or expected to always return everything.
There are already other experiments out there of relay that behave differently when AUTH
ed and when not and I hope to see more.
Also specifying the AUTH
stuff from the beginning is nice as it allows for private feeds in cool ways that, although not explicitly specified in this NIP, could be implemented somewhat easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must have missed this entire paragraph. You are suggesting to put the smarts in the relay. I thought Walter would just tag Sarah when he puts her notes into her inbox relay. If the relay really handles the subscriptions as a service without the tagging, then of course this is not synonymous with a NIP-65 inbox relay and it should be specified differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there should be any tagging. Walter writes one note, signs it once and sends it to all the relays of people who have previously announced their intent to follow him (and also sends it to his own outbox relays). If he had to write a different note for each I think this would be a cumbersome nightmare.
I guess we could remove the special handling of events by the inbox relays and the blank filter behind |
I'm still thinking about this NIP. My original suggestion in #1134 was just that clients should try harder (a "free-for-all"). But I like that you envisioned something more. I think this will be a slow burn. It's the start of something. Next someone needs to make an all-in-one "inbox/outbox" package in some programming language ( |
I would never use that special filter anyway. All I need to do is add the user's own inbox relay to the relay list of the usual |
just throwing out the idea, I don't know if it is worth exploring.
read here: https://github.com/nostr-protocol/nips/blob/inbox-model/64.md
from the text:
based on #1134