Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bisq does not validate Bitcoin P2P node at configuration time #3137

Closed
wiz opened this issue Aug 25, 2019 · 6 comments · Fixed by #3895
Closed

Bisq does not validate Bitcoin P2P node at configuration time #3137

wiz opened this issue Aug 25, 2019 · 6 comments · Fixed by #3895

Comments

@wiz
Copy link
Member

wiz commented Aug 25, 2019

[How to Reproduce]

  1. Go to Settings -> Network
  2. In the Bitcoin P2P node configuration under "use the following Bitcoin nodes", enter an invalid or unsupported hostname , such as the Tor v3 hostname 32zzibxmqi2ybxpqyggwwuwz7a3lbvtzoloti7cxoevyvijexvgsfeid.onion:8333
  3. Bisq indicates it must be restarted, click OK

[Expected Results]
After Step 2, Bisq should validate the hostname is a valid Tor v2 hostname using regex or some other method, and also attempt to connect to this node. If it cannot validate or connect, it should not allow this setting to be changed, and it should not instruct the user to restart Bisq.
After Step 3, Bisq restarts, and despite the Bitcoin node being unreachable, the user should be able to proceed and reconfigure their settings to a reachable Bitcoin node.

[Actual Results]
After Step 2, Bisq did not perform any validation or testing of the user-entered hostname, it allowed the user the proceed, and it requested the user to proceed and restart Bisq.
After Step 3, Bisq restarts, but because the node is unreachable the following error is displayed and user is stuck with no way to correct their Bitcoin node settings, as they cannot get to the configuration screen.

Screen Shot 2019-08-25 at 16 38 49

@freimair
Copy link
Member

freimair commented Aug 27, 2019

first, agreed.

second, once #3044 is merged, I will proceed on getting bisq ready for tor hs v3

@m52go
Copy link
Contributor

m52go commented Sep 4, 2019

As a workaround for anyone who gets stuck by this in the interim, run Bisq from the command line with the argument --btcNodes=[].

@wiz
Copy link
Member Author

wiz commented Sep 9, 2019

@freimair cool if you get Tor v3 working, but IMO the correct fix for this issue is to correctly handle the case when a user-configured btcnode is unreachable with a dialog that asks "Your configured Bitcoin node is unreachable, would you like to reset your configuration to use the Bisq-supplied set of Bitcoin nodes instead?"

@wiz
Copy link
Member Author

wiz commented Sep 16, 2019

For users affected by this bug, temporary workaround to get "unstuck" is to manually start Bisq with the --btcNodes option to a valid node like this:

[Ubuntu]
/opt/Bisq/Bisq --btcNodes=22tg6ufbwz6o3l2u.onion:8333
[macOS]
/Applications/Bisq.app/Contents/MacOS/Bisq --btcNodes=22tg6ufbwz6o3l2u.onion:8333
[

@devinbileck
Copy link
Member

I have a fix for this that I will be submitting soon.

@elkimek
Copy link

elkimek commented Dec 22, 2019

For Windows 10 users use PowerShell instead of command line.

Example: C:\Path\To\Bisq.exe --btcNodes=22tg6ufbwz6o3l2u.onion:8333

devinbileck added a commit to devinbileck/bisq that referenced this issue Jan 13, 2020
If the user entered an invalid hostname for a custom BTC node, such as a
V3 onion address, after restarting Bisq they would be presented with an
error due to the node being unreachable and unable to continue nor
correct the config.

So now a warning message will be shown in this situation informing the
user of an invalid config and once they restart their client they will
connect to the provided BTC nodes.

Fixes bisq-network#3137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants