-
Notifications
You must be signed in to change notification settings - Fork 16
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
Convenience flag to query stake distribution with drep-state
query
#557
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.
LGTM but one comment
looks like the current command defaults to also, the generated output does not contain the keyhash anymore. looks like: [
{
"anchor": {
"dataHash": "1111111111111111111111111111111111111111111111111111111111111111",
"url": "https://bit.ly/3zCH2HL"
},
"deposit": 2000000,
"expiry": 188,
"stake": null
},
{
"anchor": null,
"deposit": 2000000,
"expiry": 230,
"stake": null
},
{
"anchor": null,
"deposit": 2000000,
"expiry": 216,
"stake": null
},
{
"anchor": {
"dataHash": "f8f21b94aef91b0d5e7ff330889d60f665529897b5c1ae4a1aa608b6249e20e6",
"url": "https://github.com/Mborongoma/SANCH-GOV-TESTES/blob/main/bio.txt"
},
"deposit": 2000000,
"expiry": 227,
"stake": null
},
{
"anchor": {
"dataHash": "fd1b4e7fd844a8e2805bfda173f6461fd59812fcad4ce8a69b5ab427f7226cf7",
"url": "https://my-ip.at/test/hwdrep.json"
},
"deposit": 2000000,
"expiry": 232,
"stake": null
}
] |
Well spotted, @gitmachtl! The flag is actually off by default, in the sense that the query isn't performed, but the output includes the |
thx! and the keyHash is missing in the output too for some reason. |
dcb4d68
to
f11dd55
Compare
Fixed in 9bd912b. Thanks for the reminder 🙇 |
9bd912b
to
a9656ef
Compare
hi, any plans to merge this into main soon? thx. |
a9656ef
to
6b49db7
Compare
, "anchor" .= (ds ^. Ledger.drepAnchorL) | ||
, "deposit" .= (ds ^. Ledger.drepDepositL) | ||
] | ||
drepStateToJson stakeDistr (cred, ds) = (cred,) . A.object $ |
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.
This is fine for now but we should convert this into a ToJSON
instance.
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.
Follow-up issue created: #606
5df595d
to
3f44c29
Compare
Changelog
Context
This PR closes #551.
I introduce an overlap between the
drep-state
anddrep-stake-distribution
queries. With the--include-stake
flag, the former now subsumes the latter. AFAICT, the queries are exposed separately becausedrep-stake-distribution
is expensive. This makes obtaining all information associated with a DRep credential a two-command process. With the new flag, the expensive query is still guarded, but the CLI gets more user-friendly.How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist