Skip to content

Commit 76eecc2

Browse files
authored
Merge pull request #13 from dunxen/2294-offers-handling
Add PR2294 remaining notes
2 parents 9e354a1 + 13d2acb commit 76eecc2

File tree

1 file changed

+45
-12
lines changed

1 file changed

+45
-12
lines changed

_posts/2023-05-23-#2294.md

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,65 @@
11
---
22
layout: pr
33
date: 2023-05-23
4-
title: "Bolt 12 Offers message handling support"
4+
title: "BOLT 12 Offers message handling support"
55
pr: 2294
66
authors: [jkczyz]
7-
components: []
7+
components: ["offers", "onion messages"]
88
host: dunxen
99
status: upcoming
1010
commit:
1111
---
1212

1313
## Notes
1414

15-
BOLT 12 Offers essentially provide a way for a Lightning node to receive payments through the use of a static identifier (they can be long-lived).
16-
Offers do not replace BOLT 11 invoices, in fact, they work in tandem. Readers of an offer will be able to request invoices via [onion messages]
17-
using a [blinded path] to the creator of the offer.
15+
BOLT 12 offers essentially provide a way for a merchant to receive payments through the use of a static identifier (they can be long-lived).
16+
Offers do not replace the need for something like invoices, in fact, they work in tandem. Readers of an offer will be able to request invoices
17+
via [onion messages] using a [blinded path] to the merchant. This provides recipient privacy. In fact, any onion messages, not just for offers,
18+
can use a blinded path.
1819

19-
PR [#2294] introduces message handling for offers, so that LDK and also adds support for actually replying to onion messages which is an essential
20-
part of the offer protocol.
20+
PR [#2294] introduces onion message handling for offers so that LDK can interpret offer payloads. It also adds support for actually replying to
21+
onion messages via reply paths in general which is an essential part of the offer protocol and other uses of onion messages. The reader of an
22+
offer would create an `InvoiceRequest` payload to send to the merchant (to a blinded path provided in the offer contents) who would then reply
23+
with an `Invoice` requesting payment or an `InvoiceError`. If an `Invoice` is received, the payer can then pay the invoice (also to a blinded path)
24+
or respond with an `InvoiceError`.
2125

22-
_More notest to follow_
26+
```
27+
A successful flow
28+
┌─────┐ ┌─────┐
29+
│ │ InvoiceRequest │ M │
30+
│ ├───────────►(BP)──►│ E │
31+
│ P │ │ R │
32+
│ A │ Invoice │ C │
33+
│ Y │◄─(BP)─────────────┤ H │
34+
│ E │ (reply path) │ A │
35+
│ R │ │ N │
36+
│ │ payment │ T │
37+
│ ├──────────►(BP)───►│ │
38+
└─────┘ └─────┘
2339
24-
## Questions
25-
1. Did you review the PR? [Concept ACK, approach ACK, tested ACK, or NACK](https://github.com/lightningdevkit/rust-lightning/blob/master/CONTRIBUTING.md#peer-review)?
40+
* BP: Blinded Path
41+
```
42+
43+
The PR adds the `OffersMessageHandler` trait where implementors handle incoming `OnionMessage`s containing an offer message as payload.
44+
`ChannelManager` implements this trait, but it remains a stub for this PR.
2645

27-
_More questions to follow_
46+
## Questions
47+
1. Did you review the PR? [Concept ACK, approach ACK, tested ACK, or NACK]?
48+
2. The PR introduces the `MessageRouter` trait for finding routes for onion messages. `MessageRoute::find_route` implementations must
49+
return a `Vec<PublicKey>` when provided a sender `PublicKey` and a `Destination`. What is a `Destination` in the onion
50+
messages context and which `PublicKey`s should an implementor be returning from `find_route`. Is `find_route` a good name? Any other
51+
ideas for a name?
52+
3. To support replies, onion message handlers were modified to return an optional response message. How does a recipient know where a
53+
reply should be sent? When replying do we ever know the original sender (the reply's recipient) node ID/pubkey?
54+
4. Currently a BOLT 11 invoice exposes the payee's node ID explicitly or via signature recovery. Without BOLT 12 (and blinded paths)
55+
and currently doable on the Lightning Network, is there any possible way to gain any level of privacy in this regard, or would
56+
the payer always know the payee's pubkey? How could we at the very least try make the effective payee not seem like the final
57+
recipient of the payment?
58+
5. We've generally covered one kind of payment flow scenario up to now. What other payment flow does BOLT 12 enable and how does this
59+
differ to the one we've discussed?
2860

2961
[onion messages]: https://github.com/lightning/bolts/pull/759
3062
[offers]: https://github.com/lightning/bolts/pull/798
3163
[blinded path]: https://github.com/lightning/bolts/blob/aad959a297ff66946effb165518143be15777dd6/04-onion-routing.md#route-blinding
32-
[#2294](https://github.com/lightningdevkit/rust-lightning/pull/2294)
64+
[#2294]: https://github.com/lightningdevkit/rust-lightning/pull/2294
65+
[Concept ACK, approach ACK, tested ACK, or NACK]: https://github.com/lightningdevkit/rust-lightning/blob/master/CONTRIBUTING.md#peer-review

0 commit comments

Comments
 (0)