Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLT12 sending doesn't allow to override {Route,Payment}Parameters #3262

Open
tnull opened this issue Aug 21, 2024 · 1 comment
Open

BOLT12 sending doesn't allow to override {Route,Payment}Parameters #3262

tnull opened this issue Aug 21, 2024 · 1 comment
Labels
Take a Friday Leave a Friday Stomp the Bugs, Without Much Commitment
Milestone

Comments

@tnull
Copy link
Contributor

tnull commented Aug 21, 2024

For BOLT11 we allow to set RouteParameters as an argument to send_payment. However, pay_for_offer only allows to set max_total_routing_fee_msat, but not other routing-related fields such as max_total_cltv_expiry_delta, max_path_count, max_channel_saturation_power_of_half.

I'm a bit dubious if pay_for_offer and paying for refunds should be parametrized by RouteParameters, PaymentParameters, or the relevant fields independently, but we should provide a way to set them for BOLT12 payments, too.

@TheBlueMatt
Copy link
Collaborator

Right, so the {Route,Payment}Parameters abstractions don't make any sense in a BOLT 12 world. They also don't really make sense in a BOLT 11 world if we pass a Bolt11Invoice directly to ChannelManager (which we should do now that lightning depends on lightning-invoice).

So I think this tees us up for a nice patchset - define some new struct which captures the options you describe, pass it to pay_for_offer and use that + the BOLT 12 invoice to build an initial RouteParameters, then do the same on the BOLT 11 side - drop lightning::ln::bolt11_payment and replace it with a Channelmanager method that does the same thing as the BOLT 12 path, just with BOLT 11 and the new parameters struct.

@TheBlueMatt TheBlueMatt added the Take a Friday Leave a Friday Stomp the Bugs, Without Much Commitment label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Take a Friday Leave a Friday Stomp the Bugs, Without Much Commitment
Projects
None yet
Development

No branches or pull requests

2 participants