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

ln: add TrampolineForward variant to HTLCSource enum

Public commit record

What the developer wrote

Authored by Maurice

73/100 · Adequate
ln: add TrampolineForward variant to HTLCSource enum

We only have payment details for HTLCSource::TrampolineForward available
once we've dispatched the payment. If we get to the stage where we need
a HTLCId for the outbound payment, we expect dispatch details to be
present.

Co-authored-by: Arik Sosman <git@arik.io>
Co-authored-by: Maurice Poirrier <mpch@hey.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a new internal bookkeeping variant called TrampolineForward to LDK's HTLCSource enum, which tracks Lightning payments being forwarded through a trampoline routing node. It also adds placeholder 'todo!()' stubs in several code paths that are not yet implemented for this new variant. The commit is part of ongoing trampoline-payment feature work and does not by itself fix a known security bug. The unimplemented stubs could, in theory, cause a panic if a trampoline forward reaches those code paths, but the commit message and diff treat this as expected incomplete functionality rather than a disclosed vulnerability.

Recommended action

Treat as normal feature development; no immediate security patch required. Reviewers should ensure the remaining 'todo!()' arms are implemented before trampoline forwarding is enabled in production, and that the .expect() on missing outbound_payment cannot be triggered by network input.

Security signals we found

01

New enum variant for trampoline forwarding with unimplemented 'todo!()' match arms

02

Use of .expect() when deriving SentHTLCId if outbound_payment is None

03

Intentional deserialization rejection to prevent downgrades with in-flight trampoline forwards

04

No security-relevant description in commit message or diff comments

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.