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

fix: network monitor improvements #2939

Merged
merged 2 commits into from
Jul 30, 2024
Merged

fix: network monitor improvements #2939

merged 2 commits into from
Jul 30, 2024

Conversation

chaitanyaprem
Copy link
Contributor

@chaitanyaprem chaitanyaprem commented Jul 26, 2024

Description

Wanted to run network monitor to get an idea of status network with clusterID 16 especially to debug peer discovery and connectivity.
Noticed that peer filtering was not happening and it was trying to connect to all peers even from TWN and made changes.

Changes

  • addressed change to filter peers based on cluster and shards.
  • did some minor updates so that multiaddrs of the peers are also recorded and can be fetched via REST API.
  • added docker-compose and prometheus config to scrape metrics - not sure if this repo is the right-place or shall we have a network-monitor repo @vpavlin with docker-compose to spin up an instance?

@chaitanyaprem chaitanyaprem changed the title fix: nmon improvements fix: network monitor improvements Jul 26, 2024
Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2939

Built from 2088b1c

Copy link
Contributor

@SionoiS SionoiS left a comment

Choose a reason for hiding this comment

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

Changes looks good!

Code organization wise I'll let @vpavlin chime in.

@SionoiS
Copy link
Contributor

SionoiS commented Jul 26, 2024

We're thinking alike :P -> #2930

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! Very insightful one! 💯

--rln-relay Enable spam protection through rln-relay: true|false [=true].
--rln-relay-dynamic Enable waku-rln-relay with on-chain dynamic group management: true|false
[=true].
--rln-relay-tree-path Path to the RLN merkle tree sled db (https://github.com/spacejam/sled).
Copy link
Collaborator

Choose a reason for hiding this comment

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

qq: what is "sled" :) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sled is a database used by RLN for storing the tree

--rln-relay-eth-contract-address Address of membership contract on an Ethereum testnet.
--rln-relay-epoch-sec Epoch size in seconds used to rate limit RLN memberships. Default is 1 second.
[=1].
--rln-relay-user-message-limit Set a user message limit for the rln membership registration. Must be a positive
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
--rln-relay-user-message-limit Set a user message limit for the rln membership registration. Must be a positive
--rln-relay-user-message-limit Set a user message limit (number of messages per epoch) for the rln membership registration. Must be a positive.

let totalNodes = flatNodes.len
let seenNodes = flatNodes.countIt(it.seen)
let totalNodes = discoveredNodes.len
#let seenNodes = totalNodes
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can directly remove that line

Suggested change
#let seenNodes = totalNodes


info "discovered nodes: ", total = totalNodes, seen = seenNodes
info "discovered nodes: ", total = totalNodes #, seen = seenNodes
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can either remove that comment or uncomment it and uncomment the previous line

Suggested change
info "discovered nodes: ", total = totalNodes #, seen = seenNodes
info "discovered nodes: ", total = totalNodes

ports:
- '3000:3000'
volumes:
- grafana-data:/var/lib/grafana
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm very curious about what the Grafana boards look like. For some reason, I miss the definition of the Grafana board itself

@gabrielmer gabrielmer merged commit 8058323 into master Jul 30, 2024
21 of 22 checks passed
@gabrielmer gabrielmer deleted the fix/nmon-improvements branch July 30, 2024 13:56
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.

4 participants