You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LSP can stay undiscovered for up to an hour after it becomes reachable #1242
LSPS0 protocol discovery for configured LSPs runs at startup. If it fails, a background task retries it, backing off from 5s up to a 1h cap (LIQUIDITY_DISCOVERY_RETRY_*). If an LSP is unreachable for a while, the retry delay grows. Once the LSP comes back, the node keeps skipping it until
the next retry fires, even if it's already connected. That can take up to an hour, and JIT invoice and LSPS1 requests fail with LiquiditySourceUnavailable the whole time.
Possible approaches:
Wake the existing retry loop, or reset its backoff, when the peer connection to an undiscovered LSP comes up. This covers all LSPS1/LSPS2 callers and adds no latency on the request path.
Retry discovery on demand when a request finds no suitable LSP. This needs a tight overall timeout and concurrent attempts, so a permanently dead LSP doesn't stall requests that a healthy LSP could serve.
Related: #1151, which takes the second approach for the BOLT11 JIT path only.
I think I'd lean with the first approach (wake the existing retry loop).
Measured on the #1151 test (base 1dea48a): the first retry fired at +5 s and was refused about 50 ms before the test connected to the freshly started LSP; a JIT request before the second retry failed with LiquiditySourceUnavailable, and, polled, it succeeded at +15.2 s when that retry ran. So a reconnect that just misses a retry waits out the next interval even at the start of the backoff. Our clients are phones, which can start before the network is up and reach the LSP seconds later, so waking the retry loop on reconnect is the shape that fits us.
Happy to run a wake-on-reconnect branch against that test on our harness, or to open a PR for it if you'd like one.
Activity
hash-money commentedon Nov 17, 2026
Measured on the #1151 test (base 1dea48a): the first retry fired at +5 s and was refused about 50 ms before the test connected to the freshly started LSP; a JIT request before the second retry failed with
LiquiditySourceUnavailable, and, polled, it succeeded at +15.2 s when that retry ran. So a reconnect that just misses a retry waits out the next interval even at the start of the backoff. Our clients are phones, which can start before the network is up and reach the LSP seconds later, so waking the retry loop on reconnect is the shape that fits us.Happy to run a wake-on-reconnect branch against that test on our harness, or to open a PR for it if you'd like one.