Pytest: test to reproduce issue #9389 - #9390
Draft
enaples wants to merge 1 commit into
Draft
Conversation
involving a channel opened with a node supporting option_shutdown_anysegwit which then withdraws the supports and the peer cannot close the channel, even unilaterally
enaples
marked this pull request as ready for review
August 7, 2026 13:46
daywalker90
marked this pull request as draft
August 7, 2026 16:44
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.
Important
26.09 FREEZE August 5th: Non-bugfix PRs not ready by this date will wait for 26.12.
RC1 is scheduled on August 17th
The final release is scheduled for September 7th.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
tools/lightning-downgradeChangelog-None
Reproduce #9389
What this does
Adds
test_closing_anysegwit_lost_unilateraltotests/test_closing.py, which reproduces the reported deadlock: a channel stuck inCHANNELD_SHUTTING_DOWNthat cannot be closed cooperatively or unilaterally.The test drives the exact sequence:
l1andl2open a channel while both offeroption_shutdown_anysegwit, sol1records a P2TRshutdown_scriptpubkey[LOCAL].l2goes away;l1issuesclosewithunilateraltimeout=0, which commits that script and moves the channel toCHANNELD_SHUTTING_DOWN.l2comes back withdev-force-features=-27, i.e. withoutoption_shutdown_anysegwit.l1can no longer close the channel by any means.Both RPC paths from the issue fail, and the channel stays stuck: