Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update store sync spec #49

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions standards/core/store-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Message propagation in the network is not perfect,
even with GossipSub mechanisms to detect missed messages.
Nodes can also go offline for various reason outside our control.
Store nodes that want to provide a good service must be able to remedy situations like these.
By having store nodes syncronize with each other through various protocols,
By having store nodes synchronize with each other through various protocols,
the set of archived messages network wide will be eventually consistent.

## Theory / Semantics
Expand All @@ -27,28 +27,17 @@ Various protocols and features that help with message consistency are described

### Store Resume

<!-- restating this as a heuristic rather than a high-level description of functionality allows the spec to be useful for new implementers -->

This feature allow a node to fill the gap in messages for the period it was last offline.
At startup, a node use the Store protocol to query a random node for
At startup, a node SHOULD use the Store protocol to query a random node for
the time interval since it was last online.
Messages returned by the query are then added to the node local archive storage.
Messages returned by the query are then added to the local node storage.
It is RECOMMENDED to limit the time interval to a maximum of 6 hours.

### Waku Sync

<!--
For the new version. "think of a specification as a heuristic/set of directives that almost form a kind of pseudocode. This becomes easier if you use the RFC keywords for each directive"
-->

Nodes that stay online can still miss messages.
[Waku Sync](https://github.com/waku-org/specs/blob/master/standards/core/sync.md) is the protocol used to find those message hashes by periodically syncing with random nodes.
It is RECOMMENDED to trigger a sync with a random peer every 5 minutes for a time range of the last hour.
After both message hash sets are reconciled,
the Store protocol SHOULD be used to reciprocally query the other node with the message hash differences found.
Messages returned by the query MUST be added to the node local Waku sync and archive storage.

<!-- TODO add the number of node to sync with -->
[Waku Sync](https://github.com/waku-org/specs/blob/master/standards/core/sync.md) is 2 libp2p protocols used to find those messages and mend the differences by periodically syncing with random nodes.
SionoiS marked this conversation as resolved.
Show resolved Hide resolved
It is RECOMMENDED to trigger a sync with a random peer that supports the protocols every 5 minutes for a time range of the last hour.

## Copyright

Expand Down
Loading