Skip to content

Conversation

@martinsaposnic
Copy link

The routing fragmentation mitigation heuristic requires each channel to contribute at least payment_amount / max_path_count to avoid excessive path splitting. This makes sense for network paths where each additional path incurs base fees and increases failure probability.

However, for first hops this is overly restrictive. Multiple channels to the same peer converge immediately at the first hop - there's no actual network-level fragmentation. A 2M sat channel and a 48M sat channel to the same peer should be usable together for a 50M sat payment, but currently the small channel gets rejected (threshold would be 5M sat with default max_path_count=10), leaving only 48M available.

This change checks the aggregate capacity across all first-hop channels to a peer. If the aggregate meets the contribution threshold, individual channels are allowed regardless of their size.

The routing fragmentation mitigation heuristic requires each channel to
contribute at least `payment_amount / max_path_count` to avoid excessive
path splitting. This makes sense for network paths where each additional
path incurs base fees and increases failure probability.

However, for first hops this is overly restrictive. Multiple channels to
the same peer converge immediately at the first hop - there's no actual
network-level fragmentation. A 2M sat channel and a 48M sat channel to
the same peer should be usable together for a 50M sat payment, but
currently the small channel gets rejected (threshold would be 5M sat
with default max_path_count=10), leaving only 48M available.

This change checks the aggregate capacity across all first-hop channels
to a peer. If the aggregate meets the contribution threshold, individual
channels are allowed regardless of their size.
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.

2 participants