-
Notifications
You must be signed in to change notification settings - Fork 15
chore: update Deterministic message hashing algorithm. #632
Conversation
@@ -161,8 +164,9 @@ pubsub_topic = "/waku/2/default-waku/proto" (0x2f77616b752f322f64656661756c742d7 | |||
message.payload = 0x010203045445535405060708 | |||
message.content_topic = "/waku/2/default-content/proto" (0x2f77616b752f322f64656661756c742d636f6e74656e742f70726f746f) | |||
message.meta = <not-present> |
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.
Since the timestamp is still optional (IIUC), should we have an example without timestamp
similar to this example with empty meta
?
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.
so basically timestamp if not explicitly provided is filled anyway by our fakeWakuMessage
proc. Are you saying to write a test case where we overwrite the filled timestamp as empty?
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 just remembered, timestamp
attribute is not null in DB schema https://github.com/waku-org/nwaku/blob/master/waku/waku_archive/driver/sqlite_driver/queries.nim#L72 WDYT @vpavlin
The change looks good to me, I'm just wondering if this could this cause any backward compatibility issues? The reason I ask is because the versions of status desktop/mobile running are heterogeneous so there will be clients using older version of the hash algorithm |
Currently, this function is not used by anything in old devices/client since this function will be used by the new DB column hash, the sync protocol will only be able to sync with new/updated devices? |
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.
Approved, but with comment below to make field consistent.
* chores: update Deterministic message hashing algorithm. * type fix in commented code
* chores: update Deterministic message hashing algorithm. * type fix in commented code
As discussed,
Updating the Deterministic message hashing computation, adding the sender timestamp in computation. It will make the message hash more unique.