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

Include min_final_cltv_expiry_delta in blinded paths #694

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Aug 21, 2024

If a payer uses the current block height as the expiry for the payments they send to us, we will reject it because we need to have a few blocks to potentially force-close and get our funds back safely.

With blinded paths, we don't need to rely on payers to add a safety margin: we can directly encode it in the blinded path's total expiry delta.

If a payer uses the current block height as the expiry for the payments
they send to us, we will reject it because we need to have a few blocks
to potentially force-close and get our funds back safely.

With blinded paths, we don't need to rely on payers to add a safety
margin: we can directly encode it in the blinded path's total expiry
delta.
@t-bast t-bast marked this pull request as ready for review August 21, 2024 16:45
@t-bast t-bast requested review from pm47 and thomash-acinq August 21, 2024 16:45
We must use the most restrictive value for `htlc_minimum`, not the
least restrictive one. When we don't have the remote channel update
we should use the value from our node params.

The `htlc_maximum` is allowed to be twice the payment amount according
to the BOLTs: we reflect that in the blinded path data.
@thomash-acinq
Copy link
Member

Should we fail the invoice request if the amount is too low?
#696

@t-bast
Copy link
Member Author

t-bast commented Aug 23, 2024

Should we fail the invoice request if the amount is too low?

I thought about it, this is probably a good idea indeed. I'll integrate it into this PR 👍

We reject invoice requests that specify an amount below our
`htlc_minimum`. It doesn't make sense to attempt that payment,
it won't be relayed by our peer.
@t-bast
Copy link
Member Author

t-bast commented Aug 23, 2024

Should we fail the invoice request if the amount is too low?

Done in 39f2413

@t-bast t-bast merged commit 90cf70b into master Aug 23, 2024
2 checks passed
@t-bast t-bast deleted the blinded-path-min-final-expiry-delta branch August 23, 2024 15:47
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.

2 participants