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

[Epic: Dogfooding] Deliver RLN v2 + RLN in resource-restricted to The Waku Network #168

Closed
25 tasks done
Tracked by #204
alrevuelta opened this issue May 17, 2024 · 22 comments
Closed
25 tasks done
Tracked by #204
Assignees
Labels

Comments

@alrevuelta
Copy link
Collaborator

alrevuelta commented May 17, 2024

Summary

Based on the work done on previous milestones that included both research and development:

This new milestone tracks the shipping of the above developed features i) RLNv2 and ii) RLN in resource-restricted clients into The Waku Network. See waku-org/research#96 and waku-org/nwaku#2345.

Note that both features are tracked together since they imply breaking changes in the smart contract.

  • RLN v2 introduces userMessageLimit in membership registration.
  • RLN in resource-restricted clients introduces a new function merkleProofElements.

Both changes will be introduced together to merge two backward incompatible changes into a single one, which has fewer effects on The Waku Network users.

Epics

@alrevuelta alrevuelta added the Deliverable Tracks a Deliverable label May 17, 2024
@rymnc
Copy link

rymnc commented May 17, 2024

cc: @kaiserd, added vac acz milestone in logos-co/roadmap@986ebd5

@alrevuelta
Copy link
Collaborator Author

alrevuelta commented May 29, 2024

Implement changes in zerokit RLNv2 (>0.4.0)

Required changes in zerokit done and merged: vacp2p/zerokit#255

@alrevuelta
Copy link
Collaborator Author

alrevuelta commented May 29, 2024

Integrate RLNv2 into go-zerokit

done and merged: waku-org/go-zerokit-rln#21
The main reason for integrating zerokit in go (go-zerokit) is that go allows to iterate faster and develop tooling for testing than in nim.

@alrevuelta
Copy link
Collaborator Author

Integrate custom witness for RLNv2 in go-zerokit

Done in waku-org/go-zerokit-rln#22

@alrevuelta
Copy link
Collaborator Author

Deliver end-to-end PoC working in The Waku Network showcasing the new features.

Done here: alrevuelta/go-waku-light#5

@alrevuelta
Copy link
Collaborator Author

New smart contract with both RLNv2 and RLN in resource-restricted clients changes:

Done by @rymnc here: https://github.com/waku-org/waku-rlnv2-contract

@alrevuelta
Copy link
Collaborator Author

Develop tooling in waku-simulator to allow rlnv2 testing

Done by @stubbsta here: waku-org/waku-simulator#45

@chair28980 chair28980 changed the title [Milestone] Deliver RLN v2 + RLN in resource-restricted to The Waku Network [Epic: Dogfooding] Deliver RLN v2 + RLN in resource-restricted to The Waku Network Jun 19, 2024
@chair28980 chair28980 added Epic Tracks a sub-team Epic. and removed Deliverable Tracks a Deliverable labels Jun 19, 2024
@chair28980 chair28980 changed the title [Epic: Dogfooding] Deliver RLN v2 + RLN in resource-restricted to The Waku Network Deliver RLN v2 + RLN in resource-restricted to The Waku Network Jun 19, 2024
@chair28980 chair28980 mentioned this issue Jun 19, 2024
@chair28980 chair28980 changed the title Deliver RLN v2 + RLN in resource-restricted to The Waku Network [Epic: Dogfooding] Deliver RLN v2 + RLN in resource-restricted to The Waku Network Jun 19, 2024
@alrevuelta
Copy link
Collaborator Author

Make RLNv2 the default waku RLN, removing feature flag and RLN v1

Done in here by @rymnc waku-org/nwaku#2828

@alrevuelta
Copy link
Collaborator Author

Prepare testing plan for release v0.30.0 to test RLNv2 + onchain merkle trees:

Done by @stubbsta in https://www.notion.so/Waku-RLNv2-End-to-End-Testing-with-Waku-simulator-6f50a5613eb44ae38e2dbbcfa72b7417

@alrevuelta
Copy link
Collaborator Author

Documentation to use waku-simulator for testing

Done: https://waku-org.github.io/waku-simulator/

@alrevuelta
Copy link
Collaborator Author

Deploy and consider using a L2 testnet.

Deployed in PolygonzkEVM testnet: https://cardona-zkevm.polygonscan.com/address/0x4976df0f61135ef3e5720d92eade2e5f47a68ef9 by @rymnc

@alrevuelta
Copy link
Collaborator Author

Decide epoch size (rln-relay-epoch-sec) and user message limit (rln-relay-user-message-limit) for TWN

Done, parameters set for The Waku Network: waku-org/nwaku#2843

@alrevuelta
Copy link
Collaborator Author

bug fixed

waku-org/nwaku#2855

@alrevuelta
Copy link
Collaborator Author

Come up with final gas estimation after the optimizations (RLN v2 + RLN in resource-restricted)

Here we show the results of forge test --gas-report -vv of the register function. It shows the gas consumption of the call for different tree sizes.

With 100k memberships
image

With 10k memberships
image

In both cases:

  • mean gas: 127k
  • median gas: 83k
  • some other higher value hits very rarely but stays withing some reasonable limits.

@alrevuelta
Copy link
Collaborator Author

Release v0.30.0 including RLNv2 + onchain trees

Done here https://github.com/waku-org/nwaku/releases/tag/v0.30.0 by @Ivansete-status. Thanks for the help with the release.

@alrevuelta
Copy link
Collaborator Author

alrevuelta commented Jul 3, 2024

nwaku-compose changes to allow joining TWN with said configuration:

Done. Now anyone can join the new version of TheWakuNetwork including rlnv2 and onchain merkle trees
waku-org/nwaku-compose#103 Thanks @Ivansete-status for the support.

@alrevuelta
Copy link
Collaborator Author

Deploy release to fleets

Release 0.30.1 deployed by @Ivansete-status to TWN. See https://github.com/waku-org/nwaku/pull/2872/files for the multiaddresses of the bootstrap nodes.

@alrevuelta
Copy link
Collaborator Author

Due to some instability with PolygonzkEVM we decided to stick to Sepolia by now.
Release v0.30.1 containing some fixes:

@alrevuelta
Copy link
Collaborator Author

Deploy new instance of waku simulator to the host

Feature deployed to waku-simulator by @stubbsta waku-org/waku-simulator#84. RLNv2 + onchain trees is live in the private testnet of waku-simulator:

@alrevuelta
Copy link
Collaborator Author

The Waku Network spec updated with RLNv2 and new parameters

vacp2p/rfc-index#82

@alrevuelta
Copy link
Collaborator Author

Blog post announcing the new feature

waku-org/blog.waku.org#60
Live at: https://blog.waku.org/rln-v2-stateless-light-clients

@alrevuelta
Copy link
Collaborator Author

RLN-V2+ stateless light clients features are live in The Waku Network. I consider this epic closed. Thanks to anyone involved in making this happen!

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

No branches or pull requests

3 participants