-
Notifications
You must be signed in to change notification settings - Fork 376
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
Comments
Right, so the So I think this tees us up for a nice patchset - define some new struct which captures the options you describe, pass it to |
Giving this a shot! 🚀 |
It this issue include two separate PRs @TheBlueMatt ? The first is adding some kind of structure (Probably with @shaavan did in #3342 (review)) for the BOLT 12 world that includes the parameters needed by @tnull Then, add a method inside the Not sure what you mean by dropping |
Hey @vincenzopalazzo! From what I understand, the {bolt11, bolt12} invoice contains the Since Now, if we tweak the bolt11's Given that @TheBlueMatt, does this sound right to you? Thanks so much! |
That's how I was thinking of it, yea.
Right.
Once we have
Almost, but its still kinda a mix. The old PaymentParameters/RouteParameters distinction was/is "RouteParameters are the params for picking an individual route, PaymentParameters are the ones that apply to all route-finding session for a payment across retries". Thus, you can convert a BOLT 11/12 invoice plus some additional options into a With Fields like |
Thank you so much for the detailed explanation! That really clears things up. In the current approach I implemented in #3342, I've kept the However, now I think shifting to a I really appreciate the guidance—thanks again! |
@TheBlueMatt Currently, we serialize |
Hmm, I'm not sure I understand the motivation for that. The way I was thinking about it is that we'd continue to keep the I thought #3342 made sense - the high-level interface is "parameters + BOLT 11 invoice/BOLT 12 offer" which then (basically, even if not actually) calls the low-level interface which just takes a |
Hey @TheBlueMatt, First off, thank you for the pointers and for helping me get a clearer understanding of the approach. My initial thought behind suggesting a shift to a UserRouteParams / InvoiceRouteParams distinction was to streamline things by merging the two-level distinction (UserParams / Params from Invoice at a higher level and RouteParams / PaymentParams at a lower level) into a single, cohesive abstraction. The idea was to make the way we pass UserParams or Params from Invoice align directly with how they're used. However, after diving deeper and working through it hands-on, I began to see some conceptual gaps with this single abstraction approach. As you pointed out:
I now see how this distinction really does make sense, given our current code structure. So, even if the two-level approach isn’t the most minimalistic, it does seem to be the more accurate one conceptually. Thanks again for your valuable feedback and for guiding me to view this from the right angle. I’ll go ahead and continue building on #3342! |
For BOLT11 we allow to set
RouteParameters
as an argument tosend_payment
. However,pay_for_offer
only allows to setmax_total_routing_fee_msat
, but not other routing-related fields such asmax_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 byRouteParameters
,PaymentParameters
, or the relevant fields independently, but we should provide a way to set them for BOLT12 payments, too.The text was updated successfully, but these errors were encountered: