Avoid adding all private channels with the same peer as hop hints in new invoices #4520
Labels
beginner
Issues suitable for new developers
enhancement
Improvements to existing features / behaviour
feature request
Requests for new features
good first issue
Issues suitable for first time contributors to LND
invoices
payments
Related to invoices/payments
routing
rpc
Related to the RPC interface
Background
When a node has multiple private channels with the same peer, the hop hints in their payment requests will be populated with multiple channels. The purpose of these hop hints is to specify the next node's key and indicate the fees and cltv delta needed for route construction.
In pathfinding, due to non-strict forwarding, an LND node paying to this destination will only use the maximal policy values across these multiple hinted channels.
Since it only uses the maximal policy values in order to be an acceptable forward over any channel, the creator of the invoice may as well save some space in the payment request by pre-calculating the maximal policy values and compressing multiple private channels with the same peer into a single set of edge policy values
Your environment
Steps to reproduce
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: