|
1 | 1 | --- |
2 | 2 | layout: pr |
3 | 3 | date: 2023-05-23 |
4 | | -title: "Bolt 12 Offers message handling support" |
| 4 | +title: "BOLT 12 Offers message handling support" |
5 | 5 | pr: 2294 |
6 | 6 | authors: [jkczyz] |
7 | | -components: [] |
| 7 | +components: ["offers", "onion messages"] |
8 | 8 | host: dunxen |
9 | 9 | status: upcoming |
10 | 10 | commit: |
11 | 11 | --- |
12 | 12 |
|
13 | 13 | ## Notes |
14 | 14 |
|
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. |
18 | 19 |
|
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`. |
21 | 25 |
|
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 | + └─────┘ └─────┘ |
23 | 39 |
|
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. |
26 | 45 |
|
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? |
28 | 60 |
|
29 | 61 | [onion messages]: https://github.com/lightning/bolts/pull/759 |
30 | 62 | [offers]: https://github.com/lightning/bolts/pull/798 |
31 | 63 | [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