-
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(waku-stealth-commitments): waku stealth commitment protocol #2490
Conversation
proc handler(topic: PubsubTopic, msg: WakuMessage): Future[void] {.async, gcsafe.} = | ||
if msg.contentTopic == contentTopic: | ||
SCPHandler(msg) | ||
|
||
wakuApp.node.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic), some(handler)) |
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.
hey @alrevuelta, for some reason while running this application, this handler gets called for messages it is sending. am i missing a config field?
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.
noticed we set triggerSelf
to true
here ->
nwaku/waku/waku_relay/protocol.nim
Line 166 in 731dfcb
triggerSelf = true, |
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.
yep
You can find the image built from this PR at
Built from c7d3680 |
37a8c4a
to
ab239a7
Compare
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.
Mmm. I'd suggest moving wakustealthcommitments
for now to the examples
subfolder. In some sense, this is still an example/POC to illustrate how nodes can run the stealth commitment protocol. I imagine that at some point the correct way to use this would be to fully integrate the protocol into wakunode2, create a request API, etc. Until then the reference can live as an example and I wouldn't create a Make target/nimble task for it (people can build and run it using nim c -r
as already described in the README). Wdyt?
Makefile
Outdated
@@ -206,6 +206,10 @@ chat2: | build deps librln | |||
echo -e $(BUILD_MSG) "build/$@" && \ | |||
$(ENV_SCRIPT) nim chat2 $(NIM_PARAMS) waku.nims | |||
|
|||
wakustealthcommitments: | build deps librln |
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.
Perhaps remove Make target (and nimble task)?
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.
addressed in fea64e0
```sh | ||
cd <path-to-nwaku> | ||
source env.sh | ||
nim c --out:build/wakustealthcommitments --verbosity:0 --hints:off -d:chronicles_log_level=INFO -d:git_version="v0.24.0-rc.0-62-g7da25c" -d:release --passL:-lm --passL:liberc_5564_bn254.a --debugger:native apps/wakustealthcommitments/wakustealthcommitments.nim |
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.
Could have been make wakustealthcommitments
here, but I think this should remain like this as I suggest removing the Make target in any case (as it will be temporary until we incorporate stealth commitment protocol into the node itself).
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.
It couldn't have, without setting up a proper pipeline for the erc-5564-bn254 static lib.
removing the makefile entry in any case
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! Thanks!
For my understanding, how we should use that protocol to enhance the communication privacy?
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! Thanks for this - very cool.
Description
Adds a
wakustealthcommitment
application/tool/service to theapps/
directory - it should be used for generating stealth addresses/commitments for users.This can be useful in a variety of ways, but needs to be fleshed out for curve operations, FFI api used will be from erc-5564-bn254 or native use of constantine.
Changes
waku.nimble
,Makefile
wakustealthcommitments
How to test
waku_stealth_commitments.1.mp4