-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
routing: Support Pathfinding to Blinded Routes #7267
routing: Support Pathfinding to Blinded Routes #7267
Commits on Sep 27, 2023
-
routing: add representation of blinded payments
This commit adds a representation of blinded payments, which include a blinded path and aggregate routing parameters to be used in payment to the path.
Configuration menu - View commit details
-
Copy full SHA for 796f9a7 - Browse repository at this point
Copy the full SHA 796f9a7View commit details -
multi: add blinded path TLVs to onion payload / hops
This commit adds the encrypted_data, blinding_point and total_amt_msat tlvs to the known set of even tlvs for the onion payload. These TLVs are added in two places (the onion payload and hop struct) because lnd uses the same set of TLV types for both structs (and they inherently represent the same thing). Note: in some places, unit tests intentionally mimic the style of older tests, so as to be more consistently readable.
Configuration menu - View commit details
-
Copy full SHA for ac67879 - Browse repository at this point
Copy the full SHA ac67879View commit details -
routing: only pack amount and cltv if populated
With the addition of blinded routes, we now need to account for the possibility that intermediate nodes payloads will not have an amount and expiry set because that information is provided by the recipient encrypted data blob. This commit updates our payload packing to only optionally include those fields.
Configuration menu - View commit details
-
Copy full SHA for b4570e0 - Browse repository at this point
Copy the full SHA b4570e0View commit details -
routing: account for blinded routes in fee calculation
When we introduce blinded routes, some of our hops are expected to have zero amounts to forward in their hop payload. This commit updates our hop fee logic to attribute the full blinded route's fees to the introduction node. We can't actually know where/how these fees are distributed, so we collect them all at the introduction node.
Configuration menu - View commit details
-
Copy full SHA for 927c941 - Browse repository at this point
Copy the full SHA 927c941View commit details -
multi/refactor: add RouteRequest to hold FindRoute parameters
This commit introduces a single struct to hold all of the parameters that are passed to FindRoute. This cleans up an already overloaded function signature and prepares us for handling requests with blinded routes where we need to perform some additional processing on our para (such as extracting the target node from the blinded path).
Configuration menu - View commit details
-
Copy full SHA for e072895 - Browse repository at this point
Copy the full SHA e072895View commit details -
multi: add blinded route to route requests expressed as hints
Add the option to include a blinded route in a route request (exclusive to including hop hints, because it's incongruous to include both), and express the route as a chain of hop hints. Using a chain of hints over a single hint to represent the whole path allows us to re-use our route construction to fill in a lot of the path on our behalf.
Configuration menu - View commit details
-
Copy full SHA for 7fa20c3 - Browse repository at this point
Copy the full SHA 7fa20c3View commit details -
routing: include route blinding fields in blinded portion of path
This commit updates route construction to backfill the fields required for payment to blinded paths and set amount to forward and expiry fields to zero for intermediate hops (as is instructed in the route blinding specification). We could attempt to do this in the first pass, but that loop relies on fields like amount to forward and expiry to calculate each hop backwards, so we keep it simple (stupid) and post processes the blinded portion, since it's computationally cheap and more readable.
Configuration menu - View commit details
-
Copy full SHA for 38fa4ff - Browse repository at this point
Copy the full SHA 38fa4ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2766922 - Browse repository at this point
Copy the full SHA 2766922View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7109d8 - Browse repository at this point
Copy the full SHA a7109d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ddb1c2 - Browse repository at this point
Copy the full SHA 0ddb1c2View commit details -
routing: remove 0-value warning log in pathfinding
Blinded routes can now have "hints" that have zero value edges, so we remove this log to avoid spamming logs.
Configuration menu - View commit details
-
Copy full SHA for 600efc0 - Browse repository at this point
Copy the full SHA 600efc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a02be0 - Browse repository at this point
Copy the full SHA 2a02be0View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb72400 - Browse repository at this point
Copy the full SHA eb72400View commit details -
lncli: add blinded route cli flags to query routes
Note: This commit can be dropped before merge, it's mostly added to make the PR easier to manually test against other implementations that have bolt 12 invoices implemented already!
Configuration menu - View commit details
-
Copy full SHA for 9cc293b - Browse repository at this point
Copy the full SHA 9cc293bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e334fc0 - Browse repository at this point
Copy the full SHA e334fc0View commit details