lightninglabs / neutrino

Privacy-Preserving Bitcoin Light Client
MIT License
900 stars 183 forks source link

Cannot connect to any peers that serve filters #210

Closed JPyke3 closed 3 years ago

JPyke3 commented 3 years ago

Previous issue for reference:

Background

My LND instance is unable to sync with the latest block height. Below is spammed to the lnd logs:

Jan 04 07:53:10 raspberrypi lnd[1647]: 2021-01-04 07:53:10.524 [INF] RPCS: RPC server listening on > 192.168.178.174:10009 Jan 04 07:53:10 raspberrypi lnd[1647]: 2021-01-04 07:53:10.525 [INF] LTND: Waiting for chain backend to finish sync, start_height=664349 Jan 04 07:53:10 raspberrypi lnd[1647]: 2021-01-04 07:53:10.525 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080 Jan 04 07:53:14 raspberrypi lnd[1647]: 2021-01-04 07:53:14.434 [INF] BTCN: New valid peer 13.91.246.35:8333 (outbound) (/btcwire:0.5.0/btcd:0.12.0/) Jan 04 07:53:14 raspberrypi lnd[1647]: 2021-01-04 07:53:14.438 [INF] BTCN: Syncing to block height 664416 from peer 13.91.246.35:8333 Jan 04 07:53:14 raspberrypi lnd[1647]: 2021-01-04 07:53:14.438 [INF] BTCN: Fetching set of headers from tip (height=664349) from peer 13.91.246.35:8333 Jan 04 07:53:14 raspberrypi lnd[1647]: 2021-01-04 07:53:14.612 [WRN] BTCN: Header doesn't pass sanity check: block target difficulty of 0000000000000000000f22170000000000000000000000000000000000000000 is higher than max of 0000000000000000000000000000000000000000000000000000000000000000 -- disconnecting peer Jan 04 07:53:14 raspberrypi lnd[1647]: 2021-01-04 07:53:14.613 [INF] BTCN: Lost peer 13.91.246.35:8333 (outbound) Jan 04 07:53:14 raspberrypi lnd[1647]: 2021-01-04 07:53:14.613 [WRN] BTCN: No sync peer candidates available

Your environment

version of lnd: lnd version 0.11.1-beta commit=v0.11.1-beta which operating system (uname -a on *Nix): Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux version of btcd, bitcoind, or other backend: Neutrino any other relevant environment details

Steps to reproduce

Start LND with the Neutrino Backend Unlock Wallet

Expected behaviour

"synced_to_chain":, should become true

Actual behaviour

"synced_to_chain":, remains false

Continuation from https://github.com/lightningnetwork/lnd/issues/4894

I have now tried on a different system, and let LND run for about 6 hours now, still can never sync to the blockchain. This was running perfectly fine until yesterday, with no significant configuration changes or anything.

My lnd.conf at the moment:

rpclisten=0.0.0.0:10009
tlsextraip=0.0.0.0

bitcoin.active=true 
bitcoin.mainnet=true 
bitcoin.node=neutrino 

neutrino.addpeer=btcd-mainnet.lightning.computer
neutrino.addpeer=btcd0.lightning.engineering

System is now: Linux lnd-node 5.4.79+ #1373 Mon Nov 23 13:18:15 GMT 2020 armv6l GNU/Linux

Thanks for any help :)

Roasbeef commented 3 years ago

I'm able to sync a fresh neutrino node np using the following lnd command:

lnd --bitcoin.mainnet --bitcoin.node=neutrino --lnddir=/tmp/kek --routing.assumechanvalid --neutrino.addpeer=btcd-mainnet.lightning.computer --bitcoin.active
JPyke3 commented 3 years ago

It seems it could be version specific, the version I am using just flat out doesn't seem to sync the chain, I first tried on my version running your command, and nothing happened.

I then installed: lnd version 0.12.0-beta.rc3 commit= for testing, and this version synced just fine. This is a pre-release version however. Is it considered very "Stable"? (Enough to run my lnd node on it?)

JPyke3 commented 3 years ago

Here are some debug logs of what's happening on the latest version of lnd:

Jan 04 20:07:07 lnd-node lnd[4953]: 2021-01-04 20:07:07.646 [INF] BTCN: Lost peer 13.91.246.35:8333 (outbound)
Jan 04 20:07:07 lnd-node lnd[4953]: 2021-01-04 20:07:07.649 [WRN] BTCN: No sync peer candidates available
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.463 [INF] LNWL: The wallet has been unlocked without a time limit
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.479 [INF] CHRE: LightningWallet opened
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.628 [INF] HSWC: Restoring in-memory circuit state from disk
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.638 [INF] HSWC: Payment circuits loaded: num_pending=0, num_open=0
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.734 [INF] HSWC: Trimming open circuits for chan_id=664003:216:1, start_htlc_id=6
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.736 [INF] HSWC: Trimming open circuits for chan_id=664012:2017:1, start_htlc_id=0
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.739 [INF] HSWC: Trimming open circuits for chan_id=663924:614:0, start_htlc_id=0
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.899 [INF] LTND: Channel backup proxy channel notifier starting
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.901 [INF] ATPL: Instantiating autopilot with active=false, max_channels=5, allocation=0.600000, min_chan_size=20000, max_chan_size=16777215, private=false, min_confs=1, conf_target=3
Jan 04 20:07:09 lnd-node lnd[4953]: 2021-01-04 20:07:09.993 [INF] RPCS: RPC server listening on 127.0.0.1:10009
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.028 [INF] LTND: Waiting for chain backend to finish sync, start_height=664349
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.033 [ERR] LTND: unable to determine if wallet is synced: target hash not found in index
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.044 [INF] RPCS: Stopping RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.041 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.347 [INF] RPCS: Stopping AutopilotRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.349 [INF] RPCS: Stopping WalletKitRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.351 [INF] RPCS: Stopping WatchtowerRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.354 [INF] RPCS: Stopping WatchtowerClientRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.354 [INF] RPCS: Stopping RouterRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.354 [INF] RPCS: Stopping SignRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.355 [INF] RPCS: Stopping ChainRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.355 [INF] RPCS: Stopping InvoicesRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.355 [INF] RPCS: Stopping VersionRPC Sub-RPC Server
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.424 [INF] BTCN: Canceling block subscription: id=1
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.468 [INF] BTCN: Block manager shutting down
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.593 [INF] BTCN: Address manager shutting down
Jan 04 20:07:10 lnd-node lnd[4953]: 2021-01-04 20:07:10.755 [INF] LTND: Shutdown complete
Jan 04 20:07:10 lnd-node lnd[4953]: unable to determine if wallet is synced: target hash not found in index
Jan 04 20:07:10 lnd-node systemd[731]: lnd.service: Main process exited, code=exited, status=1/FAILURE
Jan 04 20:07:10 lnd-node systemd[731]: lnd.service: Failed with result 'exit-code'.
Jan 04 20:07:11 lnd-node systemd[731]: lnd.service: Service RestartSec=100ms expired, scheduling restart.
Jan 04 20:07:11 lnd-node systemd[731]: lnd.service: Scheduled restart job, restart counter is at 1.
Jan 04 20:07:11 lnd-node systemd[731]: Stopped Lightning Network Daemon.
Jan 04 20:07:11 lnd-node systemd[731]: Started Lightning Network Daemon.
Jan 04 20:07:11 lnd-node lnd[4970]: 2021-01-04 20:07:11.986 [INF] LTND: Version: 0.12.0-beta.rc3 commit=, build=production, logging=default, debuglevel=info
Jan 04 20:07:12 lnd-node lnd[4970]: 2021-01-04 20:07:11.992 [INF] LTND: Active chain: Bitcoin (network=mainnet)
Jan 04 20:07:12 lnd-node lnd[4970]: 2021-01-04 20:07:11.996 [INF] LTND: Opening the main database, this might take a few minutes...
Jan 04 20:07:12 lnd-node lnd[4970]: 2021-01-04 20:07:11.997 [INF] LTND: Opening bbolt database, sync_freelist=false, auto_compact=false
Jan 04 20:07:13 lnd-node lnd[4970]: 2021-01-04 20:07:13.321 [INF] CHDB: Checking for schema update: latest_version=20, db_version=20
Jan 04 20:07:13 lnd-node lnd[4970]: 2021-01-04 20:07:13.326 [INF] LTND: Database now open (time_to_open=1.329035294s)!

Seems like there is something really going wrong with this config in particular. Any chance to just take my channels and start anew in regards to neutrino?

JPyke3 commented 3 years ago

Okay went for a pretty risky move to get my channels back up. I just took channels.db and lnd.conf and just put it into a fresh /.lnd dir. Everything is synced and working now. Happy to close.