From c88f24cd0f588dfa99b71eab2df817d372c4c278 Mon Sep 17 00:00:00 2001 From: G <28568419+s1fr0@users.noreply.github.com> Date: Thu, 3 Feb 2022 19:54:35 +0100 Subject: [PATCH] Update 6-payloads.md Typo in Lamport timestamp definition --- docs/spec/6-payloads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/6-payloads.md b/docs/spec/6-payloads.md index b672ddf..e43375e 100644 --- a/docs/spec/6-payloads.md +++ b/docs/spec/6-payloads.md @@ -237,7 +237,7 @@ This will satisfy the Lamport requirement, namely: a -> b then T(a) < T(b) `timestamp` MUST be Unix time calculated, when the node creates the message, in milliseconds. This field SHOULD not be relied upon for message ordering. -`clock` SHOULD be calculated using the algorithm of [Lamport timestamps](https://en.wikipedia.org/wiki/Lamport_timestamps). When there are messages available in a chat, the node calculates `clock`'s value based on the last received message in a particular chat: `max(timeNowInMs, last-message-clock-value + 1)`. If there are no messages, `clock` is initialized with `timestamp`'s value. +`clock` SHOULD be calculated using the algorithm of [Lamport timestamps](https://en.wikipedia.org/wiki/Lamport_timestamps). When there are messages available in a chat, the node calculates `clock`'s value based on the last received message in a particular chat: `max(timeNowInMs, last-message-clock-value) + 1`. If there are no messages, `clock` is initialized with `timestamp`'s value. Messages with a `clock` greater than `120` seconds over the Whisper/Waku timestamp SHOULD be discarded, in order to avoid malicious users to increase the `clock` of a chat arbitrarily.