-
Notifications
You must be signed in to change notification settings - Fork 11
LW-13053 Add estimated ROS #1957
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.
Ignore
Allure Report
processReports: ✅ test report for 2199192d
|
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.
Great work! 🚀
5a5aec6
to
9520e73
Compare
9520e73
to
2199192
Compare
|
Checklist
Proposed solution
Since Lace shows the ROS only when showing stake pools details, enriching the
enrichStakePool
function with the ROS estimation is enough to compute the estimated ROS when needed.The ROS computation is based on Shelley ledger specifications (with Conway amendment); the main difference is that ledger specifications uses data from the snapshot on epoch rollovers while here live data is used.
The computation requires some data from the network, the genesis parameter and protocol parameters, so the
StakePoolService
now fetches this data from aNetworkInfoProvider
or BF directly.About the stake pool data, almost all data are already fetched; the only exception is the distinction between member stake and operator stake and BF doesn't offer an API to get it... strictly required to compute the
memberReward
. 😞The first idea was to fetch the controlled stack for each pool owner, but the high number of required HTTP requests discouraged me...
By chances I decided to postpone this problem and to go on... and... in next steps, I found a mathematical trick to compute the ROS without computing the
memberReward
! 💪 🕺Enjoy reading the code for details. 😉
Testing
Manually tested.