nostr-protocol / nips

Nostr Implementation Possibilities
2.4k stars 583 forks source link

Simplify nip 29 even further #1495

Closed staab closed 1 month ago

staab commented 2 months ago

The goal here is to establish conventions for using standard relays as lightweight "groups", rather than creating highly stateful group protocol objects which require relay support to work.

Summary of changes (obsolete, see comment below on new revision): - Access control is broadened to the entire relay, rather than to an individual group. This mostly is just a restatement of NIP 42, but introduces a new `ACCESS` command (which should probably be moved to NIP 42). - Admin RPC is removed, and should be handled by #1325 - Moderation RPC is removed in favor of kind 1984 reports, which don't need special handling, but may be used to inform relay policy. - Use of `-` tags is encouraged to support a weak form of privacy. - Room membership can be tracked as well as relay membership. - Anyone can publish member lists or indexes of `h` tags on a relay. This underscores the fact that they are only for convenience, and shouldn't be relied upon — this allows interoperability with standard relays, because relays aren't expected or required to do anything special. - Some policy stuff like open/closed is removed in favor of using existing NIP 11 metadata. - Relay backups and migration are supported. This can be used to advertise migration to another relay, even if the relay goes down before a migration is published (by posting to well known indexes, or DMing them to members). This PR is just an RFC for now, not necessarily a serious PR. It could replace NIP 29, which doesn't have any mature implementations yet, or it could be a separate standard. Friendly view [here](https://github.com/nostr-protocol/nips/blob/b471201653216f154a9cc866b651eccc0d4ba5f1/29.md).
staab commented 2 months ago

Ok, I took another pass at this after @fiatjaf suggested that passive support was possible. I was skeptical at first, but I actually think I got it to work.

This version is compatible with the current version, with the following exceptions:

I've also left some Note: comments in the text in places where I think things could be simplified at the expense of backwards compatibility, like with group metadata events and group lists.

Friendly view here

staab commented 1 month ago

NB, I'm no longer trying to reconcile NIP 29 with relay-based groups. I think the goals are different enough, competition is better than cooperation in this instance. Here's the draft NIP I'm working off of for flotilla: https://github.com/coracle-social/nips/blob/relay-chat/xx.md.