Adds a clarification that Client must keep an AsSeenOn relay list for each event to make sync work well.

This commit is contained in:
Vitor Pamplona 2023-10-17 10:35:16 -04:00
parent 6536047d33
commit 447f9b3a87

2
29.md
View File

@ -50,6 +50,8 @@ The weekly hash MUST happen in the client and in the relay in the exact same way
4. For each group, create an array of event ids: [id1, id2, id3], JSON-serialize it and hash it using SHA-256 4. For each group, create an array of event ids: [id1, id2, id3], JSON-serialize it and hash it using SHA-256
5. Return a list of the formatted `.created_at` and the hashes. 5. Return a list of the formatted `.created_at` and the hashes.
Clients must keep records of which events are coming from which relays to sucessfully filter only events from that relay and compare hashes.
### Why weekly? ### Why weekly?
Simplicity. We could do a recursive approach where the Client chooses the format (e.g: `YYYY`, `YYYY-ww`, `YYYY-MM`, `YYYY-MM-dd`, `YYYY-MM-ddHH`, `YYYY-MM-ddHHmm`). This flexibility allows for some cost savings but adds complexity to the implementation of this NIP. Simplicity. We could do a recursive approach where the Client chooses the format (e.g: `YYYY`, `YYYY-ww`, `YYYY-MM`, `YYYY-MM-dd`, `YYYY-MM-ddHH`, `YYYY-MM-ddHHmm`). This flexibility allows for some cost savings but adds complexity to the implementation of this NIP.