IntersectMBO / IntersectMBO/cardano-ledger
Ledger state query for number of stake pool delegations
Open
:cake: good first issue
enhancement
- Dominant language
- Haskell
- Stars
- 295
- Forks
- 179
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 29
Description
Introduce a ledger state query that answers how many total delegators to stake pools there is:
```haskell
data WhichSnapShot
= CurrentState
-- ^ Not from any particular SnapShot, but form current Ledger State instead
| MarkSnapShot
| SetSnapShot
| GoSnapShot
queryNumStakePoolDelegators ::
NewEpochState era ->
WhichSnapShot ->
Set (KeyHash StakePool) ->
-- ^ Filter which stake pools this query should return the count for. Empty argument will include all registered stake pools
Int
```
This query will use `numDelegators` field instead of iterating over accounts
Contributor guide
Assessment
This issue has not been assessed yet.