BTG Core Wallet: trouble finding peers

We got this help request:

hi, I downloaded the core wallet, but it’s not connecting to any peers, what can I do?

Logs:

debug.log
2024-06-07T13:08:45Z 




2024-06-07T13:08:45Z Bitcoin Gold version v0.17.3 (release build)
2024-06-07T13:08:45Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2024-06-07T13:08:45Z Assuming ancestors of block 00000001ddb50bf6de8012bf8cd15bebc278c7e75ce5f77409ab78a291bd7e36 have valid signatures.
2024-06-07T13:08:45Z Setting nMinimumChainWork=000000000000000000000000000000000000000000a21782bdfbc18847452a68
2024-06-07T13:08:45Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2024-06-07T13:08:45Z Using RdRand as an additional entropy source
2024-06-07T13:08:46Z Default data directory C:\Users\Jozsef\AppData\Roaming\BitcoinGold
2024-06-07T13:08:46Z Using data directory D:\BitcoinGold
2024-06-07T13:08:46Z Using config file D:\BitcoinGold\bitcoingold.conf
2024-06-07T13:08:46Z Using at most 125 automatic connections (2048 file descriptors available)
2024-06-07T13:08:46Z GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Gold didn't yet exit safely..."
2024-06-07T13:08:46Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2024-06-07T13:08:46Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2024-06-07T13:08:46Z Using 12 threads for script verification
2024-06-07T13:08:46Z Using wallet directory D:\BitcoinGold\wallets
2024-06-07T13:08:46Z init message: Verifying wallet(s)...
2024-06-07T13:08:46Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2024-06-07T13:08:46Z Using wallet wallet.dat
2024-06-07T13:08:46Z scheduler thread start
2024-06-07T13:08:46Z BerkeleyEnvironment::Open: LogDir=D:\BitcoinGold\wallets\database ErrorFile=D:\BitcoinGold\wallets\db.log
2024-06-07T13:08:46Z Cache configuration:
2024-06-07T13:08:46Z * Using 2.0MiB for block index database
2024-06-07T13:08:46Z * Using 8.0MiB for chain state database
2024-06-07T13:08:46Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2024-06-07T13:08:46Z init message: Loading block index...
2024-06-07T13:08:46Z Opening LevelDB in D:\BitcoinGold\blocks\index
2024-06-07T13:08:46Z Opened LevelDB successfully
2024-06-07T13:08:46Z Using obfuscation key for D:\BitcoinGold\blocks\index: 0000000000000000
2024-06-07T13:08:46Z LoadBlockIndexDB: last block file = 0
2024-06-07T13:08:46Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2024-06-07T13:08:46Z Checking all blk files are present...
2024-06-07T13:08:46Z Initializing databases...
2024-06-07T13:08:46Z Pre-allocating up to position 0x1000000 in blk00000.dat
2024-06-07T13:08:46Z Opening LevelDB in D:\BitcoinGold\chainstate
2024-06-07T13:08:46Z Opened LevelDB successfully
2024-06-07T13:08:46Z Wrote new obfuscate key for D:\BitcoinGold\chainstate: bcbf6b8367638d5a
2024-06-07T13:08:46Z Using obfuscation key for D:\BitcoinGold\chainstate: bcbf6b8367638d5a
2024-06-07T13:08:46Z init message: Rewinding blocks...
2024-06-07T13:08:46Z  block index              32ms
2024-06-07T13:08:46Z init message: Loading wallet...
2024-06-07T13:08:46Z [default wallet] nFileVersion = 170300
2024-06-07T13:08:46Z [default wallet] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0
2024-06-07T13:08:46Z [default wallet] Performing wallet upgrade to 169900
2024-06-07T13:08:46Z [default wallet] keypool added 2000 keys (1000 internal), size=2000 (1000 internal)
2024-06-07T13:08:46Z [default wallet] Wallet completed loading in             824ms
2024-06-07T13:08:46Z [default wallet] setKeyPool.size() = 2000
2024-06-07T13:08:46Z [default wallet] mapWallet.size() = 0
2024-06-07T13:08:46Z [default wallet] mapAddressBook.size() = 0
2024-06-07T13:08:46Z UpdateTip: new best=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f height=0 version=0x00000001 log2_work=32.000022 tx=1 date='2009-01-03T18:15:05Z' progress=0.000000 cache=0.0MiB(0txo)
2024-06-07T13:08:46Z Failed to open mempool file from disk. Continuing anyway.
2024-06-07T13:08:46Z mapBlockIndex.size() = 1
2024-06-07T13:08:46Z nBestHeight = 0
2024-06-07T13:08:46Z torcontrol thread start
2024-06-07T13:08:46Z Bound to [::]:8338
2024-06-07T13:08:46Z Bound to 0.0.0.0:8338
2024-06-07T13:08:46Z init message: Loading P2P addresses...
2024-06-07T13:08:46Z ERROR: DeserializeFileDB: Failed to open file D:\BitcoinGold\peers.dat
2024-06-07T13:08:46Z Invalid or missing peers.dat; recreating
2024-06-07T13:08:46Z init message: Loading banlist...
2024-06-07T13:08:46Z ERROR: DeserializeFileDB: Failed to open file D:\BitcoinGold\banlist.dat
2024-06-07T13:08:46Z Invalid or missing banlist.dat; recreating
2024-06-07T13:08:46Z init message: Starting network threads...
2024-06-07T13:08:46Z net thread start
2024-06-07T13:08:46Z addcon thread start
2024-06-07T13:08:46Z init message: Done loading
2024-06-07T13:08:46Z dnsseed thread start
2024-06-07T13:08:46Z Loading addresses from DNS seeds (could take a while)
2024-06-07T13:08:46Z opencon thread start
2024-06-07T13:08:46Z msghand thread start
2024-06-07T13:08:46Z GUI: Platform customization: "windows"
2024-06-07T13:08:46Z GUI: PaymentServer::LoadRootCAs: Loaded  56  root certificates
2024-06-07T13:08:47Z 0 addresses found from DNS seeds
2024-06-07T13:08:47Z dnsseed thread exit
2024-06-07T13:09:40Z GUI:   OpenType support missing for "MS Shell Dlg 2", script 11
2024-06-07T13:09:40Z GUI:   OpenType support missing for "Arial", script 11
2024-06-07T13:09:40Z GUI:   OpenType support missing for "MS UI Gothic", script 11
2024-06-07T13:09:40Z GUI:   OpenType support missing for "SimSun", script 11
2024-06-07T13:09:40Z GUI:   OpenType support missing for "MS Shell Dlg 2", script 16
2024-06-07T13:09:40Z GUI:   OpenType support missing for "Arial", script 16
2024-06-07T13:09:40Z GUI:   OpenType support missing for "MS UI Gothic", script 16
2024-06-07T13:09:40Z GUI:   OpenType support missing for "SimSun", script 16
2024-06-07T13:09:47Z Adding fixed seed nodes as DNS doesn't seem to be available.

Judging from this part of the logs, it looks like they weren’t getting any DNS seeds:

image

Solutions/troubleshooting advice in next comment.

There are three DNS Seed servers in the code for BTG; the one the Bitcoin Gold Organizations maintains is definitely working: dnsseed.bitcoingold.org. Others may not be always available.

This is the IP:
Pinging dnsseed.bitcoingold.org [69.137.198.81]

When you start up your node, it reaches out to one of the three, and they may not all be responding at the moment. To force it to start a known working DNS Seed, start with this parameter added at the end of your startup command:
-seednode=69.137.198.81

Or put this in your bitcoingold.conf file:
seednode=69.137.198.81

Remember, if you modify the configuration file, the effects won’t take until you shut down the node and start it up again.

You can also manually do a lookup of seed addresses in DNS, copy some addresses, at random, and give them to your node.

Another option is to use the DNS Seeder to look up some addresses to feed to manually feed to your node.

Do the lookup like this (on Windows)
nslookup dnsseed.bitcoingold.org
or (on Linux)
dig dnsseed.bitcoingold.org

This will give you a list of recently-seen node addresses.

Suppose one address is 123.123.123.123; in the Help / Debug / Console of the your node, you can do this:

image

addnode 123.123.123.123:8338 add

image

And it will respond with null like this:

image

The null is whatever error happened… so null means no error, which is good.
It will try to connect to that node shortly after (and will repeat at intervals). Feel free to add several nodes until it gets started; you can look at progress on the Peers tab until you have one or two connections.

Alternately, you can add this to your bitcoingold.conf file:
addnode=123.123.123.123:8338
Again, if you modify the configuration file, the effects won’t take until you shut down the node and start it up again. After your node starts synching, you should remove that line from the conf file. You don’t want to always connect to that node unless you have some special reason to do so.

Note that you will see different IPs than in the example above; you get a random subset of recently-seen node IPs which should change daily.

If you’re uncomfortable on a command line, you can do a DNS lookup on the web. One service for this is Network Tools: DNS,IP,Email. Got there, switch the tool to DNS Lookup and then hit it. You’ll get something like this:

Image

Again, you can go into the Help / Debug / Console section on your full node and Add some of those nodes to get it started (remember to add the :8338 for the port number, as above.)