Skip to content

Always emit bump events, even when fees are sufficient #4001

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

wvanlint
Copy link
Contributor

@wvanlint wvanlint commented Aug 8, 2025

Currently, the anchor commitment bump events are bypassed when the commitment transaction has sufficient fees. However, this makes it difficult for users to defer force-closures to a trusted party (such as an LSP) while not maintaining reserves. Broadcasting a commitment transaction without maintaining reserves would make HTLCs unclaimable against that commitment transaction.

In this change, anchor commitment bump events will always be emitted so users can capture and choose not to process them.

Fixes #3496.

Currently, the anchor commitment bump events are bypassed when the
commitment transaction has sufficient fees. However, this makes it
difficult for users to defer force-closures to a trusted party (such as
an LSP) while not maintaining reserves. Broadcasting a commitment
transaction without maintaining reserves would make HTLCs unclaimable
against that commitment transaction.

In this change, anchor commitment bump events will always be emitted so
users can capture and choose not to process them.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Aug 8, 2025

I've assigned @joostjager 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.

@wpaulino
Copy link
Contributor

wpaulino commented Aug 8, 2025

Basically LGTM, any reason why it's draft?

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 83.95062% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.94%. Comparing base (192618b) to head (d99e59b).

Files with missing lines Patch % Lines
lightning/src/ln/monitor_tests.rs 72.72% 3 Missing and 3 partials ⚠️
lightning/src/ln/reorg_tests.rs 84.61% 3 Missing and 1 partial ⚠️
lightning/src/ln/functional_test_utils.rs 85.71% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4001   +/-   ##
=======================================
  Coverage   88.93%   88.94%           
=======================================
  Files         174      174           
  Lines      124593   124642   +49     
  Branches   124593   124642   +49     
=======================================
+ Hits       110813   110861   +48     
- Misses      11283    11287    +4     
+ Partials     2497     2494    -3     
Flag Coverage Δ
fuzzing 22.17% <0.00%> (-0.01%) ⬇️
tests 88.77% <83.95%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@wvanlint wvanlint marked this pull request as ready for review August 9, 2025 00:20
@wvanlint
Copy link
Contributor Author

wvanlint commented Aug 9, 2025

Basically LGTM, any reason why it's draft?

Ah, I was mainly waiting for CI to complete successfully, marked ready for review now.

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.

Use bump events for broadcasting anchor commitment txn even if they have enough fees
3 participants