-
Notifications
You must be signed in to change notification settings - Fork 214
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
Exclude retired pools from the ListStakePools
API function result.
#1945
Conversation
f96af60
to
a983133
Compare
Add reminders to use more efficient database queries when generating the complete list of non-retired pools. See: https://jira.iohk.io/projects/ADP/issues/ADP-383
Generated by following the instructions here: https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/node_keys.html The pool id appears to be arbitrary.
Unfortunately, Haddock doesn't support documentation comments here. So we make these comments into ordinary Haskell comments.
a983133
to
8063cf6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
There is one problem I think. Playing around with the CI cluster I've observed that the pool scheduled to be retired in epoch n
is still visible through the whole epoch n
and disappears from the list in epoch n+1
. While it is visible one can still join it but gets:
{"code":"no_such_pool"
,"message":"I couldn't find any stake pool with the given id: b45768c1a2da4bd13ebcaa1ea51408eda31dcc21765ccbd407cda9f2"}
I guess pool retired to be scheduled in n
should not be shown from n
onwards...
lib/core-integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs
Show resolved
Hide resolved
Nice catch! I think I've found the source of this here: https://github.com/input-output-hk/cardano-wallet/pull/1945/files#r460378458 I'll post a patch shortly. EDIT: fixed in 6ec42fb |
In response to review feedback: https://github.com/input-output-hk/cardano-wallet/pull/1945/files#r460378458
ListStakePools
API operation.
ListStakePools
API operation.ListStakePools
API function result.
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!
Corner case that may be considered in future PR/story:
- pool A schedule to retire in
n
- wallet joins A in
n-1
(shows as delegation next:n + 1
, target: A) - pool disappears from the list in
n
(wallet still shows as delegation next:n + 1
, target: A) - since
n + 1
wallet shows as delegation active, target: A
This comment has been minimized.
This comment has been minimized.
I agree we should definitely discuss what we want the I've opened the following ticket to capture this discussion: #1949. |
Build succeeded |
Issue Number
#1937
Overview
This PR:
ListStakePools
API operation that excludes all pools with a retirement epoch earlier than or equal to the current epoch.ListStakePools
.Future Improvements
The current pool tracking implementation (which predates this PR) has two potential areas for improvement:
See: https://jira.iohk.io/browse/ADP-383
See: https://jira.iohk.io/browse/ADP-376
These are not tackled in this PR, but are instead recorded in the above tickets, so that we may schedule time to fix them at a later date.