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: regex for rpc endpoint #2563

Merged
merged 1 commit into from
Apr 2, 2024
Merged

fix: regex for rpc endpoint #2563

merged 1 commit into from
Apr 2, 2024

Conversation

alrevuelta
Copy link
Contributor

@alrevuelta alrevuelta commented Apr 2, 2024

Description

  • The regex matching --rln-relay-eth-client-address flag was not allowing some valid RPC urls.
  • Example, this should be valid http://foundry:8545
  • But was failing:
Error while processing the rln-relay-eth-client-address=http://foundry:8545 parameter: Invalid HTTP RPC URL
  • This PR fixes it so that it allows such URLs.

It can be also reproduced with:

docker run harbor.status.im/wakuorg/nwaku@sha256:d193792202726c51cd656c48f4ffd04f261ec2d8663a00591947a5aab3677dc5 --rln-relay-eth-client-address="http://foundry:3000"

Error while processing the rln-relay-eth-client-address=http://foundry:3000 parameter: Invalid HTTP RPC URL
Try wakunode2 --help for more information

Copy link

github-actions bot commented Apr 2, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2563-rln-v2-true

Built from 66ecce0

Copy link
Contributor

@rymnc rymnc left a comment

Choose a reason for hiding this comment

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

regex reviews are tricky, but approving so I'm not a blocker.

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!
I just checked with another examples:

https://www.something.com/
http://www.something.com/
https://www.something.edu.co.in
http://www.url-with-path.com/path
https://www.url-with-querystring.com/?url=has-querystring
http://url-without-www-subdomain.com/
https://mail.google.com

@alrevuelta
Copy link
Contributor Author

Thanks, merging since it is blocking, but we need unittests for this kind of thing.

@alrevuelta alrevuelta merged commit c87545d into master Apr 2, 2024
21 of 23 checks passed
@alrevuelta alrevuelta deleted the fix-regex-rpc branch April 2, 2024 13:14
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.

3 participants