Closed JaviLib closed 3 years ago
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
@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.
@guggero feel free to close this is we're unable to reproduce for now.
Closing due to inactivity and inability to reproduce.
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.
My LND is unable to sync using Neutrino. I get this error for ever and ever:
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: