-
Notifications
You must be signed in to change notification settings - Fork 385
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
Add the ability to fetch a probability from live liquidity bounds #3420
Add the ability to fetch a probability from live liquidity bounds #3420
Conversation
Also pushed a new method which I actually need for the simulator. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3420 +/- ##
==========================================
+ Coverage 89.61% 90.41% +0.80%
==========================================
Files 129 130 +1
Lines 105506 113457 +7951
Branches 105506 113457 +7951
==========================================
+ Hits 94544 102585 +8041
+ Misses 8208 8150 -58
+ Partials 2754 2722 -32 ☔ View full report in Codecov by Sentry. |
Tagging 0.1 just because I want this for the sim replay and don't want to rely on a branch there. |
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. Feel free to squash.
We already expose the estimated success probability from the historical liquidity bounds from `historical_estimated_payment_success_probability`, but we don't do that for the live liquidity bounds. Here we add a `live_estimated_payment_success_probability` which exposes the probability result from the live liquidity bounds as well.
`historical_estimated_payment_success_probability` exposes the historical success probability estimator publicly, but only allows fetching data from channels where we have sufficient information. In the previous commit, `live_estimated_payment_success_probability` was added to enable querying the live bounds success probability estimator. Sadly, while the historical success probability estimator falls back to the live probability estimator, it does so with a different final parameter to `success_probability`, making `live_estimated_payment_success_probability` not useful for calculating the actual historical model output when we have insufficient data. Instead, here, we add a new parameter to `historical_estimated_payment_success_probability` which determines whether it will return fallback data from the live model instead.
0b39756
to
d3efe5c
Compare
Squashed without further changes. |
Just landing this. Its a new public method that, if its wrong, just means peoples' stats will be wrong. Its not actually used when sending payments. Its also trivial. |
We already expose the estimated success probability from the historical liquidity bounds from
historical_estimated_payment_success_probability
, but we don't do that for the live liquidity bounds.Here we add a
live_estimated_payment_success_probability
which exposes the probability result from the live liquidity bounds as well.