waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
162 stars 41 forks source link

fix(message-hash): account for `timestamp` and align with specs #1985

Closed danisharora099 closed 2 months ago

danisharora099 commented 2 months ago

This is a bug report

Problem

Based on the specs: https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/14/message.md#deterministic-message-hashing, the current message-hash algorithm did not take into account the timestamp.

The test vectors mentioned in the spec also varied from the one in the implementation.

Proposed Solutions

Notes

Original message: https://discord.com/channels/1110799176264056863/1111541029309534249/1233338075191709768