From d2637dc498cb42e175ba144f99e3653a86bc2433 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 19 Nov 2024 10:37:06 -0500 Subject: [PATCH] Adds sorted hash as event Ids. --- 01.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/01.md b/01.md index d62f317..708579c 100644 --- a/01.md +++ b/01.md @@ -42,6 +42,8 @@ To obtain the `event.id`, we `sha256` the serialized event. The serialization is ] ``` +Once the `sha256` is computed, replace the first 4 bytes of the hash byte array by the 4-byte, signed, little-endian representation of the `created_at`. When verifying the event, Clients MUST check if the `id` matches the full hash OR the sorted hash. + To prevent implementation differences from creating a different event ID for the same event, the following rules MUST be followed while serializing: - UTF-8 should be used for encoding. - Whitespace, line breaks or other unnecessary formatting should not be included in the output JSON.