mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 01:34:57 +00:00
wip
This commit is contained in:
@ -12,10 +12,10 @@ We'll call the two sides engaged in the sync the client and the relay (even thou
|
||||
* A subscription ID that will be used by each side to identify which query a message refers to
|
||||
* A nostr filter, as described in [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md), or an event ID whose `content` contains the JSON-encoded filter
|
||||
* The truncation byte size for IDs, called `idSize. An integer between 8 and 32, inclusive.
|
||||
2. Both sides collect all the events they have stored/cached that match this filter.
|
||||
3. Each side sorts the events by their `created_at` timestamp. If the timestamps are equivalent, events are sorted lexically by their `id` (the canonicalised hash of the event).
|
||||
4. Client creates an initial reconcilliation message and sends it to relay.
|
||||
5. Each side processes an incoming message and replies with its own outgoing message, along with a list of "have IDs" and "need IDs", stopping when one party receives an empty message.
|
||||
1. Both sides collect all the events they have stored/cached that match this filter.
|
||||
1. Each side sorts the events by their `created_at` timestamp. If the timestamps are equivalent, events are sorted lexically by their `id` (the canonicalised hash of the event).
|
||||
1. Client creates an initial reconcilliation message and sends it to relay.
|
||||
1. Each side processes an incoming message and replies with its own outgoing message, along with a list of "have IDs" and "need IDs", stopping when one party receives an empty message.
|
||||
|
||||
## Nostr Protocol
|
||||
|
||||
|
Reference in New Issue
Block a user