plugins: defer spenderp awaiting-channel recovery#9272
Draft
bittylicious wants to merge 1 commit into
Draft
Conversation
1f6ab60 to
dcdc4b7
Compare
dcdc4b7 to
d7b9ce6
Compare
Author
|
Live validation on the reproducing node:
So this does not fix the underlying |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spenderpcurrently scansCHANNELD_AWAITING_LOCKIN/DUALOPEND_AWAITING_LOCKINchannels during plugin init and queuessignpsbtrecovery attempts for saved funding PSBTs.On a large mainnet node, one such
signpsbttook about 130 seconds before failing with:While that recovery work was in the plugin init path, unrelated important builtin plugins were still waiting to finish startup and hit their init timeout. The plugin named in the fatal log varied depending on which builtins were enabled (
autoclean,chanbackup,commando,funder,cln-bwatch,topology), causinglightningdto shut down/restart.This PR defers the awaiting-channel PSBT recovery scan to a zero-delay plugin timer. The recovery behaviour is preserved, but it no longer blocks
spenderpinit or the global plugin startup handshake.Reproduction context
Observed on CLN
v26.06andv26.06.2with a SQLite wallet DB that was initially around 9.1 GiB, later vacuumed to around 4.7 GiB. Vacuum/integrity checks and upgrade tov26.06.2did not change the symptom.The triggering channel was in
CHANNELD_AWAITING_LOCKIN, with:funding.withheld=falsefunding_txidfunding.psbtDisabling
spenderpstopped the startup crash loop. Re-enabling only the funding-related builtin group reproduced the slowsignpsbtand laterspenderpfailure log.Notes
This does not attempt to decide whether that saved PSBT should be retried at all. It only prevents slow recovery signing from being startup-fatal.
A follow-up may still be useful to narrow the retry criteria for saved funding PSBTs that already correspond to a broadcast funding transaction.
Testing
Not yet compiled locally; local checkout lacked build dependencies (
lowdown, and likely other CLN build deps). Marking this PR as draft while we validate the approach and add/update tests.