-
Notifications
You must be signed in to change notification settings - Fork 0
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
Waku Archive and Synchronization protocol #76
Comments
Hey @ABresting! Thanks for that! 💯
|
Thanks! I think the main question here should rather be how the Store wire protocol (the protobuf) itself should change to support the new key-value approach to Store. Do we need any new types of historical message queries, new types of filter criteria, etc? It seems to me that this "query language" need to be expanded to include use cases such as:
This would, of course, imply some changes in what the Archive supports, but it should flow naturally from the concepts introduced by the new Store protocol which is difficult to reason about without thinking through these protocol flows. |
The Sync process result IS the list of hashes. There is no extra round-trip and the list is the missing hashes no filtering needed. Maybe rephrase? Also, Archive != Store, Archive is not a protocol (yet). Maybe we should not change Store and create the archive protocol instead OR make it part of the Sync protocol? |
This goes into Store protocol provided features then.
I understand what you mean, sometimes it is tricky since Archive as @jm-clius rightly put it is an interface to physical storage. For eg here the |
Waku Archive and Synchronization protocol
The Synchronization (Sync) protocol ensures that all nodes in the Waku network have consistent data and messages. It operates between different nodes: a node sends a Sync request to a peer node, which then processes the request and initiates the synchronization. A key step in this process involves the peer node sending a collection of
messageHash
es to the requesting node. The requesting node then reviews these hashes and identifies any it doesn't possess. It sends back a list of these missingmessageHash
es, prompting the peer node to transmit the corresponding messages. This system maintains data consistency across the network.To effectively execute the Sync process, the Waku store protocol needs to incorporate certain capabilities:
The existing Waku archive protocol offers a getMessages function, utilizing parameters like
contentopic
,pubsubtopic
,starttime
,endtime
etc. It's necessary for the Archive protocol to enhance its functionality to review a list ofmessageHash
es and identifies which ones the node doesn't have already.The following are functionalities Sync protocol would need from Waku Store:
filterMissingMessageHashes
: should take a list ofmessageHash
es and cross check withmessageHash
es it already has and returns a list ofmessageHash
es which are to be transported from the peer node.getMessagesUsingHashes
: should process a list ofmessageHash
es, request the peer node to send the messages corresponding to the list ofmessageHash
es and then store/archive them.sendMessageUsingHashes
: takes a list ofmessageHash
es and sends the corresponding message to a peer node.@Ivansete-status @jm-clius would like to have your input on this.
The text was updated successfully, but these errors were encountered: