Skip to content
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(networkmonitor): add support for rln #2401

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

vpavlin
Copy link
Member

@vpavlin vpavlin commented Feb 6, 2024

Description

This PR adds support of RLN into NetworkMonitor - so that we can tun it for The Waku Network

Changes

  • add RLN related config options
  • mount RLN relay
  • mount Metadata protocol

How to test

  1. make networkmonitor
  2.  /build/networkmonitor --rln-relay-eth-client-address=$ETH_CLIENT_ADDRESS --bootstrap-node="enr:-QESuEC1p_s3xJzAC_XlOuuNrhVUETmfhbm1wxRGis0f7DlqGSw2FM-p2Ugl_r25UHQJ3f1rIRrpzxJXSMaJe4yk1XFSAYJpZIJ2NIJpcISygI2rim11bHRpYWRkcnO4XAArNiZub2RlLTAxLmRvLWFtczMud2FrdS50ZXN0LnN0YXR1c2ltLm5ldAZ2XwAtNiZub2RlLTAxLmRvLWFtczMud2FrdS50ZXN0LnN0YXR1c2ltLm5ldAYfQN4DgnJzkwABCAAAAAEAAgADAAQABQAGAAeJc2VjcDI1NmsxoQJATXRSRSUyTw_QLB6H_U3oziVQgNRgrXpK7wp2AMyNxYN0Y3CCdl-DdWRwgiMohXdha3UyDw" --pubsub-topic=/waku/2/rs/1/0  --pubsub-topic=/waku/2/rs/1/1   --pubsub-topic=/waku/2/rs/1/2  --pubsub-topic=/waku/2/rs/1/3  --pubsub-topic=/waku/2/rs/1/4  --pubsub-topic=/waku/2/rs/1/5  --pubsub-topic=/waku/2/rs/1/6  --pubsub-topic=/waku/2/rs/1/7 --rln-relay-eth-contract-address=0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4 --rln-relay-tree-path="./rln_tree" 
    
  3. curl http://localhost:8008/metrics

Issue

closes #2400

Copy link

github-actions bot commented Feb 6, 2024

This PR may contain changes to configuration options of one of the apps.

If you are introducing a breaking change (i.e. the set of options in latest release would no longer be applicable) make sure the original option is preserved with a deprecation note for 2 following releases before it is actually removed.

Please also make sure the label release-notes is added to make sure any changes to the user interface are properly announced in changelog and release notes.

Copy link

github-actions bot commented Feb 6, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2401

Built from fb79f60

defaultValue: true
name: "rln-relay" }: bool

rlnRelayCredIndex* {.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since network monitor will just monitor and not publish messages, maybe rlnRelayCredIndex can be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense, removed

Copy link
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for it! 💯

Copy link
Contributor

@alrevuelta alrevuelta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

error "failed to mount waku metadata protocol: ", err=error
quit 1

for pubsubTopic in conf.pubsubTopics:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case you want to simplify the cli config just added this:
https://github.com/waku-org/nwaku/blob/master/apps/wakunode2/networks_config.nim#L20-L40

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I just imported the config from wakunode2 - I don't like it, but it's a reasonable start, if this gets moved to more general location, we can change this. But I felt like this is a better approach than to copy it to networkmonitor app

@vpavlin vpavlin merged commit 9c0e943 into master Feb 12, 2024
9 of 10 checks passed
@vpavlin vpavlin deleted the feat/networkmonitor-twn branch February 12, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add support for RLN into Network Monitor
3 participants