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

ln: add trampoline routing failure handling

Public commit record

What the developer wrote

Authored by Carla Kirk-Cohen

78/100 · Adequate
ln: add trampoline routing failure handling

Implement failure propagation for `HTLCSource::TrampolineForward`
by iterating through previous hop data and failing each HTLC with
`TemporaryTrampolineFailure`.

Note that testing should be implemented when trampoline forward is
completed.

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✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fills in a previously unimplemented 'todo!' placeholder for handling failed trampoline-routed payments. When a trampoline forward fails, the node now properly reports the failure back through each incoming payment hop using a standard temporary trampoline failure message, instead of crashing. This is a robustness improvement that prevents a panic path and ensures correct Lightning protocol behavior for an in-development feature.

Recommended action

Treat as a normal code-quality/robustness commit. Reviewers should verify that TemporaryTrampolineFailure is the correct failure code per BOLT specifications and that the over-failing behavior noted in the TODO does not create denial-of-service or unfair penalty risks. No immediate security response appears necessary.

Security signals we found

01

Replaces unimplemented todo!() panic with structured failure handling

02

Adds failure propagation for TrampolineForward HTLC source

03

Uses TemporaryTrampolineFailure as the standardized failure reason

04

Emits a single HTLCHandlingFailed event after failing all incoming HTLCs

05

Contains a TODO indicating the logic is incomplete and may over-fail incoming HTLCs

Risk score

Why this scored 32/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/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.