fix(devnet): bind Anvil to --host so LAN clients can reach the manifest rpc_url - #200
Open
Nic-dorman wants to merge 1 commit into
Open
fix(devnet): bind Anvil to --host so LAN clients can reach the manifest rpc_url#200Nic-dorman wants to merge 1 commit into
Nic-dorman wants to merge 1 commit into
Conversation
…st rpc_url --host LAN-exposes the nodes and the manifest server, but --enable-evm left Anvil on localhost and published that loopback URL in the manifest's rpc_url — other LAN devices could join and download but not pay, which is the exact audience --host serves. evmlib already honors ANVIL_IP_ADDR for both the bind and the published URL, so when --host and --enable-evm are set and ANVIL_IP_ADDR is not, default it to the host IP (an explicit override still wins). Verified live on a LAN box: the manifest published http://<host-ip>:<port>/ and eth_chainId answered from another machine with no tunnel. Co-Authored-By: Claude Fable 5 <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.
Linear issue
V2-950
Risk tier
Compatibility
ant-devnet); node code untouched.--host <ip> --enable-evmand no explicitANVIL_IP_ADDR, Anvil now binds the host IP and the manifest'srpc_urlbecomes LAN-reachable. An explicitANVIL_IP_ADDRstill wins; loopback devnets (no--host) keep Anvil's localhost default exactly as before.Semver impact
Test evidence
http://localhost:<port>/(other devices can join/download but not pay — an external-signer LAN validation had to tunnel the RPC over SSH); with the env var set as this patch now does automatically, the manifest publishedhttp://192.168.0.61:37365/andeth_chainIdanswered from a second machine directly.anvil_ip_for_lan): host→ip, explicit-override-wins, loopback-devnet-untouched.cargo test --bin ant-devnet: 8/8.cargo fmt --checkclean; clippy (panic/unwrap/expect denied) clean on the bin.New dependency
none
ADR
n/a
Mitigation / rollback
Revert the commit; operators can always set
ANVIL_IP_ADDRby hand (which this patch never overrides).🤖 Generated with Claude Code