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

Add threshold for disabling `from_future_htlc` (#3293)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

81/100 · Strong
Add threshold for disabling `from_future_htlc` (#3293)

When funding a transaction using `from_future_htlc`, we are taking the
risk that the remote node doesn't fulfill the corresponding HTLCs. If
we detect that too many peers fail such HTLCs, this may indicate a bug
on the wallet side, so we automatically disable `from_future_htlc` to
limit our exposure.

We also ensure that nodes that already had one suspicious payment are
blacklisted for other payments. This issue can happen when wallet users
use multiple devices in unsupported scenarios.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit adds a safety limit to a Lightning node feature called 'from_future_htlc,' which lets peers pay channel funding fees using HTLCs that haven't arrived yet. The change makes the node track how many distinct peers look suspicious (e.g., accept funding but then reject the future HTLCs), and once a threshold is reached, it stops allowing that funding method. It also lets operators keep specific nodes blacklisted when re-enabling the feature. This is a defensive hardening patch, not a fix for an active exploit in the code itself.

Recommended action

Review the default threshold (10 suspicious peers) against expected traffic and risk appetite; ensure operators understand the new `enablefromfuturehtlc` parameter and that monitoring/alerting is in place for `SuspiciousFromFutureHtlcRelays` metrics. Consider whether the in-memory state should persist across restarts, since the commit notes it is currently flushed on restart.

Security signals we found

01

Hardening: adds rate-limiting/threshold behavior for suspicious peer activity

02

Behavior change: from global disable to per-peer suspicion tracking

03

New configuration parameter: on-the-fly-funding.max-suspicious-peers

04

API change: enablefromfuturehtlc now accepts optional suspiciousNodeIds list

05

Defensive coding: limits exposure to peers that accept funding but fail future HTLCs

Risk score

Why this scored 48/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 10/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.