lnd
lnd copied to clipboard
[2/4] Route Blinding Receives: Receive and send to a single blinded path in an invoice.
Tracking Issue: https://github.com/lightningnetwork/lnd/issues/6690
Depends on #8752
High level overview:
This PR is the first in a set of 3 PRs that will implement route blinding receive logic in LND. As LND does not yet support blot 12 invoices, this PR adds them to the Bolt11 invoice serialisation.
With this PR, a user can request that a bolt 11 invoice include blinded paths and will also be able to pay to a bolt 11 invoice that includes blinded paths. However, with this PR, only one of the paths in the invoice will be used. A follow up PR will add the ability to make use of multiple paths.
Lower level overview:
- Logic for constructing a full blinded payment path packet given a candidate route to ourselves.
- Graph traversal logic for finding a set of candidate routes to ourselves to use in a blinded path.
- Various receiver side updates to ensure that we correctly handle an incoming payment from a blinded route (by for example, extracting the payment address from the pathID). Also a few updates for the case where we receive MP payments for a blinded path.
- A couple of sender side updates to ensure that MP payments to a single blinded path can work
- Updates and additions to the route blinding itests to cover the new receive logic :)