Fixing onion message support requirement for the first_node_id of bolt12 invoices#8682
Conversation
|
This patch seems wrong. We are about to issue an invoice, and provide a blinded path. We have already received the invoice request. The peer we use needs to support blinded paths, not onion messages. |
Thanks. Here are the tests I did. I generated an offer with blinded paths (no offer issuer id). I tried fetching an invoice for it, from Phoenix, Misty Breez and from the node that created the offer. This works just fine, I receive an invoice in the three cases. The invoice_node_id and signature are for the last blinded node id within the offer's blinded paths (through which the invoice request was received), as expected from the specs as far as I understand. However, the invoice had an invoice's first_node_id that points to an LND node (another one of my peers) that does not have onion message support. When I try paying this invoice with either Phoenix, Misty Breez or the node that created the offer, it always fail. In the case of CLN, I get an
error (with the apps the failure message is encoded). I assumed this was because the LND node did not support onion messages. So I changed the code as shown in this PR. I fetched new invoices, which this time had an invoice's first_node_id that pointed to a node that supports onion messages (that turned out to be the same node as the first_node_id of the offer). Then when I try paying these invoices the payment goes straight through in all cases (Phoenix, Misty Breez and CLN. Also tried with an independent CLN node). Maybe there is something else about LND nodes that make these payment through blinded paths (as opposed to a non-blinded invoice_node_id) fail? |
|
Can you give me the id of the LND node? In particular, we should NOT choose it if it does not offer feature 24/25... |
Actually, looking at an LNBIG node for example, they do advertize option_route_blinding. Which means they should forward this correctly, but maybe they don't. I can work around this by requiring both options, for now. |
This means we can ask for more than one required feature at a time. Signed-off-by: Rusty Russell <[email protected]>
Changelog-Fixed: offers: require peers for blinded paths to have `option_onion_messages`, due to reports of LND not forwarding our blinded payments correctly.
dedebea to
8478cb0
Compare
In add_blindedpaths from plugins/offers_invreq_hook.c, find_best_peer should be called with OPT_ONION_MESSAGES so the invoice's first_node_id supports onion messages, similarly to what is done with offers. Otherwise CLN is unable to receive payments when attempted by the payer through blinded paths and the first_node_id does not support option_onion_messages...
Important
25.12 FREEZE October 27th: Non-bugfix PRs not ready by this date will wait for 26.03.
RC1 is scheduled on November 10th
The final release is scheduled for December 1st.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked: