Support Paged Reward Payouts
Closed this issue · 0 comments
We will soon have paged rewards once paritytech/polkadot-sdk#1189 makes it to the runtime upgrade. Creating this ticket to add support for this.
Changes are not reflected in rust docs yet but linking to the documentation and relevant structs in the code.
Changes:
3 new Storage items:
- ErasStakersOverview (doc and value struct)
- ErasStakersPaged (doc and value struct)
- ClaimedRewards (doc)
Following storage items are deprecated.
(Note: Once these changes are in a runtime, all the new era exposure will go to new storage items above while the following storage items will still keep historical era information (looking to make this info easy to get via a runtime api). In 84 eras after the release, all these storage items will be empty and can be removed from runtime code.)
- ErasStakers
- ErasStakersClipped
- Ledger::claimed_rewards (not called legacy_claimed_rewards in the runtime code)
Extrinsics to payout rewards:
payout_stakers: can be called multiple times for an era and validator stash, paying out one page of exposure at a time.
payout_stakers_by_page: can be used to payout rewards for a particular page of exposure.
Feel free to add any useful runtime api requests to issue#426 to help with this.