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

ln: add trampoline routing payment claiming

Public commit record

What the developer wrote

Authored by Carla Kirk-Cohen

80/100 · Strong
ln: add trampoline routing payment claiming

Implement payment claiming for `HTLCSource::TrampolineForward` by
iterating through previous hop data and claiming funds for each
HTLC. Similar to regular forwards, we need to block the outbound
channel's RAA on the inbound monitor persisting preimages received.
If we have multiple inbound HTLCs for trampoline, we'll add multiple
blockers so that we don't proceed until each inbound HTLC is claimable.

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

What changed, and why it matters

This commit finishes a previously unimplemented code path for 'trampoline routing' in the Lightning Dev Kit. Before this change, if a payment arrived via a trampoline forward, the software had a placeholder 'todo!()' where it should claim the funds. The commit adds the actual claiming logic, including safety checks that prevent the next channel step from proceeding until the incoming payment proof is durably saved. It is a feature-completion patch with defensive safety logic, not a fix for a known active vulnerability.

Recommended action

Treat as normal feature-completion code review. Verify that claim_funds_from_htlc_forward_hop is idempotent or safely handles duplicate calls for the same HTLC, that the RAA blocker is released correctly on persistence failure, and that the single PaymentForwarded event accurately represents the aggregate trampoline forward. No urgent security action is indicated by the supplied materials.

Security signals we found

01

Replaces a todo!() panic path with real fund-claiming logic

02

Adds RAA blocking for multiple inbound trampoline HTLCs to ensure preimage persistence before outbound channel advances

03

Touches trampoline forwarding, a newer and less battle-tested LDK feature

04

No explicit bug, CVE, or security disclosure referenced in commit or materials

Risk score

Why this scored 29/100

Our methodology →
Potential impact 8/30
Exploitability 4/25
Stealth signal 3/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.