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

xpay: restrict maxparts to 6 for non-public nodes, but remove it if we can't route.

Public commit record

What the developer wrote

Authored by Rusty Russell

81/100 · Strong
xpay: restrict maxparts to 6 for non-public nodes, but remove it if we can't route.

This attempts to solve a problem we have with Phoenix clients:

This payment has been split in two many parts by the sender: 31 parts vs max 6 parts allowed for on-the-fly funding.

The problem is that we don't have any way in bolt11 or bolt12 to
specify the maximum number of HTLCs.

As a workaround, we start by restricting askrene to 6 parts if the
node is not openly reachable, and if it struggles, we remove the
restriction. This would work much better if askrene handled maxparts
more completely!

See-Also: https://github.com/ElementsProject/lightning/issues/8331
Changelog-Fixed: `xpay` will not try to send too many HTLCs through unknown channels (6, as that is Phoenix's limit) unless it has no choice
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ 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 change adjusts how Core Lightning's xpay plugin splits payments. It limits multi-part payments to 6 pieces when the destination is not publicly known, matching a known limit used by Phoenix wallets. If routing fails with that limit, xpay removes it and retries. Previously, xpay could send too many payment pieces through private channels, causing payments to fail at the recipient. This is a compatibility and reliability fix, not a security vulnerability in the traditional sense, but it prevents a real-world payment failure scenario.

Recommended action

No urgent security action required. Operators and downstream integrators should note that xpay no longer exposes dev_maxparts and now auto-limits parts to 6 for non-public destinations. Review whether 6 is the right default for other private-node scenarios and monitor for askrene improvements mentioned in the commit message.

Security signals we found

01

Denial-of-service-like payment failure due to HTLC limit mismatch with Phoenix recipients

02

Workaround for missing BOLT11/BOLT12 max HTLC signaling

03

Defensive fallback removes restriction only after initial routing failure

04

No cryptographic, authentication, or memory-safety changes

Risk score

Why this scored 34/100

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