Reduce rln tests duration - #4030
Draft
stubbsta wants to merge 5 commits into
Draft
Conversation
|
You can find the images built from this PR at Built from 0975342 |
stubbsta
force-pushed
the
improvement/reduce-rln-test-duration
branch
from
July 14, 2026 09:28
c22aa77 to
f133a17
Compare
Introduce FUNDED_TEST_PRIVATE_KEY and regenerate the cached Anvil state so the account is already funded, holds minted test tokens and has the RLN contract allowance approved. setupOnchainGroupManager with deployContracts=false now short-circuits to buildOnchainGroupManager with that key: no per-run fund/mint/approve transactions or sleeps. The state regeneration flow (test_rln_contract_deployment) funds the fixed key, so regenerated state stays compatible with the constant. Deployed contract addresses are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
stopAnvil gave Anvil a single 200ms window after TERM before sending KILL, risking a truncated state dump during regeneration. It also checked liveness with kill -0, which succeeds for an exited-but-unreaped zombie child, so the KILL escalation fired even after clean exits. Poll osproc running() (which reaps the child) for up to 10s instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
register() built RetryStrategy.new() inline (4s delay, 15 tries) at each retry site. The receipt poll's first attempt races the node's tx indexing and routinely lost, so every registration stalled a full 4s even on instantly-mining Anvil. Store the strategy on OnchainGroupManager instead; init() replaces a zero value with the previous defaults, so production behavior is unchanged. Test managers use 100ms pacing, cutting the onchain group manager suite from ~97s to ~7s. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tests that mount RLN on a WakuNode register through the node's own group manager, which the factory builds from WakuRlnConfig with the production retry pacing — so each of those registrations still stalled 4s on the first receipt poll. Wrap the manager casts in withFastRetries(), which applies the test pacing after mount; register() reads the strategy at call time, so this is effective. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
test_rln_proof_attach.nim (added in #4069) postdates this branch, so its node-internal register() — on the manager created during RLN mount — still paid the 4s production retry delay on every receipt poll. Apply withFastRetries() to it, matching the other node-internal managers this branch already speeds up. Also reflows setupOnchainGroupManager's sendMintCall to nph after the Opt.some conversion made during the rebase conflict resolution (master migrated Option -> Opt while this branch was open). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stubbsta
force-pushed
the
improvement/reduce-rln-test-duration
branch
from
August 3, 2026 09:03
f133a17 to
b0e3169
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes
Issue
closes #