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

chore: deterministic message hash algorithm updated #2233

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

ABresting
Copy link
Contributor

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

  • hash/digest calculation updated
  • related test cases updated

Issue

closes #2215

Copy link

github-actions bot commented Nov 21, 2023

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2233

Built from 2381964

Copy link
Contributor

@jm-clius jm-clius left a 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)

@@ -22,6 +22,15 @@ type WakuMessageDigest* = array[32, byte]
converter toBytesArray*(digest: MDigest[256]): WakuMessageDigest =
digest.data

converter toBytesFromInt64*(num: int64): seq[byte] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

@ABresting ABresting merged commit a22ee60 into master Nov 22, 2023
9 of 10 checks passed
@ABresting ABresting deleted the update-deterministic-hash-algorithm branch November 22, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: update Deterministic message hashing algorithm
3 participants