Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to close channel that does not have option_shutdown_anysegwit enabled fails, becomes uncloseable #7014

Closed
leocape opened this issue Jan 25, 2024 · 0 comments · Fixed by #7072

Comments

@leocape
Copy link

leocape commented Jan 25, 2024

Issue and Steps to Reproduce

Attempting to close a channel with an np2wkh address fails if the peer does not have option_shutdown_anysegwit enabled. Attempting to close again, this time using a p2wkh address fails as the previous shutdown script is now locked into the channel.

There is no way to proceed from here, except for force close, and potential loss.

This should not be a use case - if the peer does not have option_shutdown_anysegwit enabled, then when attempting to close the channel with np2wkh address the request should be rejected - the shutdown script should not be added to the channel, rendering the channel unclose-able.

lightning-cli close id=123xxx destination=39xxx (np2wkh address)

{
"code": -32602,
"message": "Invalid close destination"
}

lightning-cli close id=123xxx destination=1bcxxx (p2wkh address)

{
"code": -32602,
"message": "Destination address abc123 does not match previous shutdown script def123"
}

lightning-cli close id=123xxx (no destination specified)

{
"code": -32602,
"message": "Invalid close destination"
}

@rustyrussell rustyrussell added this to the v24.02 milestone Feb 14, 2024
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Feb 14, 2024
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Feb 14, 2024
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
cdecker pushed a commit that referenced this issue Feb 16, 2024
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
gudnuf pushed a commit to gudnuf/lightning that referenced this issue Mar 1, 2024
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants