Skip to content

Conversation

rustyrussell
Copy link
Contributor

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: #8331

…e 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: ElementsProject#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 <[email protected]>
@rustyrussell rustyrussell added this to the v25.12 milestone Sep 5, 2025
@rustyrussell rustyrussell force-pushed the guilt/xpay-phoenix-detect branch from a353419 to cccac43 Compare September 5, 2025 05:41
@Lagrang3 Lagrang3 self-requested a review September 5, 2025 06:35
@rustyrussell rustyrussell marked this pull request as draft September 6, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant