IntersectMBO / IntersectMBO/cardano-ledger

Ledger state query for number of stake pool delegations

Open
#5,698 0 comments 0 reactions 0 assignees View on GitHub
: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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.