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

Increase default max-cltv value #2677

Merged
merged 2 commits into from
Jun 2, 2023
Merged

Increase default max-cltv value #2677

merged 2 commits into from
Jun 2, 2023

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented May 26, 2023

LND and CLN already use 2016 blocks. The network is generally raising the values of cltv_expiry_delta to account for high on-chain fees, so we'll need to allow longer maximum deltas to avoid rejecting payments.

LND and CLN already use 2016 blocks. The network is generally raising the
values of `cltv_expiry_delta` to account for high on-chain fees, so we'll
need to allow longer maximum deltas to avoid rejecting payments.
@t-bast t-bast requested review from pm47 and thomash-acinq May 26, 2023 07:12
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2023

Codecov Report

Merging #2677 (9a3bb87) into master (e7b4631) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #2677      +/-   ##
==========================================
- Coverage   85.88%   85.87%   -0.01%     
==========================================
  Files         214      214              
  Lines       17591    17590       -1     
  Branches      728      734       +6     
==========================================
- Hits        15108    15106       -2     
- Misses       2483     2484       +1     
Impacted Files Coverage Δ
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 93.64% <100.00%> (+0.02%) ⬆️
...in/scala/fr/acinq/eclair/channel/Commitments.scala 96.75% <100.00%> (ø)
...c/main/scala/fr/acinq/eclair/channel/Helpers.scala 95.03% <100.00%> (ø)
...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala 86.05% <100.00%> (+0.22%) ⬆️
...cala/fr/acinq/eclair/router/RouteCalculation.scala 95.83% <100.00%> (ø)

... and 4 files with indirect coverage changes

thomash-acinq
thomash-acinq previously approved these changes May 26, 2023
Copy link
Member

@pm47 pm47 left a comment

Choose a reason for hiding this comment

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

I don't think that can work without also updating the value below as well:

val MAX_CLTV_EXPIRY_DELTA: CltvExpiryDelta = CltvExpiryDelta(7 * 144) // one week

@thomash-acinq
Copy link
Member

It's a problem that we have so many constants defined in so many different places. Should MAX_CLTV_EXPIRY_DELTA be read from nodeParams instead of being a constant hidden in the code? And is DEFAULT_ROUTE_MAX_CLTV really needed?

@t-bast
Copy link
Member Author

t-bast commented May 26, 2023

Good points, I cleaned up the constants in Channel.scala.

I'm not sure what to do with DEFAULT_ROUTE_MAX_CLTV in the Router: if we want to re-use the channel's maxExpiryDelta we need to provide the ChannelConf to path-finding which is weird...

Copy link
Member

@pm47 pm47 left a comment

Choose a reason for hiding this comment

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

The change LGTM, but I need to look at it a 2nd time after the week-end to be sure...

And is DEFAULT_ROUTE_MAX_CLTV really needed?

I think yes, in the context of trampoline.

@t-bast t-bast merged commit ef277f0 into master Jun 2, 2023
1 check passed
@t-bast t-bast deleted the increase-max-cltv branch June 2, 2023 11:56
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.

None yet

4 participants