lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.67k stars 2.08k forks source link

Unable to sync to chain with neutrino #6022

Closed a455bcd9 closed 2 years ago

a455bcd9 commented 2 years ago

Background

I was running v0.13.3-beta with neutrino using the using ThunderCloud on AWS ( https://github.com/a5an0/ThunderCloud/blob/master/lib/configure-node.sh but with AMD instead of ARM). I did not update lnd to fix the Taproot-related bug in time. Some of my channels got closed. I checked and realized I didn't have enough space on my disk. I doubled the disk size yesterday. This morning I updated lnd to v0.14.0-beta. My node cannot sync.

Your environment

Steps to reproduce

I don't know.

Expected behaviour

lncli getinfo should show "synced_to_chain" and "synced_to_graph" at "true".

Actual behaviour

"synced_to_chain" and "synced_to_graph" are both are "false".

"block_height": 709784

Some of channels are shown as closed on 1ml but still open when I do lncli listchannels.

When I launch lnd manually I keep getting the following message:

[WRN] BTCN: Unable to fetch set of candidate checkpoints, trying again...
[INF] BTCN: New valid peer 165.227.7.29:8333 (outbound) (/btcwire:0.5.0/btcd:0.22.0/)
[INF] BTCN: Lost peer 165.227.7.29:8333 (outbound)
[WRN] BTCN: unable to lookup IP for btcd-testnet.ion.radar.tech: lookup btcd-testnet.ion.radar.tech on 10.0.0.2:53: no such host
Roasbeef commented 2 years ago

You're trying to connect to peers that seem to no longer exist. Looks like you're even trying to connect to a testnet node (from the DNS name) using your mainnet (?) lnd instance. You should use neutrino.connect instead of neutrino.addpeer to allow it to properly seek out other peers.

a455bcd9 commented 2 years ago

Hi, Thanks for your answer.

I have bitcoin.mainnet=1 in my lnd.conf file and I'm running on mainnet according to lncli getinfo) so I don't understand why my node is trying to connect to a testnet node. What could be the reason?

Also: why should I use neutrino.connect instead of neutrino.addpeer as recommended there: https://github.com/alexbosworth/run-lnd ?

Thanks for any help you can provide.

a455bcd9 commented 2 years ago

FYI: I've been told by another experienced neutrino user that it is normal for neutrino to try to connect to a testnet node using the mainnet instance.