Skip to content

BOLT 12: feature to allow requests of a bolt11 invoice. - #1336

Open
rustyrussell wants to merge 2 commits into
lightning:masterfrom
rustyrussell:fetch-bolt11
Open

BOLT 12: feature to allow requests of a bolt11 invoice.#1336
rustyrussell wants to merge 2 commits into
lightning:masterfrom
rustyrussell:fetch-bolt11

Conversation

@rustyrussell

Copy link
Copy Markdown
Collaborator

This would allow a bridge to create a LNURL adapter for a BIP353. for simple offers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Comment thread 04-onion-routing.md Outdated
70 is taken by lightning#1149

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Comment thread 09-features.md
[bolt04-mpp]: 04-onion-routing.md#basic-multi-part-payments
[bolt04-route-blinding]: 04-onion-routing.md#route-blinding
[bolt04-attributable-errors]: 04-onion-routing.md
[bolt12-bolt11-req]: 12-offer-encoding.md#requrements-for-invoice-requests

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
[bolt12-bolt11-req]: 12-offer-encoding.md#requrements-for-invoice-requests
[bolt12-bolt11-req]: 12-offer-encoding.md#requirements-for-invoice-requests

Comment thread 12-offer-encoding.md

The requirement to use `offer_paths` if present, ensures a node does not reveal it is the source of an offer if it is asked directly. Similarly, the requirement that the correct path is used for the offer ensures that cannot be made to reveal that it is the same node that created some other offer.

The `option_bolt11_request` field allows a backwards-compatible mechanism for simple offers, to simplify transition.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we missed the part to bind the bolt11 invoice. For a bolt12 invoice there's a cryptographic binding, but for bolt11 invoice there is no proof that it is coming from the offer? Like the payer cannot prove it corresponds to the exact request or offer version.

Comment thread 12-offer-encoding.md
- MUST set `invreq_quantity` less than or equal to `offer_quantity_max`.
- otherwise:
- MUST NOT set `invreq_quantity`
- if `offer_features` contains `option_bolt11_request`:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess these if-else's are a bit difficult to follow😂

Given that, when the offer has offer_quantity_max, the writer (payer) must set invreq_quantity, and may set invreq_bolt11 when option_bolt11_request is found in the offer_features, the payer is allowed to include these in a single request,

  • invreq_bolt11
  • invreq_quantity

which will be rejected by the reader. So we need to add a writer rule: if offer_quantity_max is present, the writer MUST NOT set invreq_bolt11.

@vincenzopalazzo

Copy link
Copy Markdown
Contributor

Mh, I do not recall the main reason why this is considered sanity? Could you please help me to understand what the workflow of LNURL is that will require using bolt12 to fetch a bolt11 invoice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants