From 628902cae04aa621ac23bbc5d0f95879e4ed8763 Mon Sep 17 00:00:00 2001 From: Leo Wandersleb Date: Sun, 26 Mar 2023 12:41:36 -0300 Subject: [PATCH] nip "Replaceable Versioned Events" --- 33.md | 4 ++- 34.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 34.md diff --git a/33.md b/33.md index 10681fac..61a5ef0d 100644 --- a/33.md +++ b/33.md @@ -6,7 +6,9 @@ Parameterized Replaceable Events `draft` `optional` `author:Semisol` `author:Kukks` `author:Cameri` `author:Giszmo` -This NIP adds a new event range that allows for replacement of events that have the same `d` tag and kind unlike NIP-16 which only replaced by kind. +This NIP adds a new event range that allows for replacement of events that have +the same author, first `d` tag and kind unlike [NIP-16](/16.md) which only +replaced by kind. Implementation -------------- diff --git a/34.md b/34.md new file mode 100644 index 00000000..ef852bf5 --- /dev/null +++ b/34.md @@ -0,0 +1,85 @@ +NIP-34 +====== + +Parameterized Versioned Events +-------------------------------- + +`draft` `optional` `author:Giszmo` + +This NIP adds a new event range that allows for versioning of events that have +the same author, first `d` tag and kind but unlike [NIP-33](/33.md), no events +get discarded, keeping references by event ID intact. + +Reasoning +--------- +For maintaining bodies of events between multiple authors, relying on the +good-will of others to not change or delete their respective events is not good +enough. For example for wikipedia or nip registry replacements, we need ways to +know an acceptable version of the document stays around without having to copy +it under another author's pubkey. + +Implementation +-------------- +A *Parameterized Versioned Event* is defined as an event with a kind +`40000 <= n < 50000`. + +It follows the same rules as NIP-33 except that "replaced" events do not get +discarded. + +Relays queried for `author:kind:d-tag` tuples serve the last but when queried +for specific event IDs, those will be returned, too. + +A Use Case +---------- +A later nip might define a nip registry such that authors can either publish +their own preferred version of a nip or e**n**dorse others by +`author:kind:d-tag` tuples or by event ID. + +Alice proposes NIP-999: + +``` +"author": $alice, +"id": "14aeb..8dad4", +"kind": 40001, +"tags": [ + [ "d", "999"], +… +``` + +Bob endorses exactly that version: + +``` +"author": $bob, +"kind": 40001, +"tags": [ + [ "d", "999"], + [ "n", "14aeb..8dad4"] +], +"content": "", +… +``` + +Carol endorses whatever Bob wants to see as NIP-999: + +``` +"author": $carol, +"kind": 40001, +"tags": [ + ["d", "999"], + ["n", "$bob:999"], +], +"content": "", +… +``` + +Dave announces to generally trust Alice in all things "NIP": + +``` +"author": $dave, +"kind": 40001, +"tags": [ + ["n", $alice, +], +"content": "", +… +``` diff --git a/README.md b/README.md index 9390916a..ddb1f37a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh - [NIP-27: Text Note References](27.md) - [NIP-28: Public Chat](28.md) - [NIP-33: Parameterized Replaceable Events](33.md) +- [NIP-34: Parameterized Versioned Events](34.md) - [NIP-36: Sensitive Content](36.md) - [NIP-39: External Identities in Profiles](39.md) - [NIP-40: Expiration Timestamp](40.md) @@ -76,6 +77,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | 10000-19999 | Replaceable Events | [16](16.md) | | 20000-29999 | Ephemeral Events | [16](16.md) | | 30000-39999 | Parameterized Replaceable Events | [33](33.md) | +| 40000-49999 | Parameterized Versioned Events | [34](34.md) | ## Message types