feat(ffi): reach LAN devnets from connect_from_devnet_manifest*#211
Merged
Conversation
The devnet-manifest connect paths hardcoded `.local(true)` (loopback bind), which physically cannot dial a LAN devnet's bootstrap peers (e.g. a node advertising 192.168.x) — dials never leave the box and the DHT reports "Found 0 peers, need 7". Auto-detect LAN vs loopback from the manifest: if any bootstrap addr is non-loopback, bind 0.0.0.0 (`local(false)`); an all-loopback devnet keeps `local(true)`. `allow_loopback(true)` is retained either way. Applied to both connect_from_devnet_manifest and connect_from_devnet_manifest_external_signer. Ungated: these are already test-only devnet functions (production uses connect / connect_with_wallet / connect_for_external_signer, untouched), and the change is a no-op unless a LAN devnet manifest is loaded — so there is no production behavior change. Unblocks cross-device LAN devnet testing (V2-578). build + clippy -D + fmt + tests + audit green. Co-Authored-By: Claude Opus 4.8 (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.
The devnet-manifest connect paths hardcoded
.local(true)(loopback bind), which physically cannot dial a LAN devnet's bootstrap peers (a node advertising e.g.192.168.0.62) — dials never leave the box and the DHT reports "Found 0 peers, need 7". This blocks cross-device / physical-device testing against a LAN devnet.Fix: auto-detect LAN vs loopback from the manifest — if any bootstrap addr is non-loopback, bind
0.0.0.0(local(false)); an all-loopback devnet keepslocal(true).allow_loopback(true)retained either way. Applied to bothconnect_from_devnet_manifestandconnect_from_devnet_manifest_external_signer.Ungated, and why that's safe: these are already test-only devnet-manifest functions (a production app connects via
connect/connect_with_wallet/connect_for_external_signer, all untouched). The change is a no-op unless a LAN devnet manifest is loaded, so there is no production behavior change. (A future prod-hardening pass can strip the whole devnet-connect surface behind adevnetfeature — tracked separately.)Proven end-to-end 2026-07-08 on iOS sim + physical Android S10 against the dev2 LAN devnet (the fix previously lived on the unmerged
feat/ffi-lan-devnet-clientWIP branch). Unblocks V2-578.cargo build+clippy -D warnings+fmt --check+ tests +cargo auditall green.🤖 Generated with Claude Code