-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: amending computeDigest func. + related test cases #2132
Conversation
You can find the image built from this PR at
Built from 414d10a |
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.
If I am not mistaken, this does not really change the DB schema or how messages are stored or searched for. It may result in some duplicate messages being stored after the node upgrades - as the unique index values will change for the same message after upgrade, but that should not be a problem.
Thanks for updating the tests!
LGTM
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.
lgtm.
I actually dont understant why the pubsub topic wasnt part of the digest if the RFC specifies so: https://rfc.vac.dev/spec/14/#deterministic-message-hashing
And related in case you want to have a look. Seems we have two hashed, one mainly used for store (the one you modified) and one for relay defaultMessageIdProvider
. Wondering if we should unify both.
nwaku/waku/waku_relay/message_id.nim
Lines 31 to 37 in 459331e
proc defaultMessageIdProvider*(message: messages.Message): Result[MessageID, ValidationResult] = | |
let hash = sha256.digest(message.data) | |
ok(@(hash.data)) | |
## Waku message Unique ID provider | |
# TODO: Add here the MUID provider once `meta` field RFC PR is merged |
The schema is going to be changed, we aim to replace
|
AFAIK, the messageID or |
* feat: amending computeDigest func. + related test cases * minor fixes * minor fixes v1: testcase saga continues --------- Co-authored-by: Vaclav Pavlin <vaclav@status.im>
Description
Amending the
computeDigest
function to add pubSubTopic as a function parameter, will help introduce a newmessageHash
attribute. The corresponding queue driver code is updated to accommodate the amended function.Amending the existing test cases that use the older version of the
computeDigest
function.Changes
computeDigest
function amendedIssue
#2112