Open jm-clius opened 5 months ago
- 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.
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
.
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 includemeta
.
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.
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:
The proposed PR to simplify the Store protocol and use message hashes as index/cursor, can be used as a starting point.