IntersectMBO / IntersectMBO/cardano-ledger
Clarity on ledger state queries
- Dominant language
- Haskell
- Stars
- 295
- Forks
- 179
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 29
Description
Hello there. I am trying to wrap my head around some of the "new" queries that are now available through the state query protocol. New queries aren't as documented as the old ones, so it's a bit hard to figure the exact intent and to know whether they are meant to stay or were perhaps temporary endpoints.
If this question belongs to input-output-hk/cardano-ledger, please bring the right people in 🙏
I am mostly intrigued by the following:
- `GetRewardInfoPools`: seems to be returning pieces used for the reward calculation of pools in the ongoing epoch `e`. In particular, the stake, I assume, refers to the stake that was marked at the beginning of epoch `e - 2`, used for leader schedule in `e - 1` and thus producing rewards in `e`. Same for the pool parameters.
- `GetPoolState`: seems to contain maps of the *current* state of the system w.r.t to pools, deposits & al.
- `GetStakeDelegDeposits`: seems redundant with `GetPoolState` as the latter already contains a map of all deposits indexed by pool id. What's the rationale for having these two queries?
- `GetPoolDistr` & `GetStakeSnapshots`: these two seem somewhat redundant with one another. The `GetStakeSnapshots` is pretty well documented so there isn't much ambiguity. `GetPoolDistr` however says that it contains (relative) stake for a "given epoch". To what stake snapshot are we referring here? Mark, set or go? Would both queries remain as part of the protocol, or is there any intend already to deprecate one of the two?
- `GetStakeDistribution`: sounds like a diminished version of `GetPoolDistr`, since the latter allows for an extra filter (set of pool ids) to, I imagine, restrict the result to those only.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.