-
Notifications
You must be signed in to change notification settings - Fork 720
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
stake-snapshot and pool-params query commands #2536
Conversation
I believe we need |
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.
Right overall direction but some things need to be addressed.
Current output:
Requested output:
|
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 still some unnecessary diff in this PR that needs to be sorted out before I review the rest.
, "value" .= toJSON val | ||
] | ||
object | ||
[ "address" .= serialiseToBech32 addr |
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.
Unnecessary diff here and in other places.
Closing this in favor of #2560 because no one else has. |
This PR provides two new query commands that should be useful to SPOs who are using the CNCLI set of tools, for example (as well as for internal IOG purposes):
cardano-cli query stake-snapshot --stake-pool-id <poolid>
cardano-cli query pool-params --stake-pool-id <poolid>
These commands allow users to access two pieces of information from the ledger state
The stake snapshot returns information about mark, set, go snapshots for a pool, plus the current total stake that can be used in a 'sigma' calculation:
The pool parameters return three pieces of information: current parameters, future parameters and retiring information. They may be
null
if eg the parameters are not changing.The main advantage over using
query ledger-state
is that these commands avoid the need to dump the full ledger state (time consuming and memory intensive - meaning they reduce the total system demands for SPOs), and will make it easier to support CNCLI and other tools. They also use existing internal operations (such as the ledger pool stake calculation), meaning that the information is guaranteed to be identical to that which the ledger is using (and without having to write scripts to extract/correlate the information).I have decided to put these under 'query' rather than 'pool' since they are extracting info from the ledger state.