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): waku_rln_number_registered_memberships metrics appropriately handled #2018

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Sep 11, 2023

Description

This PR sets the number of registered memberships to the start index (i.e last index that was inserted) + number of commitments - commitments removed

Upon startup, if we fetch the tree db, there is no way currently from the zerokit ffi api to fetch the number of members registered - hence, we set the metric based on the event thrown by the contract.

Changes

  • changed counter to gauge, since we want to set the value of the collector

Issue

closes #2008

@rymnc rymnc self-assigned this Sep 11, 2023
@rymnc rymnc requested a review from alrevuelta September 11, 2023 05:55
@rymnc rymnc force-pushed the fix-rln-memberships-metric branch from a253e5e to 01954e6 Compare September 11, 2023 06:00
@github-actions
Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2018

Built from b3e03bb

@github-actions
Copy link

You can find the experimental image built from this PR at

quay.io/wakuorg/nwaku-pr:2018-experimental

Built from b3e03bb

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

@rymnc rymnc marked this pull request as ready for review September 11, 2023 06:35
@rymnc
Copy link
Contributor Author

rymnc commented Sep 11, 2023

merging since the ci failure is unrelated

@rymnc rymnc merged commit a4e7833 into master Sep 11, 2023
29 of 30 checks passed
@rymnc rymnc deleted the fix-rln-memberships-metric branch September 11, 2023 13:51
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.

bug(rln): Wrong rln registered memberships metric
2 participants