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

Integrate onchain RLN #17

Closed
alrevuelta opened this issue Jan 23, 2024 · 6 comments · Fixed by #30
Closed

Integrate onchain RLN #17

alrevuelta opened this issue Jan 23, 2024 · 6 comments · Fixed by #30
Assignees
Labels
good first issue Good for newcomers

Comments

@alrevuelta
Copy link
Collaborator

alrevuelta commented Jan 23, 2024

The goal is to have integration tests running in CI that use onchain RLN, since by now we just have static RLN, and hence no interactions with the blockchain are being tested.

Tasks:

  •  Integrate a tool such as hardhat to deploy our own blockchain.
  •  Write some scripts to deploy rln contract there.
  •  Use a script to run RLN registrations.
@jm-clius jm-clius added the good first issue Good for newcomers label Feb 9, 2024
@stubbsta
Copy link
Contributor

Feedback on discussions with team regarding tools to deploy a private ethereum testnet:

-geth is probably overkill for the requirements

-implementation using ganache is present in code:
https://github.com/waku-org/nwaku/blob/c55ca0675656b51fb36a725f45a0963f45068ec5/tests/waku_rln_relay/test_rln_group_manager_onchain.nim#L1

note:

ganache (and truffle) are being deprecated/sunsetted (https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat)

-foundry based project can be found here:
https://github.com/vacp2p/rln-contract

note:
<alrevuelta — 16/02/2024 11:55>

"anvil" seems to be the node that "foundry" offers?
https://github.com/foundry-rs/foundry/tree/master/crates/anvil
?

note that for waku-simulator, we dont intend to use to to run smart contract unit tests, which may differ a bit from https://github.com/waku-org/waku-rln-contract

<p1ge0nh8er — 16/02/2024 11:59>

but you can reuse the migration/deployment scripts from there
yarn deploy:localhost_integration will get the job done provided the ganache/anvil/hardhat node has the http rpc port open on 8545

-hardhat project can be found here:
https://github.com/waku-org/waku-rln-contract

@alrevuelta
Copy link
Collaborator Author

Related @stubbsta fyi
waku-org/nwaku#2449

@stubbsta stubbsta self-assigned this Feb 26, 2024
@stubbsta
Copy link
Contributor

We went with the anvil tool (from foundry) to deploy our own blockchain, motivation for this decision is based on general research and this feedback from p1ge0nh8er who has more experience with deploying testnets:
p1ge0nh8er — 21/02/2024 08:07
...
while hardhat is great, foundry/anvil is better in terms of developer support, feature/fix shipping, which is why i use anvil here
we do plan to move https://github.com/waku-org/waku-rln-contract to https://github.com/vacp2p/foundry-template for advanced testing methods, and using anvil here will make sure we don't have any unintended test failures due to version mismatch etc

@stubbsta
Copy link
Contributor

The next step is to deploy a local block explorer to assist with debugging when going forward with the contract deployments on the anvil testnet. Looking at Ethernal which support for Anvil

@stubbsta
Copy link
Contributor

stubbsta commented Mar 6, 2024

Local blockchain explorer, Chainlens, has been deployed in the simulator (Support/instructions for the Ethernal docker deployment is outdated).
Access to the chainlens UI is at localhost:3001 (it can take quite long to load after the service startup, >5min)

@stubbsta
Copy link
Contributor

stubbsta commented Mar 6, 2024

Verified that the waku-rln-contract can be successfully deployed on the private anvil blockchain, using "yarn deploy:localhost"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants