-
Notifications
You must be signed in to change notification settings - Fork 271
Add success probabilities in path finding #1942
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
Codecov Report
@@ Coverage Diff @@
## master #1942 +/- ##
==========================================
- Coverage 87.68% 87.65% -0.04%
==========================================
Files 158 158
Lines 12389 12406 +17
Branches 533 515 -18
==========================================
+ Hits 10863 10874 +11
- Misses 1526 1532 +6
|
When you're ready for feedback, can you update the description of this PR with details about how you plan on estimating success probabilities? I think it's worth reviewing the concept before reviewing actual code, to ensure you don't implement something that will be a concept NACK. |
This PR is not ready yet because it depends on #1930 which is still being reviewed. I estimate probabilities in a very simple way based on capacity: I assume that the balance is a random variable uniformly distributed between 0 and capacity and multiply probabilities for all the channels on the path. |
Ok thanks, please update the description with that info, it's important to know! People will be looking at our PRs but they will mostly read the description, not the code, and we don't want them to get the wrong idea on what eclair actually does inside its path-finding. Because based on the title of the PR alone, you could have started to store historic information about failed payments, and that would have been a concept NACK for me. |
f65c332
to
3d62da5
Compare
4397ae5
to
ebb0427
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.
First pass on the general design / future extensibility.
Let me know if it's too vague, and we can discuss it to refine the proposal.
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.
I've also fixed to the hopCost
computation. I was only counting the last hop.
ae55672
to
bf6993f
Compare
Add a new way of scoring paths that estimates the success probabilities of paths and put a cost on failed payment attempts.
For now the success probabilities are estimated in a very simple way based on capacity: I assume that the balance is a random variable uniformly distributed between 0 and capacity and multiply probabilities for all the channels on the path.
The formula for estimating the probability could be changed easily, that's not the focus of this PR. The goal of this PR is to introduce a new scoring of paths that uses this probability and can be evaluated using the new AB testing framework from #1930.