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

migrate to RLNv2: update contract abstraction #2242

Open
4 tasks done
Tracked by #2218
danisharora099 opened this issue Jan 30, 2025 · 2 comments
Open
4 tasks done
Tracked by #2218

migrate to RLNv2: update contract abstraction #2242

danisharora099 opened this issue Jan 30, 2025 · 2 comments
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.
  • Improve contract upgradability support (e.g., parameter modifications by the owner).
  • Introduce support for meta-transactions where applicable.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants