-
Notifications
You must be signed in to change notification settings - Fork 49
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
test(waku-relay): Relay #2101
test(waku-relay): Relay #2101
Conversation
You can find the image built from this PR at
Built from f5c995c |
61bd44a
to
72a5f1a
Compare
9649704
to
2f3e21e
Compare
a988c44
to
adc5a14
Compare
2f3e21e
to
8b135c5
Compare
f23a112
to
4f79694
Compare
4f79694
to
c79fad7
Compare
import nimcrypto | ||
|
||
|
||
proc cfbEncode*(key: string, iv: string, data: string): 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.
Why is this called encode
if it actually encrypts
? (same for the proc below)
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.
These were sourced (and slightly adapted) from nimcrypto/examples/cfb.nim
, where they used the encode
and decode
keywords in the respective variables. Thus, I assumed those keywords would be understood.
tests/waku_relay/test_protocol.nim
Outdated
let fromOtherWakuMessage = fakeWakuMessage("fromOther") | ||
discard await node.publish(pubsubTopic, fromOtherWakuMessage) | ||
|
||
# Then the message is published only in both nodes |
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 the comment has a copy&paste error:)
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.
Indeed 😅 You repeat one thing too many times and you start missing obvious errors
tests/waku_relay/test_protocol.nim
Outdated
|
||
# When decrypting the message | ||
let | ||
decryptedText = cfbDecode(key, iv, msg1.payload) |
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.
Slightly inconsistent - we have encodedText
and decryptedText
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.
True, updating :)
I am mildly confused about this PR - the title say |
That was a typo on my side, updating it. |
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 so much, looks great! :)
Left some comments/questions
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!
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
c1586f0
to
f2690a5
Compare
a6015e3
to
2ea31aa
Compare
2ea31aa
to
4be2375
Compare
Description
Implement waku filter relay tests for message id generation
Changes
test_all
.Dependencies
#2096