upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hoyte <doug@hcsw.org>2023-05-19 00:54:44 -0400
committerfiatjaf_ <fiatjaf@gmail.com>2023-06-04 18:34:17 -0300
commitfe9ed69dc3aec54ae437ca09a6d61aa2ce175577 (patch)
treee4b99f3b84429f8e370d9f8b551b562912900320
parentcabbaadb69ecf28c2a91ced63359e1bd15b14ea9 (diff)
Specify replacement behaviour when replaceable events have the same timestamp
- This is so that relays can converge on a deterministic sets of events, no matter the order they were received - Otherwise, clients or relays that sync their sets of events could continually retransmit events they think are missing on the other side, wasting bandwidth
-rw-r--r--16.md2
-rw-r--r--33.md2
2 files changed, 4 insertions, 0 deletions
diff --git a/16.md b/16.md
index 4d9481d..8ef4af4 100644
--- a/16.md
+++ b/16.md
@@ -20,6 +20,8 @@ Upon a replaceable event with a newer timestamp than the currently known latest
20effectively replacing what gets returned when querying for 20effectively replacing what gets returned when querying for
21`author:kind` tuples. 21`author:kind` tuples.
22 22
23If two events have the same timestamp, the event with the lowest id (first in lexical order) SHOULD be retained, and the other discarded.
24
23Ephemeral Events 25Ephemeral Events
24---------------- 26----------------
25An *ephemeral event* is defined as an event with a kind `20000 <= n < 30000`. 27An *ephemeral event* is defined as an event with a kind `20000 <= n < 30000`.
diff --git a/33.md b/33.md
index c93c36e..5128bec 100644
--- a/33.md
+++ b/33.md
@@ -18,6 +18,8 @@ replaceable event with the same kind, author and first `d` tag value being recei
18SHOULD be discarded, effectively replacing what gets returned when querying for 18SHOULD be discarded, effectively replacing what gets returned when querying for
19`author:kind:d-tag` tuples. 19`author:kind:d-tag` tuples.
20 20
21If two events have the same timestamp, the event with the lowest id (first in lexical order) SHOULD be retained, and the other discarded.
22
21A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the 23A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the
22value as an empty string. Events from the same author with any of the following `tags` 24value as an empty string. Events from the same author with any of the following `tags`
23replace each other: 25replace each other: