lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.57k stars 2.06k forks source link

LNWL: Neutrino rescan ended with error: unable to register block subscription #8460

Open yyforyongyu opened 5 months ago

yyforyongyu commented 5 months ago

A unit test failed, as seen in this build,

--- FAIL: TestLightningWallet (74.51s)
    --- FAIL: TestLightningWallet/btcwallet/neutrino:reorg_wallet_balance (14.20s)
        test_interface.go:2214: unable to sync wallet: timeout after 30s
FAIL
FAIL    github.com/lightningnetwork/lnd/lnwallet/test/neutrino  74.541s
FAIL

I noticed from the logs there's a new error popped up,

2024-02-05 07:46:41.973 [INF] NTFN: Missed blocks, attempting to catch up
2024-02-05 07:46:41.974 [INF] NTFN: Block disconnected from main chain: height=545, sha=2200a3cba8f7b66fe9d41c708625201328938b63fe6f5352a57bc11627e4f501
2024-02-05 07:46:41.975 [ERR] LNWL: Neutrino rescan ended with error: unable to register block subscription: unable to retrieve blocks since height=544: EOF
...

Which is generated here in neutrino: https://github.com/lightninglabs/neutrino/blob/43f5a588eb4a53cb36d118420e186629154086da/rescan.go#L727-L734

Due to the test setup, it's difficult to tell whether this is a flake, a bug in the test or a bug in the rescan logic, need more investigation.

hsjoberg commented 5 months ago

Due to the test setup, it's difficult to tell whether this is a flake,

FWIW, we haven't seen this one in the wild. So probably flake.