-
Notifications
You must be signed in to change notification settings - Fork 14
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
Augment of query spo-stake-distribution to include the DRep delegation choices of the Pool's rewards accounts #990
Augment of query spo-stake-distribution to include the DRep delegation choices of the Pool's rewards accounts #990
Conversation
@gitmachtl> can you test this PR? (like before, you need https://github.com/IntersectMBO/cardano-api/commits/smelc/legacy-additional-exports/, there is an SRP in this PR). Note that I haven't forgotten about the renaming of the command (for example to Also note that we'll need to wait for @Jimbo4350 to approve this temporary solution until we can update the ledger. |
@gitmachtl> did you have time to try this one? |
@smelc hey, not yet. will do in a bit. thanks for the reminder! helped to sort out some daedalus issues yesterday... |
@smelc this is looking pretty good! cli query and output of non null-delegations ${cardanocli} conway query spo-stake-distribution --all-spos | jq -r "[.[] | select(.[2] != null)] | sort_by(.[0])"
[
[
"1b7a61ba3e5292f34666af3bb2f0b8d36e5001aa41e235709ffa6910",
10407851494044,
"drep-alwaysNoConfidence"
],
[
"3531737ad43673ec059ff03249c3b8d4cfe29fa764d7fd96cc731805",
97467769,
"drep-keyHash-f8bfba212e8bc2e516312121bbd6d95e6f6a330f0b67a95a75758dcc"
],
[
"395933c7b6ca33d1f4a2b22472a6321bc050b166f3f89bb4195f68d5",
47288144,
"drep-alwaysAbstain"
],
[
"3d7418d55574750082424c2d725207ae6f9be4b4987f0b7c5621215c",
10113763361201,
"drep-keyHash-9e43f6190761a51a89e6b1d15933725f47dd16e1d48236b564e7fbeb"
],
[
"3db9daeed3a410cdf1abb08c1647fc36e3f6431f04a0825ae6902799",
11402067383163,
"drep-keyHash-91af2885c7b266848e4a3f34b0b1ab37ec2d5341647eaf149c0f1850"
],
[
"eae7268bbae047d838d95de2d635681df9eb1f122a4798779f3e8918",
10388199558759,
"drep-keyHash-29d399a2ad2f08d4de8b43e15ff5ccc9115af259ae23b84f487ec1c9"
],
[
"f08b6d872f3caa1b4e65cd1e74d51e6ac000e7303ac18c92d0fca1c1",
97469265,
"drep-alwaysNoConfidence"
],
[
"f5fddd5469f8bbedb726227df2c6feaeaaeaf79aa597a1fb7f971af4",
10487629590393,
"drep-keyHash-ff72c7e189bc85b3ac3928fea9248ae1f64feb8bdbc9269b1019dd27"
]
] same via the koios query returns: [
[
"1b7a61ba3e5292f34666af3bb2f0b8d36e5001aa41e235709ffa6910",
10407851494044,
"drep-alwaysNoConfidence"
],
[
"3531737ad43673ec059ff03249c3b8d4cfe29fa764d7fd96cc731805",
97467769,
"drep1ytutlw3p969u9egkxysjrw7km90x763npu9k0226w46cmnq6pkh99"
],
[
"395933c7b6ca33d1f4a2b22472a6321bc050b166f3f89bb4195f68d5",
47288144,
"drep-alwaysAbstain"
],
[
"3d7418d55574750082424c2d725207ae6f9be4b4987f0b7c5621215c",
10113763361201,
"drep1y20y8aseqas62x5fu6cazkfnwf050hgku82gyd44vnnlh6cvc33a9"
],
[
"3db9daeed3a410cdf1abb08c1647fc36e3f6431f04a0825ae6902799",
11402067383163,
"drep1y2g672y9c7exdpywfglnfv934vm7ct2ng9j8atc5ns83s5q88fcpn"
],
[
"eae7268bbae047d838d95de2d635681df9eb1f122a4798779f3e8918",
10388199558759,
"drep1yg5a8xdz45hs34x73dp7zhl4eny3zkhjtxhz8wz0fplvrjgxq08h5"
],
[
"f08b6d872f3caa1b4e65cd1e74d51e6ac000e7303ac18c92d0fca1c1",
97469265,
"drep-alwaysNoConfidence"
],
[
"f5fddd5469f8bbedb726227df2c6feaeaaeaf79aa597a1fb7f971af4",
10487629590393,
"drep1ytlh93lp3x7gtvav8y50a2fy3tslvnlt30dujf5mzqva6fcalc5ps"
]
] I compared them and they are identical, just koios returns the CIP129 drep format. But its the same Hash and same lovelaces. This is looking ok! I also checked about DRep-Script delegations on Mainnet, currently two pools have there rewards account delegated to a DRep-Script: ./cardano-cli conway query spo-stake-distribution --all-spos | jq -r '[.[] | select((.[2] // "") | contains("script"))] | sort_by(.[0])'
[
[
"07ac7dee6c82177096b70ccf21cfb8965c1fb08e079f9ca4af4b2b3e",
20799126055136,
"drep-scriptHash-eb8a7cf53e349af978e81c64ceefcea659a05559b83c384cf938e0ca"
],
[
"28e52e9155c89591201620193eeb8ec53832fd753950e60d9e666993",
1419983575643,
"drep-scriptHash-89c36b1d78bb70ad750ecc33331a6ba73a52159bb76b1d1f162813eb"
]
] I checked both pools via adastat.net and the delegation is correct too. 🎉 Thats awesome 😄 |
53f48d5
to
41641c7
Compare
41641c7
to
b0d8977
Compare
b1c102d
to
12be63c
Compare
1c15552
to
c825523
Compare
4b992b6
to
239b98b
Compare
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.
Looks good to me! I am not completely confident I understand the ledger data structures yet, but I couldn't see any issues.
I am suggesting a few changes that I think would make the code cleaner/simpler
Note
Requires IntersectMBO/cardano-api#708
Changelog
Context
We want to augment
spo-stake-distribution
with extra information (this is #911), which is what we do in this PR. However, we will be able to simplify this PR when using IntersectMBO/cardano-ledger#4735.But @gitmachtl tagged this as important to have before the Christmas vacation, so here is this PR with a more complex implementation until we integrate the ledger.
Fixes #911
How to trust this PR
Try it on sanchonet:
Checklist
An earlier version of this PR (based on
cardano-cli
10.1.0.0
tag) is still available here: https://github.com/IntersectMBO/cardano-cli/commits/smelc/10.0.01-hoops-augment-spo-stake-distribution/