diff options
| author | fiatjaf_ <fiatjaf@gmail.com> | 2025-04-15 18:07:49 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-15 18:07:49 -0300 |
| commit | 45f6d598a19321a98592e1f4fdf0b40707871f26 (patch) | |
| tree | 4e3e43d6c834717292813c1a8051b45c6d8f5422 | |
| parent | 611b6351863e128f470576586f0e2b9a75f19039 (diff) | |
Shrink NIP-65 so it is clearer (#1879)
Co-authored-by: Vitor Pamplona <vitor@vitorpamplona.com>
| -rw-r--r-- | 65.md | 50 |
1 files changed, 11 insertions, 39 deletions
| @@ -6,11 +6,9 @@ Relay List Metadata | |||
| 6 | 6 | ||
| 7 | `draft` `optional` | 7 | `draft` `optional` |
| 8 | 8 | ||
| 9 | Defines a replaceable event using `kind:10002` to advertise preferred relays for discovering a user's content and receiving fresh content from others. | 9 | Defines a replaceable event using `kind:10002` to advertise relays where the user generally **writes** to and relays where the user generally **reads** mentions. |
| 10 | 10 | ||
| 11 | The event MUST include a list of `r` tags with relay URIs and a `read` or `write` marker. Relays marked as `read` / `write` are called READ / WRITE relays, respectively. If the marker is omitted, the relay is used for both purposes. | 11 | The event MUST include a list of `r` tags with relay URLs as value and an optional `read` or `write` marker. If the marker is omitted, the relay is both **read** and **write**. |
| 12 | |||
| 13 | The `.content` is not used. | ||
| 14 | 12 | ||
| 15 | ```jsonc | 13 | ```jsonc |
| 16 | { | 14 | { |
| @@ -26,45 +24,19 @@ The `.content` is not used. | |||
| 26 | } | 24 | } |
| 27 | ``` | 25 | ``` |
| 28 | 26 | ||
| 29 | This NIP doesn't fully replace relay lists that are designed to configure a client's usage of relays (such as `kind:3` style relay lists). Clients MAY use other relay lists in situations where a `kind:10002` relay list cannot be found. | 27 | When downloading events **from** a user, clients SHOULD use the **write** relays of that user. |
| 30 | |||
| 31 | ## When to Use Read and Write Relays | ||
| 32 | |||
| 33 | When seeking events **from** a user, Clients SHOULD use the WRITE relays of the user's `kind:10002`. | ||
| 34 | |||
| 35 | When seeking events **about** a user, where the user was tagged, Clients SHOULD use the READ relays of the user's `kind:10002`. | ||
| 36 | |||
| 37 | When broadcasting an event, Clients SHOULD: | ||
| 38 | |||
| 39 | - Broadcast the event to the WRITE relays of the author | ||
| 40 | - Broadcast the event to all READ relays of each tagged user | ||
| 41 | |||
| 42 | ## Motivation | ||
| 43 | |||
| 44 | The old model of using a fixed relay list per user centralizes in large relay operators: | ||
| 45 | |||
| 46 | - Most users submit their posts to the same highly popular relays, aiming to achieve greater visibility among a broader audience | ||
| 47 | - Many users are pulling events from a large number of relays in order to get more data at the expense of duplication | ||
| 48 | - Events are being copied between relays, oftentimes to many different relays | ||
| 49 | |||
| 50 | This NIP allows Clients to connect directly with the most up-to-date relay set from each individual user, eliminating the need of broadcasting events to popular relays. | ||
| 51 | |||
| 52 | ## Final Considerations | ||
| 53 | |||
| 54 | 1. Clients SHOULD guide users to keep `kind:10002` lists small (2-4 relays). | ||
| 55 | 28 | ||
| 56 | 2. Clients SHOULD spread an author's `kind:10002` event to as many relays as viable. | 29 | When downloading events **about** a user, where the user was tagged (mentioned), clients SHOULD use the user's **read** relays. |
| 57 | 30 | ||
| 58 | 3. `kind:10002` events should primarily be used to advertise the user's preferred relays to others. A user's own client may use other heuristics for selecting relays for fetching data. | 31 | When publishing an event, clients SHOULD: |
| 59 | 32 | ||
| 60 | 4. DMs SHOULD only be broadcasted to the author's WRITE relays and to the receiver's READ relays to keep maximum privacy. | 33 | - Send the event to the **write** relays of the author |
| 34 | - Send the event to all **read** relays of each tagged user | ||
| 61 | 35 | ||
| 62 | 5. If a relay signals support for this NIP in their [NIP-11](11.md) document that means they're willing to accept kind 10002 events from a broad range of users, not only their paying customers or whitelisted group. | 36 | ### Size |
| 63 | 37 | ||
| 64 | 6. Clients SHOULD deduplicate connections by normalizing relay URIs according to [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-6). | 38 | Clients SHOULD guide users to keep `kind:10002` lists small (2-4 relays of each category). |
| 65 | 39 | ||
| 66 | 7. When publishing to a relay, clients SHOULD ensure the user's `kind 10002` is also available on that relay. Relays SHOULD accept and serve `kind 10002` notes for any pubkey whose notes they store. Relays MAY scrape the network for missing `kind 10002` events. The goal here is that for any note served from a relay the user can also request the author's relay selections as a way of bootstrapping further context discovery. | 40 | ### Discoverability |
| 67 | 41 | ||
| 68 | ## Related articles | 42 | Clients SHOULD spread an author's `kind:10002` event to as many relays as viable, paying attention to relays that, at any moment, serve naturally as well-known public indexers for these relay lists (where most other clients and users are connecting to in order to publish and fetch those). |
| 69 | - [Outbox model](https://mikedilger.com/gossip-model/) | ||
| 70 | - [What is the Outbox Model?](https://habla.news/u/hodlbod@coracle.social/8YjqXm4SKY-TauwjOfLXS) | ||