Repository navigation
Conversation
|
👋 Hi! I see this is a draft PR. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Observed user consequence
Fixes #1129. An LSPS2 service received one 100,000-sat part of a 105,000-sat JIT payment on an announced 400,000-sat inbound channel. The default announced-channel max HTLC-value-in-flight limit is 25%, so the incoming part alone consumed the permitted 100,000 sats. The next part could not arrive. The intercepted HTLC was held for 13 hours 6 minutes before failing back, per the issue reporter's mainnet measurements.
Root cause and fix
LDK Node's
open_channel_innersupplies aUserConfigfor announced channels without overriding LDK's 25% announced inbound HTLC cap. It already relies on 100% for unannounced channels to support JIT receipt.For nodes serving LSPS2, set
announced_channel_max_inbound_htlc_value_in_flight_percentage = 100when creating announced channels, matching the full-capacity requirement already documented for the LSP→client JIT channel. This allows a sufficiently liquid announced inbound channel to carry the full payment, rather than being capped at 25% of nominal channel size.The override is conditional on LSPS2 service mode; other announced channels on nodes without the service preserve the 25% default. There is no wire format change and existing channels retain their negotiated limit.
Proof scope
Source-backed candidate against current upstream
main; mainnet incident and 13h06m hold are documented in issue #1129. This draft has not passed Rust compilation,cargo fmt, upstream tests, or the actual two-part LSPS2 service payment with announced inbound channel. Before review-ready: run Rust format/build and a live regtest journey (400k announced, 105k JIT split into 100k/5k, verify both parts arrive and channel opens), then measure operator liquidity exposure. Raising announced inbound capacity permits peers to occupy more HTLC liquidity, so this is intentionally scoped to LSPS2 service operators.This fixes an existing reported issue; it is not a new security discovery or proof of stolen funds.