Skip to content

lnpeer: drop support for legacy closing fee negotiation - #10861

Merged
SomberNight merged 2 commits into
masterfrom
fix_unbounded_closing_fee
Aug 19, 2026
Merged

lnpeer: drop support for legacy closing fee negotiation#10861
SomberNight merged 2 commits into
masterfrom
fix_unbounded_closing_fee

Conversation

@ecdsa

@ecdsa ecdsa commented Aug 17, 2026

Copy link
Copy Markdown
Member

Note that BOLT2 used to bound fee_satoshis by the base fee of the final ctx, but that requirement was removed in lightning/bolts#847.

Also fix the "strictly between" check, which was skipped when their previously proposed fee was 0.

@ecdsa
ecdsa force-pushed the fix_unbounded_closing_fee branch 3 times, most recently from 1b22b3f to c082a70 Compare August 17, 2026 15:21
@ecdsa
ecdsa marked this pull request as ready for review August 17, 2026 16:16
Comment thread electrum/lnpeer.py
Comment thread electrum/lnpeer.py Outdated
Comment thread electrum/lnpeer.py Outdated
Comment thread electrum/lnpeer.py
Also, do not use the latest ctx fee as maximum.
Instead, define the maximum as twice our_fee capped with FEERATE_MAX_DYNAMIC
@ecdsa
ecdsa force-pushed the fix_unbounded_closing_fee branch from 85a19a0 to ca4f01e Compare August 18, 2026 08:53
@ecdsa ecdsa changed the title lnpeer: bound the co-op closing fee we accept from the remote lnpeer: drop support for legacy closing fee negotiation Aug 18, 2026
@ecdsa ecdsa added this to the 4.8.2 milestone Aug 18, 2026
@SomberNight
SomberNight force-pushed the fix_unbounded_closing_fee branch from 659dad5 to 01fb37b Compare August 18, 2026 16:19
Comment thread electrum/lnpeer.py Outdated
- previously the code being unit-tested behaved different than in production:
  the submissive branch was guarded with "if not is_initiator and not self.config.TEST_SHUTDOWN_FEE_RANGE",
  so it never entered during unit tests
- unit tests to test both direction: either Alice or Bob can send shutdown first
- ensure min_fee always meets relay_fee
@SomberNight
SomberNight force-pushed the fix_unbounded_closing_fee branch from 01fb37b to 75bd374 Compare August 19, 2026 12:51
@ecdsa

ecdsa commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

LGTM

@SomberNight
SomberNight merged commit f0f6521 into master Aug 19, 2026
12 of 13 checks passed
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.

2 participants