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

chore(rln-relay-v2): wakunode testing + improvements #2501

Merged
merged 5 commits into from
Mar 12, 2024

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Mar 5, 2024

Description

Follows suit with the changes that were made in #2482, #2484

Updates the wakunode tests for rln-v2, defaulting the UserMessageLimit to 1 for testing purposes.

Note

This PR wraps up the modifications to all the tests related to rln-v2, and does not add additional test vectors. We should be ready to test this in waku-simulator.

Changes

  • Updates broken tests in NonceManager
  • Updates wakunode tests and waku_node_rest tests

How to test

  1. RLN_V2=true make -j16 test

Issue

closes #2345

Copy link

github-actions bot commented Mar 5, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2501

Built from 13227c2

@rymnc rymnc self-assigned this Mar 5, 2024
@rymnc rymnc changed the title chore(rln-relay-v2): additional testing chore(rln-relay-v2): wakunode testing + improvements Mar 5, 2024
@rymnc rymnc force-pushed the rln-relay-v2-more-tests branch 4 times, most recently from 0988ea7 to 5d5c5ca Compare March 6, 2024 11:52
@rymnc rymnc added the E:RLN on mainnet see https://github.com/waku-org/pm/issues/98 for details label Mar 6, 2024
@rymnc rymnc force-pushed the rln-relay-v2-more-tests branch 2 times, most recently from 26fbdb9 to 7e1bfd8 Compare March 6, 2024 18:33
@rymnc rymnc marked this pull request as ready for review March 6, 2024 18:46
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! 💯
Just added minor comments :)

@@ -55,11 +55,12 @@ jobs:
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }}
strategy:
matrix:
rln_v2 : [true, false]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. Does that imply that the rln_v2 param is false for MacOS?

@@ -58,7 +58,7 @@ const
# rln-v2: rate commitments are used for the Merkle tree construction, defaulting the UserMessageLimit to 20
# the root is created locally, using createMembershipList proc from waku_rln_relay_utils module, and the result is hardcoded in here
when defined(rln_v2):
const StaticGroupMerkleRoot* = "0a15ba7c5753ee78e8126603113028a343c1a01ffcb389565c76626be158e964"
const StaticGroupMerkleRoot* = "2c149e48886b5ba3da2edf8db8d7a364ae7a25618489c04cf0c0380f7cdd4d6f"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this needs to be changed if the StaticGroupKeys seems not to be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because the leaves in the tree are derived from StaticGroupKeys in rln-v2, the leaf inserted is actually poseidon([identity_commitment, user_message_limit]) for the static group we default to 20 as the user_message_limit :)

waku/waku_rln_relay/rln/wrappers.nim Outdated Show resolved Hide resolved
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, some minor comments.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
tests/waku_rln_relay/test_waku_rln_relay.nim Show resolved Hide resolved
tests/waku_rln_relay/test_waku_rln_relay.nim Show resolved Hide resolved
@rymnc rymnc merged commit 059cb97 into master Mar 12, 2024
13 of 14 checks passed
@rymnc rymnc deleted the rln-relay-v2-more-tests branch March 12, 2024 10:50
@waku-org waku-org deleted a comment from hany21 Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:RLN on mainnet see https://github.com/waku-org/pm/issues/98 for details
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

PoC: rln-v2 in waku
3 participants