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

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

Merged
merged 1 commit into from
May 13, 2024

Conversation

adklempner
Copy link
Member

@adklempner adklempner commented May 4, 2024

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

For now, the step is disabled. When we have tests that run against TWN, we will enable this job and have it be a prereq for running those tests.

Notes

Contribution checklist:

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

@adklempner adklempner force-pushed the feat/docker-sepolia-rpc branch from f207d99 to 72e5a71 Compare May 4, 2024 00:48
Copy link

github-actions bot commented May 4, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 181.24 KB (0%) 3.7 s (0%) 17.4 s (-11.06% 🔽) 21 s
Waku Simple Light Node 181.32 KB (0%) 3.7 s (0%) 21.8 s (+4.35% 🔺) 25.4 s
ECIES encryption 23.12 KB (0%) 463 ms (0%) 6.1 s (+5.81% 🔺) 6.6 s
Symmetric encryption 22.53 KB (0%) 451 ms (0%) 2.4 s (-50.93% 🔽) 2.8 s
DNS discovery 72.5 KB (0%) 1.5 s (0%) 8.1 s (+4.11% 🔺) 9.6 s
Peer Exchange discovery 74.09 KB (0%) 1.5 s (0%) 6.2 s (-63.48% 🔽) 7.7 s
Local Peer Cache Discovery 67.63 KB (0%) 1.4 s (0%) 9.8 s (-33.36% 🔽) 11.2 s
Privacy preserving protocols 38.88 KB (0%) 778 ms (0%) 7.6 s (-35.25% 🔽) 8.4 s
Waku Filter 111.72 KB (0%) 2.3 s (0%) 18.5 s (+16.75% 🔺) 20.8 s
Waku LightPush 110.26 KB (0%) 2.3 s (0%) 19.2 s (-4.57% 🔽) 21.4 s
History retrieval protocols 110.76 KB (0%) 2.3 s (0%) 12.8 s (-11.58% 🔽) 15 s
Deterministic Message Hashing 7.24 KB (0%) 145 ms (0%) 1.6 s (-54.35% 🔽) 1.8 s

@adklempner adklempner force-pushed the feat/docker-sepolia-rpc branch 6 times, most recently from 56358a9 to 832e7cc Compare May 6, 2024 22:05
@weboko weboko requested a review from fbarbu15 May 7, 2024 09:26
@adklempner adklempner force-pushed the feat/docker-sepolia-rpc branch 2 times, most recently from e7bef35 to 6f847ea Compare May 7, 2024 18:00
@adklempner adklempner marked this pull request as ready for review May 7, 2024 18:02
@adklempner adklempner requested a review from a team as a code owner May 7, 2024 18:02
@adklempner adklempner force-pushed the feat/docker-sepolia-rpc branch from 6f847ea to 9ce3e6b Compare May 9, 2024 16:35
npm run sync-rln-tree
tar -czf rln_tree.tar.gz -C /tmp/rln_tree.db .
- name: Upload artifact
uses: actions/upload-artifact@v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a newer version of this action: actions/upload-artifact@v4

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}
- name: Download RLN tree artifact
if: steps.check-artifact.outputs.artifact_found == 'true'
uses: actions/download-artifact@v3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a newer version of this action: actions/download-artifact@v4

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@adklempner adklempner force-pushed the feat/docker-sepolia-rpc branch from 9ce3e6b to aad819b Compare May 13, 2024 14:42
@adklempner adklempner merged commit f78495a into master May 13, 2024
11 checks passed
@adklempner adklempner deleted the feat/docker-sepolia-rpc branch May 13, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants