ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.86k stars 906 forks source link

Support blinded paths (i.e. bolt12) in renepay #6609

Open rustyrussell opened 1 year ago

rustyrussell commented 1 year ago

We use localmods to do this:

  1. If no blinded path uses the destination node itself as an entry point: remove/disable all other channels into the node.
  2. Add blinded paths as "channels" in the graph.

When we use a blinded hop, catch it at sendpay creation time and insert multiple hops. This might require additional args to sendpay, or switching to sendonion?

Lagrang3 commented 3 months ago

I am working on this. First thing to add blinded path arguments to sendpay (#7493), then re-engineer a little bit renepay's MCF solver to send a payment to multiple destinations (one for each blinded path entry node) . Still to think about how to handle multiple blinded paths with the same entry node and the special case when the entry node is ourselves.

To generate all sorts of blinded path special cases for testing we would need some RPC to generate arbitrary blinded paths, because currently the only way to obtain one is through offer->fetchinvoice and CLN will automatically generate one, not multiple and very trivial single node path.