-
Notifications
You must be signed in to change notification settings - Fork 407
Limit maximum CLTV delta during routing. #1234
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
Conversation
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.
This looks great! Some minor comments and could use a test to demonstrate it works (plus fix the tests that are failing), but looks great.
1400077
to
c541e1c
Compare
Basically looking good, needs to be configurable and needs a test for the max-expiry behavior specifically. |
Codecov Report
@@ Coverage Diff @@
## main #1234 +/- ##
==========================================
- Coverage 90.41% 90.41% -0.01%
==========================================
Files 70 70
Lines 38087 38116 +29
==========================================
+ Hits 34437 34463 +26
- Misses 3650 3653 +3
Continue to review full report at Codecov.
|
I now added a simple test against the default value and limit of 0 with 0c93422. |
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.
Looks pretty good so far. Thanks for putting this together!
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. A few super-trivial comments that might as well be addressed when squashing, but I'd let @jkczyz follow up first.
266ddd6
to
6599a32
Compare
Rebased and squashed now, should be ready to merge. |
6599a32
to
b6b3296
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.
One API comment, otherwise ACK
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.
Yeah, looks good module some nits.
b6b3296
to
ebecbdd
Compare
ebecbdd
to
8ea27e5
Compare
ced9bfc
to
f4e57f9
Compare
f4e57f9
to
60b4bb7
Compare
60b4bb7
to
367ed31
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.
ACK 367ed31
This PR attempts to address #996. As this is my first contact with the ~950 lines of
get_route
, I hope that I didn't mess up too much. I also fixed some typos I found while going through the code.Three remarks though:
cltv_expiry_delta
values in the dummy graph data are chosen very high. If all agree that the failures do not come from something else, I could change them to some sane(r)(?) values, even though I'm not entirely sure yet what they would be.MAX_TOTAL_CLTV_DELTA
limit? The value of 1000 seems like a good starting point, however, a decent number of nodes use values that are close enough or higher than that (see attached data I took from a recent graph snapshot). These might be excluded from any payment paths, which could impair connectivity and payment success.MAX_TOTAL_CLTV_DELTA
limit inline. But maybe this parameter should be configurable, i.e., by defining it as part ofRouteParameters
or a newRoutingConfig
inconfig.rs
?