Difference between revisions of "Connecting to your own Bitcoin node"

From Bisq Wiki
Jump to navigation Jump to search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Bisq will '''connect to your local Bitcoin node''' if it finds it upon starting up. This article contains the requirements for this to work correctly.
+
Bisq will '''connect to [[Installing_your_own_Bitcoin_node|your local Bitcoin node]]''' if it finds it upon starting up. This article contains the requirements for this to work correctly.
  
 
You can also specify the addresses of particular Bitcoin nodes in <code>Settings</code> > <code>Network Info</code>.
 
You can also specify the addresses of particular Bitcoin nodes in <code>Settings</code> > <code>Network Info</code>.
Line 7: Line 7:
 
= General node settings =
 
= General node settings =
  
Make sure the node you're looking to connect to, whether local or remote, meets the following requirements:
+
The bitcoin.conf file needs to contain the following settings (either by adding them or editing the existing ones):
* Specify <code>peerbloomfilters=1</code> in <code>bitcoin.conf</code> file if running 0.19.0.1 or later
+
 
* Make sure node is ''not'' running in pruned mode (<code>pruned=N</code> in config means node is pruning blocks)
+
<code>server=1</code><br>
 +
<code>prune=0</code><br>
 +
<code>peerbloomfilters=1</code><br>
 +
 
 +
which in turn:
 +
* enable the block server mode
 +
* disable the pruning of old blocks
 +
* allow Bisq to run its SPV wallet
 +
 
 +
Multiple reports have been received, where any declination of the Ronin node just won't work, or will work once, only to stop working after the next reboot, requiring a restore to network provided nodes. We are not able to suggest a workaround, except involving Ronin support.
  
 
= Connecting to a local Bitcoin node =
 
= Connecting to a local Bitcoin node =
Line 23: Line 32:
 
If you'd like to connect to another node, you can specify its address in <code>Settings</code> > <code>Network Info</code>. Bisq will validate the address and connect to the specified node the next time it starts.
 
If you'd like to connect to another node, you can specify its address in <code>Settings</code> > <code>Network Info</code>. Bisq will validate the address and connect to the specified node the next time it starts.
  
As of this writing, Bisq cannot connect to Bitcoin nodes with Tor v3 addresses.  
+
Bisq supports connecting to Bitcoin nodes with Tor v3 addresses: this is the easiest path to take, since you only have to fill in your node's onion address in settings.<br>
 +
If your node is on your local network, connecting directly to it rather than using Tor would reduce latency by a sensible degree. In order to do this:
 +
* make sure the node's firewall allows incoming connections on port 8333 from the local network
 +
* have Bitcoin daemon listen to <code>0.0.0.0</code> rather than <code>127.0.0.1</code> (add a line that says <code>bind 0.0.0.0</code>)
 +
* uncheck "Use Tor for Bitcoin network" under Settings>Network in Bisq application
 +
* fill in your node's local network <code>ipaddress:8333</code> in "Use custom bitcoin Core nodes" field
 +
 
 +
Explaining in detail each step of the above goes past the scope of this guide, yet you can usually find more information either by searching for specific guides, or asking on discussion boards/groups.
 +
 
 +
= Troubleshooting =
 +
 
 +
Most of the issues experienced by users come from trying to associate to a Ronin Dojo node, which often won't let Bisq connect a second time, if at all even the first; we are not aware of any reproducible solution to this, and suggest to use a different node distribution for Bisq.
 +
 
 +
If you get into a state where Bisq is unable to connect, you can revert to a provided node as follows. 
 +
 
 +
For MacOS:
 +
<code>Bisq -btcNodes=devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -useTorForBtc=true </code>
 +
 +
For Linux:
 +
 
 +
<code>/opt/bisq/bin/Bisq -btcNodes=devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -useTorForBtc=true </code>
 +
 
 +
For Windows:
 +
 
 +
<code>C:\Users\your-username-here\AppData\Local\Bisq\Bisq.exe -btcNodes=devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -useTorForBtc=true </code>
  
If you're having issues connecting to a Bitcoin node running 0.21 or later over Tor, consider following the following instructions from [https://bitcoincore.org/en/releases/0.21.0/ the Bitcoin Core release notes] to downgrade your node to Tor v2.  
+
Contributor nodes can be seen [https://github.com/bisq-network/bisq/blob/7c07cdb6ff60ad1186dea33acdfb688668c2aae6/core/src/main/java/bisq/core/btc/nodes/BtcNodes.java#L51-L76 here in the Bisq code].  
  
<blockquote>
+
[[Running_from_the_command_line|More info on running from the command line]].
The Tor onion service that is automatically created by setting the <code>-listenonion</code> configuration parameter will now be created as a Tor v3 service instead of Tor v2. The private key that was used for Tor v2 (if any) will be left untouched in the <code>onion_private_key</code> file in the data directory (see <code>-datadir</code>) and can be removed if not needed. Bitcoin Core will no longer attempt to read it. The private key for the Tor v3 service will be saved in a file named <code>onion_v3_private_key</code>. To use the deprecated Tor v2 service (not recommended), the <code>onion_private_key</code> can be copied over <code>onion_v3_private_key</code>, e.g. <code>cp -f onion_private_key onion_v3_private_key</code>.
 
</blockquote>
 
  
Bisq relies on [https://bitcoinj.org/ bitcoinj] to interact with Bitcoin nodes, and bitcoinj has not integrated support for Tor v3 addresses yet. We're [https://github.com/bitcoinj/bitcoinj/issues/2067 working with them to do it], however, and will update the community (and this article) when it's ready.
+
[[Command_line_options|More info on command line options]].

Latest revision as of 19:52, 6 June 2024

Bisq will connect to your local Bitcoin node if it finds it upon starting up. This article contains the requirements for this to work correctly.

You can also specify the addresses of particular Bitcoin nodes in Settings > Network Info.

General node settings

The bitcoin.conf file needs to contain the following settings (either by adding them or editing the existing ones):

server=1
prune=0
peerbloomfilters=1

which in turn:

  • enable the block server mode
  • disable the pruning of old blocks
  • allow Bisq to run its SPV wallet

Multiple reports have been received, where any declination of the Ronin node just won't work, or will work once, only to stop working after the next reboot, requiring a restore to network provided nodes. We are not able to suggest a workaround, except involving Ronin support.

Connecting to a local Bitcoin node

If you're running a Bitcoin full node on the same machine as Bisq, Bisq should connect to your node on startup—it will look for Bitcoin Core or bitcoind running on localhost on port 8333.

Just make sure to not be running any other Bitcoin-based altcoin nodes (like LTC) while starting Bisq.

Connecting to another Bitcoin node

By default, Bisq maximizes your privacy by connecting to nodes run by trusted Bisq contributors.

If you'd like to connect to another node, you can specify its address in Settings > Network Info. Bisq will validate the address and connect to the specified node the next time it starts.

Bisq supports connecting to Bitcoin nodes with Tor v3 addresses: this is the easiest path to take, since you only have to fill in your node's onion address in settings.
If your node is on your local network, connecting directly to it rather than using Tor would reduce latency by a sensible degree. In order to do this:

  • make sure the node's firewall allows incoming connections on port 8333 from the local network
  • have Bitcoin daemon listen to 0.0.0.0 rather than 127.0.0.1 (add a line that says bind 0.0.0.0)
  • uncheck "Use Tor for Bitcoin network" under Settings>Network in Bisq application
  • fill in your node's local network ipaddress:8333 in "Use custom bitcoin Core nodes" field

Explaining in detail each step of the above goes past the scope of this guide, yet you can usually find more information either by searching for specific guides, or asking on discussion boards/groups.

Troubleshooting

Most of the issues experienced by users come from trying to associate to a Ronin Dojo node, which often won't let Bisq connect a second time, if at all even the first; we are not aware of any reproducible solution to this, and suggest to use a different node distribution for Bisq.

If you get into a state where Bisq is unable to connect, you can revert to a provided node as follows.

For MacOS:

Bisq -btcNodes=devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -useTorForBtc=true 

For Linux:

/opt/bisq/bin/Bisq -btcNodes=devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -useTorForBtc=true 

For Windows:

C:\Users\your-username-here\AppData\Local\Bisq\Bisq.exe -btcNodes=devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -useTorForBtc=true 

Contributor nodes can be seen here in the Bisq code.

More info on running from the command line.

More info on command line options.