-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
zpay32: Change min_final_cltv_expiry_delta. #8308
zpay32: Change min_final_cltv_expiry_delta. #8308
Conversation
We adhere to BOLT 02 and use 18 instead of 9.
Most implementations should accept a higher value, so I don't think the change should cause interop issues. Looks like this change (from 9 to 18) was made 3 years ago: lightning/bolts#785 |
I think we should also make sure to note this in the release notes as well, just to potentially find some edge case during the rc1 process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending a release note, otherwise LGTM🙏
5fe4a45
to
7587445
Compare
Connor kept the value at 9 because of backwards compatibility (lightning/bolts#785 (comment)). But since we have not allowed invoice creation with lower values than 18 blocks since 0.11 I think its a good time to change the values.
|
7b2eadc
to
0afc5a5
Compare
0afc5a5
to
160713e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
@@ -170,6 +170,13 @@ | |||
be switched off using the new `protocol.no-timestamp-query-option` config | |||
option. | |||
|
|||
* [Update min_final_cltv_expiry_delta](https://github.com/lightningnetwork/lnd/pull/8308). | |||
This only effects external invoices which do not supply the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, just noticed a typo while writing the Optech mention for this PR:
This only effects external invoices which do not supply the | |
This only affects external invoices which do not supply the |
We already do not allow a
min_final_cltv_expiry_delta
for invoices lower than 18 and default to 80 when not specified:https://github.com/lightningnetwork/lnd/blob/master/lnrpc/invoicesrpc/addinvoice.go#L364-L380.
Lately during a chat with CDecker we found out that CLN will not always provide a
min_cltv_expiry_delta
in their invoice. In that case we would default to 9 when paying the invoice which hower CLN would reject because the delta is too low for them.So this PR is mostly to smoothen out some interoperability issues between CLN<=>LND
For more infos see: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#cltv_expiry_delta-selection
Hmm looking at https://github.com/lightningnetwork/lnd/blob/master/lncfg/config.go we might analyse all our constants because I think we are still at an old spec level.
For example:
But I think now the value is also at 18:
what do you think ?