Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header doesn't pass sanity check: block target difficulty of 0000000000000000000eb1560000000000000000000000000000000000000000 is higher than max of 0000000000000000000000000000000000000000000000000000000000000000 -- disconnecting peer #211

Closed
JaviLib opened this issue Jan 9, 2021 · 5 comments

Comments

@JaviLib
Copy link

JaviLib commented Jan 9, 2021

My LND is unable to sync using Neutrino. I get this error for ever and ever:

2021-01-09 21:35:19.326 [INF] BTCN: Syncing to block height 665317 from peer 13.91.246.35:8333
2021-01-09 21:35:19.326 [INF] BTCN: Fetching set of headers from tip (height=659260) from peer 13.91.246.35:8333
2021-01-09 21:35:22.294 [WRN] BTCN: Header doesn't pass sanity check: block target difficulty of 0000000000000000000eb1560000000000000000000000000000000000000000 is higher than max of 0000000000000000000000000000000000000000000000000000000000000000 -- disconnecting peer

Obviusly something is wrong in the code, as the maximum difficulty cannot be zero.

lnd version 0.12.0-beta.rc5 commit=v0.12.0-beta.rc5

Relevant lnd.conf is:

bitcoin.node=neutrino
routing.assumechanvalid=1
neutrino.addpeer=btcd-mainnet.lightning.computer
neutrino.addpeer=btcd0.lightning.engineering
neutrino.addpeer=neutrino.shock.network
neutrino.addpeer=mainnet1-btcd.zaphq.io
neutrino.addpeer=mainnet2-btcd.zaphq.io
neutrino.addpeer=mainnet3-btcd.zaphq.io
neutrino.addpeer=mainnet4-btcd.zaphq.io
neutrino.banduration=1s
neutrino.banthreshold=100000
neutrino.maxpeers=256
neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
@guggero
Copy link
Member

guggero commented Jan 11, 2021

Does the problem persist? Do you also get the error if you comment out the first neutrino.addpeer, because 13.91.246.35 is btcd-mainnet.lightning.computer.
I assume you have bitcoin.mainnet=1 in the config as well? Or is this your complete config file?

This sounds like it could be related to a block reorg?
It looks to me like calcNextRequiredDifficulty returns 0: https://github.com/lightninglabs/neutrino/blob/master/blockmanager.go#L2826

@guggero
Copy link
Member

guggero commented Mar 1, 2021

@JavierRSobrino I looked at the code again and tried a few things to reproduce, but no luck.
Did you ever run into this again? Or were you able to resolve it?

If this continues to happen, can you please turn on debug log for Neutrino? Or just debuglevel=debug in general.

@Roasbeef
Copy link
Member

Roasbeef commented Mar 5, 2021

@guggero feel free to close this is we're unable to reproduce for now.

@guggero
Copy link
Member

guggero commented Mar 9, 2021

Closing due to inactivity and inability to reproduce.

@buck54321
Copy link
Contributor

buck54321 commented Mar 25, 2023

I've seen this two days in a row running a simnet client against a bitcoind peer added using ConnectNode. Example logs

2023-03-25 09:22:39.546 [INF] NTRNO: Fetching set of checkpointed cfheaders filters from height=2000, hash=2c936520ef7411e92a68aca0a5fb08c4576f6a7bede50f4836026ac31da77189
2023-03-25 09:22:39.546 [INF] NTRNO: Starting to query for cfheaders from checkpoint_interval=2, checkpoints=4
2023-03-25 09:22:39.546 [INF] NTRNO: Attempting to query for 1 cfheader batches
2023-03-25 09:22:39.546 [DBG] NTRNO: Sending getcfheaders (start_height=2001, stop_hash=6f42d71b22ab141a2b9834b433f20f76d4ff5aaa013b4b444b8a850fd09000f8) to 127.0.0.1:20575 (outbound)
2023-03-25 09:22:39.547 [DBG] NTRNO: Difficulty retarget at block height 4032
2023-03-25 09:22:39.547 [DBG] NTRNO: Old target 207fffff (7fffff0000000000000000000000000000000000000000000000000000000000)
2023-03-25 09:22:39.547 [DBG] NTRNO: New target 201fffff (1fffff0000000000000000000000000000000000000000000000000000000000)
2023-03-25 09:22:39.547 [DBG] NTRNO: Actual timespan 8h24m8s, adjusted timespan 84h0m0s, target timespan 336h0m0s
2023-03-25 09:22:39.547 [WRN] NTRNO: Header doesn't pass sanity check: block target difficulty of 7fffff0000000000000000000000000000000000000000000000000000000000 is higher than max of 1fffff0000000000000000000000000000000000000000000000000000000000 -- disconnecting peer
2023-03-25 09:22:39.547 [WRN] CHAIN: Query(1) from peer 127.0.0.1:20575 failed, rescheduling: peer disconnected
2023-03-25 09:22:39.547 [DBG] NTRNO: Removed peer 127.0.0.1:20575 (outbound)
2023-03-25 09:22:39.547 [DBG] NTRNO: Disconnected from 127.0.0.1:20575 (reqid 1)

I have that bitcoind node running on an auto-miner, so lots of empty blocks being created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants