-
Couldn't load subscription status.
- Fork 421
Allow counterparty pending monitor update within quiescence handshake #3806
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
Merged
TheBlueMatt
merged 1 commit into
lightningdevkit:main
from
wpaulino:quiescence-final-raa-pending
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we receive a
commitment_signed, causing us to gomonitor_update_in_progressand prep to send an RAA in response? I guess in theory they're not supposed to send their stfu after they sent their CS because they're waiting on a response from us, but also probably we want to reject that because trying to handle splicing when we have two pending commitments seems annoying?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is allowed as long as the
commitment_signedis not sent as a result of a local update. In any case, our implementation will accept an inboundstfuat any point, but it will hold back sending its own as a response until bothis_waiting_on_peer_pending_channel_updateandis_monitor_or_signer_pending_channel_updateare false.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking in the context of where we'd already sent our stfu. AFAIU if we send a stfu, then they send a CS followed by an stfu (for a local update, because if it was in response to our update we shouldn't have sent our stfu). They may violate the protocol, but we really should be rejecting it explicitly because otherwise we're gonna respond with an RAA+CS and mark ourselves quiescent even though there are two valid commitment transactions pending (and have to deal with that when splicing, which we shouldn't have to).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this case is already covered. We can receive
commitment_signedif:revoke_and_ackorrevoke_and_ack+commitment_signed, and they owe us a finalrevoke_and_ackIn case 1, we cannot send
stfuuntil the local update is no longer pending, so receivingstfuhere doesn't change anything.In case 2, we'll disconnect them if they send
stfuimmediately aftercommitment_signedbecause we'reawaiting_remote_revoke(covered byis_waiting_on_peer_pending_channel_update).