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(rln-relay): handle empty metadata returned by getMetadata proc #2516

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Mar 6, 2024

  • fix(rln-relay): silence error on startup when metadata is not found
  • chore: fix fetching value from option

Description

This PR silences the execution error that is received when trying to fetch the rln metadata from the db.
Zerokit's PR: vacp2p/zerokit#231
If it returns a buf of len 0, then we assume the metadata is not found, and proceed execution as usual.

Changes

  • updated rln static lib version to v0.3.6
  • updated zerokit submodule
  • added test for empty metadata returned

How to test

  1. make -j16 test

Issue

closes #2471

@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 self-assigned this Mar 6, 2024
Comment on lines 672 to 673
elif metadataGetRes.get().isSome():
let metadata = metadataGetRes.get().get()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not the cleanest, but oh well

@rymnc rymnc changed the title fix(rln-relay): handle empty metadata returned by getMetadata proc' fix(rln-relay): handle empty metadata returned by getMetadata proc Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2516

Built from 28977e5

@rymnc rymnc marked this pull request as ready for review March 6, 2024 21:41
Copy link
Contributor

@gabrielmer gabrielmer 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 so much! 🤩

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! 💯

@rymnc rymnc merged commit 1274b15 into master Mar 8, 2024
9 of 10 checks passed
@rymnc rymnc deleted the get-metadata-error branch March 8, 2024 14:06
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.

chore: avoid execution error: metadata does not exist from ./register_rln.sh
3 participants