Repository navigation
Accept LSPS2 JIT channels before LSP discovery - #1263
Merged
tankyleo merged 1 commit intoDec 4, 2026
Merged
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
ajaysehwal
reviewed
Nov 25, 2026
tankyleo
reviewed
Nov 30, 2026
tankyleo
reviewed
Dec 4, 2026
tankyleo
left a comment
Contributor
There was a problem hiding this comment.
Feel free to squash, we should also remove the items below to get RUSTFLAGS="-D warnings" cargo build to pass:
LiquiditySource::discovery_done_rx
LiquiditySource::get_lsp_config
Collaborator
Author
Added a fixup. |
tnull
force-pushed
the
2026-11-lsps2-underpay-before-discovery
branch
from
December 4, 2026 15:48
4f96de5 to
4611892
Compare
We only allowed underpaying HTLCs on an inbound channel if protocol discovery had found the counterparty to support LSPS2. Discovery results are kept in memory, so after a restart during which the LSP could not be reached, a JIT channel opened for an earlier invoice was accepted without the override. The fee-skimmed payment was then rejected, and as we never set the override on an accepted channel ourselves, the invoice could not be paid unless the user set it via `Node::update_channel_config`. We now set the override for any configured LSP, as we already do when deciding whether to trust it for 0conf. The skimmed fee is still checked against the limit from the payment metadata before claiming. Co-Authored-By: HAL 9000
tnull
force-pushed
the
2026-11-lsps2-underpay-before-discovery
branch
from
December 4, 2026 16:32
4611892 to
8950a27
Compare
Collaborator
Author
Squashed without further changes. |
tankyleo
approved these changes
Dec 4, 2026
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.
We only allowed underpaying HTLCs on an inbound channel if protocol discovery had found the counterparty to support LSPS2. Discovery results are kept in memory, so after a restart during which the LSP could not be reached, a JIT channel opened for an earlier invoice was accepted without the override. The fee-skimmed payment was then rejected, and as the override cannot be set later, the invoice could never be paid.
We now set the override for any configured LSP, as we already do when deciding whether to trust it for 0conf. The skimmed fee is still checked against the limit from the payment metadata before claiming.
Co-Authored-By: HAL 9000