AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 26 Bitcoin

lnworker: stop setting static jit alias for jit channel

Public commit record

What the developer wrote

Authored by f321x

95/100 · Strong
lnworker: stop setting static jit alias for jit channel

...so we can have multiple just in time channels with the same lsp.
We already save a remote scid alias in `on_channel_ready` which we
already have received after the new zeroconf channel is in open state.
So setting the alias to the static node id hash is counterproductive
because it doesn't allow to differentiate between channels.

Also extends the regtest (`just_in_time`) to do a second channel
opening, to cover this scenario. This doesn't add much runtime to
the test, so the cost seems reasonable.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This change fixes a bug in Electrum's Lightning 'just-in-time' (JIT) channel feature. Previously, every JIT channel opened with the same Lightning service provider (LSP) was being assigned the same internal identifier derived from the LSP's public key. That made it impossible to tell multiple JIT channels apart, which could confuse routing and prevent a user from having more than one usable JIT channel with the same LSP. The patch stops setting that duplicate identifier and instead relies on a remote alias already received when the channel becomes ready. A test is added to verify that two JIT channels can be opened successfully.

Recommended action

Reviewers should confirm that removing the static alias does not leave any code path expecting that alias, and that on_channel_ready's saved alias is always present before HTLC forwarding. Users running Lightning JIT channels should update to avoid routing/channel-lookup issues with the same LSP.

Security signals we found

01

Lightning channel alias collision removed

02

JIT channel identifier now uses remote-provided scid alias

03

Functional test added for multiple JIT channels with same LSP

Risk score

Why this scored 26/100

Our methodology →
Potential impact 5/30
Exploitability 3/25
Stealth signal 4/15
Affected reach 5/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.