Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wpaulino
Copy link
Contributor

Previously, if we were negotiating quiescence, and we had already sent our stfu, we'd disconnect upon receiving the counterparty's stfu if we had a pending monitor update. This could result from processing a counterparty's final revoke_and_ack to an update, and immediately processing their stfu (which is valid from their point of view) without complete the monitor update. This was unintended, as we are able to track the quiescent and pending monitor update flags at the same time. Note that this commit still considers whether our signer owes any messages, as these are indicative of a channel update still pending.

Fixes #3805.

Previously, if we were negotiating quiescence, and we had already sent
our `stfu`, we'd disconnect upon receiving the counterparty's `stfu` if
we had a pending monitor update. This could result from processing a
counterparty's final `revoke_and_ack` to an update, and immediately
processing their `stfu` (which is valid from their point of view)
without complete the monitor update. This was unintended, as we are able
to track the quiescent and pending monitor update flags at the same
time. Note that this commit still considers whether our signer owes any
messages, as these are indicative of a channel update still pending.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented May 28, 2025

👋 Thanks for assigning @TheBlueMatt as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.73%. Comparing base (5688166) to head (a5b3bd2).

Files with missing lines Patch % Lines
lightning/src/ln/quiescence_tests.rs 95.91% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3806      +/-   ##
==========================================
- Coverage   89.75%   89.73%   -0.03%     
==========================================
  Files         159      159              
  Lines      128828   128878      +50     
  Branches   128828   128878      +50     
==========================================
+ Hits       115634   115653      +19     
- Misses      10511    10537      +26     
- Partials     2683     2688       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wpaulino wpaulino requested review from jkczyz and removed request for joostjager May 28, 2025 18:10
@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

@wpaulino wpaulino requested a review from TheBlueMatt May 30, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fuzz Failure: Received counterparty stfu while having pending counterparty updates
3 participants