Skip to content

feat(ffi): reach LAN devnets from connect_from_devnet_manifest*#211

Merged
Nic-dorman merged 1 commit into
mainfrom
chore/ffi-lan-devnet-connect
Jul 9, 2026
Merged

feat(ffi): reach LAN devnets from connect_from_devnet_manifest*#211
Nic-dorman merged 1 commit into
mainfrom
chore/ffi-lan-devnet-connect

Conversation

@Nic-dorman

Copy link
Copy Markdown
Collaborator

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 keeps local(true). allow_loopback(true) retained either way. Applied to both connect_from_devnet_manifest and connect_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 a devnet feature — 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-client WIP branch). Unblocks V2-578.

cargo build + clippy -D warnings + fmt --check + tests + cargo audit all green.

🤖 Generated with Claude Code

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>
@Nic-dorman
Nic-dorman merged commit 1af8462 into main Jul 9, 2026
2 checks passed
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