lnd: Neutrino client: Header doesn't pass sanity check: block target difficulty of 0..

Background

Neutrino client in an LND 15.1 instance (upgraded from 13.3) is unable to sync to back-end BTCD 22 (was upgraded from 20)

Trace shows the following in unending loop.

2022-09-21 10:07:21.423 [WRN] BTCN: Unable to fetch set of candidate checkpoints, trying again...
2022-09-21 10:07:24.197 [INF] BTCN: New valid peer x.x.x.203:8333 (outbound) (/btcwire:0.5.0/btcd:0.22.0/)
2022-09-21 10:07:24.197 [INF] BTCN: Syncing to block height 755097 from peer 167.88.11.203:8333
2022-09-21 10:07:24.197 [INF] BTCN: Fetching set of headers from tip (height=754806) from peer x.x.x.203:8333
2022-09-21 10:07:24.371 [WRN] BTCN: Header doesn't pass sanity check: block target difficulty of 00000000000000000008c8940000000000000000000000000000000000000000 is higher than max of 0000000000000000000000000000000000000000000000000000000000000000 -- disconnecting peer
2022-09-21 10:07:24.372 [INF] BTCN: Lost peer x.x.x.203:8333 (outbound)
2022-09-21 10:07:24.372 [WRN] BTCN: No sync peer candidates available
2022-09-21 10:07:24.424 [WRN] BTCN: Unable to fetch set of candidate checkpoints, trying again...

Your environment

  • 14.1 in same environment is OK with the same back end
  • 15.1 in same environment is OK using the back-end directly (non-neutrino)
  • All systems Ubuntu
  • btcd was 20, upgraded to 22 for Taproot

Additional Repro Testing Performed

  • Initialized a clean 14.3 instance, allowed it to fully sync, then upgraded to 15.1 and the issue did not occur. (Windows)
  • Initialized a clean 13.3 instance, allowed it to fully sync, then upgraded to 15.1 and the issue did not occur. (Windows)

Steps to reproduce

Unsure given the additional testing above, understood this may be an unreproducible edgecase involving real world node having pre-existing channels or having persisted through past upgrades.

Potential solutions welcome to salvage this node.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Once we get this extra debug information, you should just be able to remove the flat file of headers on disk and have things start back up again.

Would it be block_headers.bin I’d nuke to “reset” it?

started and running fine after wiping neutrino.db, block_headers.bin and reg_filter_headers.bin

thank you gents

Thanks for this report! We think we know what’s going on here, but want to double check (the diff @Crypt-iQ) should help with that.

Once we get this extra debug information, you should just be able to remove the flat file of headers on disk and have things start back up again.