Skip to content

NIP-61 - Event Sets#784

Closed
arthurfranca wants to merge 36 commits into
nostr-protocol:masterfrom
arthurfranca:bunch-of-events
Closed

NIP-61 - Event Sets#784
arthurfranca wants to merge 36 commits into
nostr-protocol:masterfrom
arthurfranca:bunch-of-events

Conversation

@arthurfranca
Copy link
Copy Markdown
Contributor

@arthurfranca arthurfranca commented Sep 17, 2023

Read here

Like NIP-51 lists but without list size limit.

@arthurfranca arthurfranca marked this pull request as ready for review September 17, 2023 18:38
@arthurfranca arthurfranca changed the title Add "Bunch of Events" NIP-61 - Unbounded Lists Sep 18, 2023
This was referenced Sep 19, 2023
@arthurfranca arthurfranca changed the title NIP-61 - Unbounded Lists NIP-61 - Unbounded List Sep 20, 2023
@arthurfranca arthurfranca mentioned this pull request Sep 21, 2023
@staab
Copy link
Copy Markdown
Member

staab commented Sep 21, 2023

I like the idea of having something like this. It would be nice to have it more explicit that you might have public and encrypted data coexist in a list. I'm not sure why we need n and u tags in addition to d though. Didn't you start by defining a new range? It seems to me we could just pick a regular event kind (<10000), use d as the name, and a instead of u to refer to all events in the list.

@arthurfranca
Copy link
Copy Markdown
Contributor Author

It would be nice to have it more explicit that you might have public and encrypted data coexist in a list.

Added "Public and encrypted data can coexist in unbounded list events similar to NIP-51 lists." Thanks

Didn't you start by defining a new range? It seems to me we could just pick a regular event kind (<10000), use d as the name, and a instead of u to refer to all events in the list.

I realized we didn't need a new range; just reserving the n tag to mark an event as being part of a list would be enough. Adding/removing n tags from an event is needed, so most times the event needs to be replaceable.

@alexgleason
Copy link
Copy Markdown
Member

Yes, it just doesn't make the problem much easier.

I still like this event sets idea a lot, though. i'm working on implementing it in Ditto.

@alexgleason
Copy link
Copy Markdown
Member

Why does the target event's pubkey need to be in the d tag for kind 30383 events?

Comment thread 61.md Outdated
@alexgleason
Copy link
Copy Markdown
Member

@arthurfranca Should this be unmarked as a draft?

@vitorpamplona vitorpamplona marked this pull request as ready for review June 9, 2024 20:41
@vitorpamplona
Copy link
Copy Markdown
Collaborator

I am just realizing that with this, we are just swapping an event with thousands of keys (e.g. the contact list) to an event with thousands of list names (e.g. new 30382).

Different race conditions, but race conditions might still be a problem if lists become a common feature of Nostr clients.

Regardless, this is a good evolution.

@alexgleason
Copy link
Copy Markdown
Member

@vitorpamplona It seems very improbable that a single user would add another single user to 1000+ lists. Even power users will have hundreds at most, while they will follow thousands of users. So the scale is very different, and it minimizes the potential damage of race conditions to your relationship with individual users instead of your entire list.

@alexgleason
Copy link
Copy Markdown
Member

Btw, I implemented event sets in Ditto. The Ditto nsec tags pubkeys with ["n", "admin"], ["n", "suspended"], and ["n", "suggested"] for user roles, globally suggested users, and moderation (etc.)

It also generates event sets for reports and some other things, which it tags with ["n", "open"] and ["n", "closed"] so the server can manage their state and filter by it.

I will soon be implementing private user notes and user-recommended follows with this. I think it's very needed, and the n tag is a great idea.

I replaced the custom kind 30361 event I was using in Ditto with kind 30382.

@arthurfranca
Copy link
Copy Markdown
Contributor Author

I think this PR is ready. Just would like to make it clear that although this PR has all the necessary steps to migrate from NIP-51 lists, it does not aim to make clients migrate from NIP-51. Though it opens the possibility to experiment migrating less "important" ones like using "mute" event sets instead of "mute" NIP-51 lists. Also, it opens the door to using events sets for new use cases where one would otherwise spec a new NIP-51 list.

@staab
Copy link
Copy Markdown
Member

staab commented Jun 20, 2024

IMO this not much more than a clever hack, and not a fundamental solution of the problem of follow list race conditions. I don't really see myself adopting this except to be interoperable with other features I want to support. But migrating things to it is just not going to happen, for me or many other devs.

To that point, it's a very bad idea to add some of the "standard" event sets listed. What is the semantic difference between a follow list and a follow set? Which is canonical? Is the newer one better? People are going to see this NIP and think it replaces kind 3 follow lists, and start writing only sets. Or they'll attempt to implement complicated reconciliation logic and fail. I think if people start to use any of the bookmark, follow, mute or pin sets, which are already defined by NIP 51, we're going to have fragmentation of implementations, and it will greatly damage interoperability.

@arthurfranca
Copy link
Copy Markdown
Contributor Author

One can't be against event sets while in favor of #1322 cause #1322 uses event sets. Simple logic.

In fact, from the above comment I only see you are against some of the event set names. I will remove bookmark, follow, mute and pin.

@alexgleason
Copy link
Copy Markdown
Member

Indeed. I was thinking, the only thing Event Sets competes against (as far as "do things one way") is Lists... in concept.

But it's the specific names/list kinds that need to not compete. The concepts should be able to coexist.

@vitorpamplona
Copy link
Copy Markdown
Collaborator

Sets and Lists are different things. There is some intersection, but sets do not replace Lists at all times.

@staab
Copy link
Copy Markdown
Member

staab commented Jun 20, 2024

One can't be against event sets while in favor of #1322 cause #1322 uses event sets. Simple logic.

I'm against both. I just recognize that I have no power to prevent sets being used. Yes, sets are different from lists, but not different enough IMO to complicate the protocol with them (especially when we also have labels).

@arthurfranca
Copy link
Copy Markdown
Contributor Author

arthurfranca commented Jun 20, 2024

Removed the part that is now available at #1322 (and also extended at #761).

The PR is just defining event sets and some basic event set names.

@arthurfranca
Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants