Skip to content

Reduce rln tests duration - #4030

Draft
stubbsta wants to merge 5 commits into
masterfrom
improvement/reduce-rln-test-duration
Draft

Reduce rln tests duration#4030
stubbsta wants to merge 5 commits into
masterfrom
improvement/reduce-rln-test-duration

Conversation

@stubbsta

Copy link
Copy Markdown
Contributor

Description

Changes

Issue

closes #

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

You can find the images built from this PR at

quay.io/wakuorg/nwaku-pr:4030
quay.io/wakuorg/nwaku-pr:4030-logosdeliverynode

Built from 0975342

@stubbsta
stubbsta force-pushed the improvement/reduce-rln-test-duration branch from c22aa77 to f133a17 Compare July 14, 2026 09:28
stubbsta and others added 5 commits August 3, 2026 10:52
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
stubbsta force-pushed the improvement/reduce-rln-test-duration branch from f133a17 to b0e3169 Compare August 3, 2026 09:03
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.

1 participant