-
Notifications
You must be signed in to change notification settings - Fork 401
Log which hop in a path was the most limiting in capacity #3729
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
base: main
Are you sure you want to change the base?
Log which hop in a path was the most limiting in capacity #3729
Conversation
This bug was recently surfaced to us by a user who wrote a test where the sender is attempting to route an MPP payment split across the two channels that it has with its LSP, where the LSP has a single large channel to the recipient. Previously this led to a pathfinding failure because our router was not sending the maximum possible value over the first MPP path it found due to overestimating the fees needed to cover the following hops. Because the path that had just been found was not maxxed out, our router assumed that we had already found enough paths to cover the full payment amount and that we were finding additional paths for the purpose of redundant path selection. This caused the router to mark the recipient's only channel as exhausted, with the intention of choosing more unique paths in future iterations. In reality, this ended up with the recipient's only channel being disabled and subsequently failing to find a route entirely. Update the router to fully utilize the capacity of any paths it finds in this situation, preventing the "redundant path selection" behavior from kicking in.
I've assigned @valentinewallace as a reviewer! |
1ff1208
to
2d41456
Compare
🔔 1st Reminder Hey @valentinewallace! This PR has been waiting for your review. |
Its generally rather difficult to debug the pathfinding logic from a log, and sadly because we cannot feasibly log each step in a pathfinding search there's relatively few options we have for improving this. However, one specific question we occasionally get is "why did the pathfinder decide to use MPP"? While we similarly cannot practically log every possible path the pathfinder could have taken to explain why a specific path which required MPP was taken, we can at least explain which hop in the path was the most limited, which we do here.
2d41456
to
056d5da
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. I assume we'll want to land #3707 first
Its generally rather difficult to debug the pathfinding logic from
a log, and sadly because we cannot feasibly log each step in a
pathfinding search there's relatively few options we have for
improving this.
However, one specific question we occasionally get is "why did the
pathfinder decide to use MPP"? While we similarly cannot
practically log every possible path the pathfinder could have taken
to explain why a specific path which required MPP was taken, we can
at least explain which hop in the path was the most limited, which
we do here.
Based on #3707