feat(anvil): add --no-fork-node-info to skip fork identity probes - #16778
Open
andreyobruchkov wants to merge 1 commit into
Open
feat(anvil): add --no-fork-node-info to skip fork identity probes#16778andreyobruchkov wants to merge 1 commit into
andreyobruchkov wants to merge 1 commit into
Conversation
Some public RPCs retry unknown methods for tens of seconds instead of returning method-not-found. Skipping anvil_nodeInfo/anvil_metadata lets Anvil bind after the usual eth_* fork reads. Co-authored-by: Cursor <cursoragent@cursor.com>
andreyobruchkov
requested review from
0xrusowsky,
DaniPopes,
figtracer,
grandizzy,
mablr,
mattsse and
stevencartavia
as code owners
September 10, 2026 07:25
Contributor
✅ Changelog foundThe deterministic check will validate the changed entry. |
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.
Motivation
Anvil probes the fork URL with
anvil_nodeInfo(andanvil_metadataif that succeeds) before it binds the listen port. That is how nested Anvil is detected.Some public RPCs do not fail-fast on unknown methods. They retry/hedge at the gateway for ~18s, then return
-32601. For those endpoints, Anvil can take ~30s to listen even thougheth_chainId/eth_getBlockByNumberare fast.Callers that wait on localhost RPC (and then SIGINT) hit a start timeout even though the chain itself is healthy.
Solution
Add
--no-fork-node-info(requires--fork-url). When set, Anvil skipsanvil_nodeInfo/anvil_metadataand treats the endpoint as a regular chain:eth_chainId,eth_getBlockByNumber,eth_gasPricestill run.Example:
This PR was written with Cursor (Grok). I specified the flag and the skip-probe behavior; the implementation and tests were generated in that session.
PR Checklist
Made with Cursor