lsp_plugin: remove anchor-type from jit channel
What changed, and why it matters
This commit changes a single number in the code that creates 'just-in-time' (JIT) channels for Lightning Service Providers (LSPs). The old number enabled 'anchor' channels, which are a newer channel type. The new number disables anchors and falls back to a more basic channel type. The stated reason is that the Elements sidechain does not support anchor channels yet. This is a compatibility/configurability change, not a fix for an active security flaw.
Treat as a normal compatibility/configurability patch. Review whether hard-coding a non-anchor channel type is acceptable for all deployments, and verify that the fallback channel type is supported by counterparties. No urgent security action is indicated by the diff or commit message.
Security signals we found
Feature-bit change in channel negotiation
Removes anchor channel type from JIT channel opens
Stated rationale is cross-chain compatibility (Elements lacks anchor support)
No bounds checks, cryptographic, or memory-safety changes
Evidence from the diff
In plugins/lsps-plugin/src/lsps2/handler.rs, the channel_type bit vector passed when opening a JIT channel is changed from Some(vec![12, 22, 50]) to Some(vec![12, 46, 50]). In Core Lightning’s channel-type encoding, feature bit 22 corresponds to option_anchors/zero fee HTLC tx (anchor channels), while bit 46 corresponds to option_static_remotekey / non-anchor. The patch therefore removes the anchor channel feature from LSPS2 JIT channel opens and keeps static_remotekey and script-enforced-lease (bits 12 and 50). The commit message says this is because Elements does not support anchors and that configurability will be added later.
Changed components
plugins/lsps-plugin/src/lsps2/handler.rsLSPS2 JIT channel opening flowChannel type feature-bit negotiationInspect captured patch +1 / −1
diff --git a/plugins/lsps-plugin/src/lsps2/handler.rs b/plugins/lsps-plugin/src/lsps2/handler.rs
index c8e7168a..7c470ae2 100644
--- a/plugins/lsps-plugin/src/lsps2/handler.rs
+++ b/plugins/lsps-plugin/src/lsps2/handler.rs
@@ -507,7 +507,7 @@ impl<A: ClnApi> HtlcAcceptedHookHandler<A> {
push_msat: None,
request_amt: None,
reserve: None,
- channel_type: Some(vec![12, 22, 50]),
+ channel_type: Some(vec![12, 46, 50]),
utxos: None,
amount: AmountOrAll::Amount(Amount::from_msat(cap)),
id: ds_rec.peer_id,
Why this scored 26/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.