Make Tor connection opt-in; default to a direct connection#201
Open
pacu wants to merge 1 commit into
Open
Conversation
Connecting over the built-in Tor client is unreliable: arti performs the
lightwalletd hostname resolution at the exit relay, which intermittently
fails with:
gRPC-over-Tor error: Tonic error: transport error:
Tor error: tor: remote hostname lookup failure:
Protocol error while launching a data stream
Because `--connection` defaulted to `tor`, every networked command
(including `wallet init`/`restore-mnemonic`) could fail out of the box
through no fault of the user.
Change the default connection mode to `direct`. Tor is now an explicit
opt-in via `--connection tor`, and the help text documents this.
Closes #200
Co-Authored-By: Claude Opus 4.8 <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.
Problem
--connectiondefaulted totor, so every networked command (e.g.wallet init,wallet restore-mnemonic,sync) routed through the built-in Tor client by default. Tor bootstraps fine, but the actual connection intermittently fails because arti resolves the lightwalletd hostname at the exit relay:This failure lives in
arti/zcash_client_backend::torand is exit-relay/network dependent, so it isn't something we can reliably fix in this repo. The result was that the tool could fail out of the box through no fault of the user.Fix
Make Tor opt-in:
--connectionis nowdirect.--connection tor.Verification
Re-ran the previously failing flow (
wallet initagainsttestnet.zec.rocks:443) with the new default. It connects directly and completes wallet initialization (data.sqlite,keys.tomlwritten).--connection torstill parses and routes over Tor for users who want it.Closes #200
🤖 Generated with Claude Code