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: verify proofs based on bandwidth usage #616

Closed
wants to merge 2 commits into from

Conversation

richard-ramos
Copy link
Member

@richard-ramos richard-ramos commented Jul 27, 2023

Runs rln verification only if bandwidth exceeds 1mbps

@status-im-auto
Copy link

status-im-auto commented Jul 27, 2023

Jenkins Builds

Click to see older builds (5)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c5f8540 #1 2023-07-27 21:56:19 ~1 min linux 📦deb
✔️ c5f8540 #1 2023-07-27 21:57:00 ~2 min nix-flake 📄log
✖️ c5f8540 #1 2023-07-27 21:57:14 ~2 min tests 📄log
✔️ c5f8540 #1 2023-07-27 21:58:59 ~4 min android 📦tgz
✔️ c5f8540 #1 2023-07-27 21:59:41 ~4 min ios 📦tgz
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d241dad #2 2023-07-28 12:57:15 ~36 sec linux 📦deb
✔️ d241dad #2 2023-07-28 12:58:39 ~1 min nix-flake 📄log
✔️ d241dad #2 2023-07-28 12:59:16 ~2 min tests 📄log
✔️ d241dad #2 2023-07-28 12:59:51 ~3 min ios 📦tgz
✔️ d241dad #2 2023-07-28 13:00:21 ~3 min android 📦tgz
✔️ 4e7909b #3 2023-07-31 18:38:24 ~1 min linux 📦deb
✔️ 4e7909b #3 2023-07-31 18:38:58 ~1 min nix-flake 📄log
✔️ 4e7909b #3 2023-07-31 18:39:42 ~2 min tests 📄log
✔️ 4e7909b #3 2023-07-31 18:40:55 ~3 min android 📦tgz
✔️ 4e7909b #3 2023-07-31 18:41:49 ~4 min ios 📦tgz
✔️ 4e7909b #1 2023-08-09 08:00:12 ~3 min tests 📄log

&cli.IntFlag{
Name: "rln-relay-bandwidth-threshold",
Value: 0,
Usage: "Message rate in bytes/sec after which verification of proofs should happen. Use 0 to disable bandwidth rate limits",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you meant Message rage in bits/sec as bandwidth is always represented in bits/sec.

Copy link
Member Author

Choose a reason for hiding this comment

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

I copy-pasted this text from nwaku :-P
But then, checking how the bandwidth is verified, I use bytes there (len of a byte slice)

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was more from a user-facing experience point of view. People are using to bits/sec when bandwidth is specified. We should keep the user-facing flag to use bits/sec and internally multiply by 8 to store the rate as it is easy to account.

Let us ask the nwaku team also to follow the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

cc: @rymnc

Copy link

Choose a reason for hiding this comment

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

Hmm yes, we have to revert that commit. Based on our offsite discussion, we will have to move the bandwidth constraining into its own validator, before the rln-relay validator - I'll create an issue and link it here for the design, does that work?

And yes, we'll use bits/sec!

Copy link
Member Author

@richard-ramos richard-ramos Aug 1, 2023

Choose a reason for hiding this comment

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

Works for me. I'll keep the PR open and update it according to the design. Thank you!

Choose a reason for hiding this comment

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

@rymnc i would say we also need to remove that flag and have it as a hardcoded parameter? otherwise if different nodes have different configuration a message can be valid for ones not not for others.

cmd/waku/options.go Outdated Show resolved Hide resolved
waku/v2/node/wakunode2_rln.go Outdated Show resolved Hide resolved
@chaitanyaprem
Copy link
Collaborator

chaitanyaprem commented Jan 10, 2024

I think this PR is no longer requried and can be closed.
If we see the need for this feature at a later point in time, we can take code from this and create a new PR then

WDYT @richard-ramos

@richard-ramos richard-ramos deleted the bandwidth-rate-limit branch May 7, 2024 18:05
@richard-ramos richard-ramos restored the bandwidth-rate-limit branch May 7, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:1.3: Node bandwidth management mechanism See https://github.com/waku-org/pm/issues/66 for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants