Skip to content

migrate to RLNv2: update contract abstraction #2242

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

Closed
4 tasks done
Tracked by #2218
danisharora099 opened this issue Jan 30, 2025 · 4 comments · Fixed by #2262
Closed
4 tasks done
Tracked by #2218

migrate to RLNv2: update contract abstraction #2242

danisharora099 opened this issue Jan 30, 2025 · 4 comments · Fixed by #2262
Assignees

Comments

@danisharora099
Copy link
Collaborator

danisharora099 commented Jan 30, 2025

Description

The js-rln library currently interacts with RLN v1 contracts. With the completion of the RLN v2 contract abstraction, we need to update js-rln to be compatible with the new contract architecture.

This update will:

  • Ensure js-rln supports membership management functions as per RLN v2.
  • Update the contract interactions to reflect new membership states (Active, GracePeriod, Expired, etc.).
  • Align rate-limiting logic with RLN v2's dynamic rate allocation Support rate-limiting logic for memberships

User Story

  • As a developer, I want js-rln to be compatible with RLN v2 so that I can integrate it seamlessly with dApps that use the latest contract version.
  • As a Waku node operator, I want the RLN proof verification process in js-rln to align with the updated rate-limiting rules in RLN v2
  • As a user of RLN-enabled applications, I want to interact with the RLN v2 contract without issues when registering, extending, or withdrawing memberships.

Proposed Solution / Feature Design

1. Upgrade Contract Interactions

  • Update function calls in js-rln to align with the new RLN v2 contract methods.
  • Implement handling for new membership lifecycle states.

2. Adapt Membership Management

  • Ensure js-rln correctly registers, extends, and erases memberships based on RLN v2 rules.
  • Implement logic to handle expired memberships and rate-limit reuse.

Notes

@chair28980 chair28980 added this to Waku Jan 30, 2025
@danisharora099 danisharora099 self-assigned this Jan 30, 2025
@danisharora099 danisharora099 moved this to In Progress in Waku Jan 30, 2025
@weboko
Copy link
Collaborator

weboko commented Feb 3, 2025

@danisharora099 can you, please, specify scope of this task and attach PRs if present

@danisharora099
Copy link
Collaborator Author

@danisharora099 can you, please, specify scope of this task and attach PRs if present

updated

@weboko weboko moved this from In Progress to Code Review / QA in Waku Feb 25, 2025
@github-project-automation github-project-automation bot moved this from Code Review / QA to Done in Waku Mar 3, 2025
@fryorcraken
Copy link
Collaborator

Align rate-limiting logic with RLN v2's dynamic rate allocation.

@danisharora099 what do you mean on this logic? NOT for proof validation, right?

As a developer, I want js-rln to be compatible with RLN v2 so that I can integrate it seamlessly with dApps that use the latest contract version.

Nope, we don't need that

As a Waku node operator, I want the RLN proof verification process in js-rln to align with the updated rate-limiting rules in RLN v2.

Nope, we don't need that. I just need to be able to REGISTER a membership, and pass the resulting credentials to my wakunode2

As a user of RLN-enabled applications, I want to interact with the RLN v2 contract without issues when registering, extending, or withdrawing memberships.

yes

@danisharora099
Copy link
Collaborator Author

@danisharora099 what do you mean on this logic? NOT for proof validation, right?

This refers to supporting rate limit related methods from the contract: eg: currentTotalRateLimit, minTotalRateLimit, isValidMembershipRateLimit, etc

Nope, we don't need that. I just need to be able to REGISTER a membership, and pass the resulting credentials to my wakunode2

Yes, we descoped it out of this issue (as it doesn't align with our milestone), but wasn't updated part of the issue description here. Updated the description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants