-
Notifications
You must be signed in to change notification settings - Fork 56
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: enhance libwaku store protocol and more #3223
Conversation
You can find the image built from this PR at
Built from 21bf68e |
if jsonContent.contains("message_hashes"): | ||
for hashJsonObj in jsonContent["message_hashes"].getElems(): | ||
var hash: WakuMessageHash | ||
var count: int = 0 | ||
for byteValue in hashJsonObj.getElems(): | ||
hash[count] = byteValue.getInt().byte | ||
count.inc() | ||
|
||
hash | ||
hash |
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.
Same question as waku-org/waku-rust-bindings#105 (comment)
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.
Same question as waku-org/waku-rust-bindings#105 (comment)
Yes good point! The reason for that is to make it work in the same way as relay:
let msgHash = computeMessageHash(pubSubTopic, msg) |
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, thank you!
This reverts commit 243d466.
Description
This PR was initially meant for enhancing how store protocol worked but it ended up collecting other enhancements
Changes
%
not needed inlibrary/events/json_message_event.nim
because we want the messageHash be returned as a sequence, .e.g[121, 9, ..., 98]
.libwaku.nim
: avoid passingWakuRelayHandler(onReceivedMessage(ctx)),
inwaku_relay_publish
because it doesn't make sense.store_request.nim
.waku_thread.nim
: addition of reqReceivedSignal to make sure every request is received (not processed) by The Waku Thread before the next request is sent to The Waku Thread.How to test
Can be tested by using the
toy-chat
app. See waku-org/waku-rust-bindings#105Impacted Issue