fix(op-service): increase Anvil startup timeout 5s → 30s#19424
Merged
smartcontracts merged 1 commit intodevelopfrom Mar 6, 2026
Merged
fix(op-service): increase Anvil startup timeout 5s → 30s#19424smartcontracts merged 1 commit intodevelopfrom
smartcontracts merged 1 commit intodevelopfrom
Conversation
The 5s timeout is too tight under CI load. When 12 parallel test nodes compete for CPU/IO on a 2xlarge box, Anvil sometimes takes >5s to print its "Listening on" line, triggering "anvil did not start in time" in TestImplementations and TestSuperchain. This is the #2 and #3 most frequent flake in the repo over the last 7 days (67 and 46 incidences). 30s gives Anvil enough headroom on a loaded machine while still failing fast on a genuine startup failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
joshklop
approved these changes
Mar 6, 2026
Contributor
joshklop
left a comment
There was a problem hiding this comment.
We really should not be using anvil in unit tests...
ajsutton
added a commit
that referenced
this pull request
Mar 7, 2026
- Rebase onto develop (picks up anvil 30s timeout fix from #19424) - Change RPCReplayOrRecord to prefer cached fixtures over live RPC - Add RPCReplayModePassthrough for fallback without recording side-effects - Pin all tests using DefaultForkedScriptHost to block 10101510 (one block past v6.0.0-rc.2 OPCM deployment) for deterministic fixtures - Add rpc-fixtures-record and rpc-fixtures-verify Makefile targets - Add rpc-fixture-refresh CI job that records, verifies, and caches fixtures on every develop push with Slack notification on failure - Add fixture cache restore to go-tests job template - Gitignore fixture JSON files to prevent accidental commits Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ajsutton
added a commit
that referenced
this pull request
Mar 17, 2026
…laky test The TestImplementations test (66 flakes) relies on the devnet RetryProxy to forward RPC calls to external mainnet/sepolia endpoints. Under CI load (12 parallel nodes on a 2xlarge), the proxy's tight timeouts caused intermittent failures: - Per-request timeout of 5s was insufficient for slow external RPCs under load; increased to 30s (matching the Anvil startup timeout bump in #19424) - Max retries of 5 was too few for sustained rate limiting; increased to 10 - Start() had a race condition: used a 100ms timer instead of a proper ready signal, and failed to return after net.Listen errors. Replaced with a channel-based ready signal that blocks until the listener is actually bound. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 17, 2026
…laky test (#19593) The TestImplementations test (66 flakes) relies on the devnet RetryProxy to forward RPC calls to external mainnet/sepolia endpoints. Under CI load (12 parallel nodes on a 2xlarge), the proxy's tight timeouts caused intermittent failures: - Per-request timeout of 5s was insufficient for slow external RPCs under load; increased to 30s (matching the Anvil startup timeout bump in #19424) - Max retries of 5 was too few for sustained rate limiting; increased to 10 - Start() had a race condition: used a 100ms timer instead of a proper ready signal, and failed to return after net.Listen errors. Replaced with a channel-based ready signal that blocks until the listener is actually bound. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
op-service/testutils/devnet/anvil.gofrom 5 seconds to 30 secondsTestImplementationsandTestSuperchaininop-deployer/pkg/deployer/bootstrap— the Add Utils for Full Node Provider #2 and Add new Documentation #3 most frequent flakes in the repo over the last 7 days (67 and 46 incidences respectively)Root Cause
Anvil.Start()waits for Anvil to print"Listening on 127.0.0.1"before returning. With a 5s timeout, this races against CI load: when 12 parallel nodes share a2xlargebox, Anvil occasionally takes >5s to initialize, producing:The test retries usually recover (job passes), but about 1 in N runs exhausts retries and the job fails hard — as seen in job #4491716.
Verification
Reproduced locally by setting timeout to 1ms → confirmed
anvil did not start in time. With 30s → Anvil starts successfully every time.🤖 Generated with Claude Code