The Wayback Machine - https://web.archive.org/web/20200906111450/https://github.com/lightningnetwork/lnd/issues/4520
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid adding all private channels with the same peer as hop hints in new invoices #4520

Open
alexbosworth opened this issue Aug 10, 2020 · 1 comment

Comments

@alexbosworth
Copy link
Contributor

@alexbosworth alexbosworth commented Aug 10, 2020

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

  • LND 0.11.0-beta.rc2

Steps to reproduce

  • Create multiple private channels to a peer
  • Add a new invoice that includes private channel hop hints

Expected behavior

  • Hop hints should only include a single pairwise hint

Actual behavior

  • Hop hints includes the entire set of private channels
@kingonly
Copy link

@kingonly kingonly commented Aug 19, 2020

This is critical when displaying an invoice in QR code.
"Busier" QR code is much harder to scan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.