-
Notifications
You must be signed in to change notification settings - Fork 53
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: deterministic message hash algorithm updated #2233
Conversation
You can find the image built from this PR at
Built from 2381964 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, although it would be good to address the comment below (using existing utility module to convert the int to bytes)
waku/waku_core/message/digest.nim
Outdated
@@ -22,6 +22,15 @@ type WakuMessageDigest* = array[32, byte] | |||
converter toBytesArray*(digest: MDigest[256]): WakuMessageDigest = | |||
digest.data | |||
|
|||
converter toBytesFromInt64*(num: int64): seq[byte] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is already a utility module to achieve this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Hanno, nice catch! Integrating the new change.
Description
As described in RFC related change, the deterministic message hash algorithm is updated. Waku message
timestamp
is added to the hash/digest computation.Changes
Issue
closes #2215