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): add chain-id flag to wakunode and restrict usage if mismatches rpc provider #2858

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Jun 28, 2024

Description

As requested by @alrevuelta to restrict chainId usage and waku node initialization should fail if user erroneously passes in an rpc url for another chain.

Changes

  • All config changes from WakuNodeConf down to GroupManager
  • Tests

@rymnc rymnc requested a review from alrevuelta June 28, 2024 07:25
@rymnc rymnc self-assigned this Jun 28, 2024
Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2858

Built from d4fc2d6

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.

Not sure i follow. Shouldn't this fail? rln-relay-chain-id is wrong

docker run quay.io/wakuorg/nwaku-pr:2858 \
--cluster-id=1 \
--rln-relay-eth-client-address=https://rpc.cardona.zkevm-rpc.com \
--log-level=DEBUG \
--rln-relay-chain-id=111111

@rymnc
Copy link
Contributor Author

rymnc commented Jun 28, 2024

Not sure i follow. Shouldn't this fail? rln-relay-chain-id is wrong

docker run quay.io/wakuorg/nwaku-pr:2858 \
--cluster-id=1 \
--rln-relay-eth-client-address=https://rpc.cardona.zkevm-rpc.com \
--log-level=DEBUG \
--rln-relay-chain-id=111111

since you pass in the cluster-id as 1, we override the rln-relay-chain-id, shouldn't that be the intended behaviour?

@alrevuelta
Copy link
Contributor

since you pass in the cluster-id as 1,

indeed, my bad.

@rymnc rymnc marked this pull request as ready for review June 28, 2024 08:59
@alrevuelta alrevuelta self-requested a review June 28, 2024 09:07
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!

@alrevuelta alrevuelta merged commit 05356ab into release/v0.30 Jun 28, 2024
9 of 10 checks passed
@alrevuelta alrevuelta deleted the chain-id-fix branch June 28, 2024 09:19
Ivansete-status added a commit that referenced this pull request Jul 2, 2024
* CHANGELOG.md add info for v0.30.0
* fix(rln-relay): clear nullifier log only if length is over max epoch gap (#2836)
* chore: add TWN parameters for RLNv2 (#2843)
* fix(rln): nullifierlog vulnerability (#2855)
* chore(rln-relay): add chain-id flag to wakunode and restrict usage if mismatches rpc provider (#2858)

---------

Co-authored-by: Aaryamann Challani <[email protected]>
Co-authored-by: Alvaro Revuelta <[email protected]>
Ivansete-status added a commit that referenced this pull request Jul 2, 2024
chore: Update master from release v0.30 (#2866)

* CHANGELOG.md add info for v0.30.0
* fix(rln-relay): clear nullifier log only if length is over max epoch gap (#2836)
* chore: add TWN parameters for RLNv2 (#2843)
* fix(rln): nullifierlog vulnerability (#2855)
* chore(rln-relay): add chain-id flag to wakunode and restrict usage if mismatches rpc provider (#2858)
    
---------

Co-authored-by: Aaryamann Challani <[email protected]>
Co-authored-by: Alvaro Revuelta <[email protected]>
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.

2 participants