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

Waku Store v3 protocol #81

Open
Tracked by #104
jm-clius opened this issue Feb 1, 2024 · 3 comments
Open
Tracked by #104

Waku Store v3 protocol #81

jm-clius opened this issue Feb 1, 2024 · 3 comments

Comments

@jm-clius
Copy link
Contributor

jm-clius commented Feb 1, 2024

Waku requires an improved version of the Store protocol, marking a crucial increment towards a Store synchronisation protocol.

Amongst other things, this new protocol must:

  • introduce the concept of deterministic message hashes to index messages
  • consider the Store as a key-value store
  • allow for querying a list of keys (message hashes) from the Store
  • allow for querying for the full message content (values) of a set of keys from the Store
  • keep all previous value-based filtering (e.g. content topic, timestamp) in place

The proposed PR to simplify the Store protocol and use message hashes as index/cursor, can be used as a starting point.

@chaitanyaprem
Copy link

  • introduce the concept of deterministic message hashes to index messages

Just to clarify the existing Waku-message hashing algo is already deterministic right, so no change is required or expected to be done wrt it. Only the concept of mapping message hash to message is being newly introduced.

@jm-clius
Copy link
Contributor Author

the existing Waku-message hashing algo is already deterministic right

Yes, it is. If an application crafts a message with a clashing hash, it MUST use the meta field to disambiguate.

One related note is that we cannot currently reconstruct the hash from the stored fields in the archive, because we don't store meta - in other words, if we believe it necessary to in future verify that the stored entry matches its key/hash, we will have to expand our DB scheme to include meta.

@chaitanyaprem
Copy link

One related note is that we cannot currently reconstruct the hash from the stored fields in the archive, because we don't store meta - in other words, if we believe it necessary to in future verify that the stored entry matches its key/hash, we will have to expand our DB scheme to include meta.

Interesting point, maybe we should start storing this.
This will also address a point made by @kaichaosun in some discussion about validating the contents of a message returned by StoreNode by the requestor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants