js-waku icon indicating copy to clipboard operation
js-waku copied to clipboard

feat: add rpc url to nwaku, persist rln tree in docker and ci

Open adklempner opened this issue 3 months ago • 1 comments

Problem

Tests that run against cluster id 1 (The Waku Network) require running an nwaku node with a sepolia RPC url. When adding this parameter, the nwaku node will not be "ready" (/health returns status 200) until the RLN tree is synced. If starting from scratch, this process takes a long time (up to 5 minutes, and will only take longer as more blocks are mined on Sepolia).

Solution

Add a step to the CI that:

  • checks if the rln_tree.db is stored as an artifact. If so, pull it.
  • run an nwaku node in docker that mounts the rln_tree.db until the /health endpoint returns 200 (basically syncs the rln_tree to latest block on sepolia)
  • store the synced rln_tree.db as an artifact

Notes

  • Resolves #1914

Contribution checklist:

  • [ ] covered by unit tests;
  • [ ] covered by e2e test;
  • [ ] add ! in title if breaks public API;

adklempner avatar May 04 '24 00:05 adklempner