Repository navigation
Align Rewards with Rewarded Epoch #717
joncinque
started this conversation in
SIMD Discussions
Replies: 3 comments 6 replies
|
A couple small clarifications regarding problem statement:
I think it would be good to get into how the necessary data gets persisted in this discussion. Half-implementing a PoC could be informative here |
2 replies
|
agree with the motivation and effort, as brennan mentioned would be nice to layout what extra fields need to be stored to accomplish this. Perhaps having #511 would also give us what we need without any additional information? |
2 replies
Are you referring to https://github.com/anza-xyz/agave/blob/6cd331bf6fd0e92c59e847a3aefaac16ff7b7eda/runtime/src/block_component_processor/vote_reward/epoch_inflation_account_state.rs#L18? If yes, then that makes sense. Just clarifying. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
Under partitioned epoch rewards, inflation rewards for an epoch E are paid out during the following epoch E + 1. Validators receive rewards for voting over the course of E. If a validator stops voting, they no longer receive rewards.
Alpenglow's VAT system signals that a validator is participating in consensus during an epoch. Validators that pay VAT are thus considered to be active voters that should receive inflation rewards for voting.
The current reward implementation, however, requires validators to pay the VAT in the leader schedule epoch AND the distribution epoch in order to receive inflation rewards. Meaning they must pay in epoch E - 1 and E + 1 in order to receive rewards for work done in epoch E.
Put conversely, if a validator doesn't pay the VAT in the distribution epoch (E + 1), they and their stakers don't receive inflation rewards for work already done during the rewarded epoch (E).
A validator might not pay the VAT for any reason, such as forgetting to top up a vote account, winding down operations, or just not being part of the top 2k validators by stakes. Either way, the validator and its delegators should receive rewards for work performed.
Proposed Solution
Consider the validator set from the rewarded epoch when calculating and paying rewards.
There are many ways to achieve this new behavior, but I would recommend repurposing the
RewardEpochDelegatedStakesfrom Alpenglow to include all data needed for rewards computation. The exact pieces of data needed will likely come out during implementation, so I will not list them out here.(Edit as requested)
For each VAT validator in the rewarded epoch, in lexicographic order of the vote account address, store the following:
[u8; 32]: vote account addressu64: stake at the end of reward epochu64: latest credits / lamportsu64: pending delegator rewardsu16: inflation commission (with all of the fallbacks)[u8; 6]: padding, must be all 0Of those fields, we can get the inflation commission from the appropriate earlier epoch stakes account, and that's it. Everything else needs to be fetched from values at the end of the epoch, which are not available from the epoch stakes account. Since it's just one field, I would lean towards storing it in the reward epoch account.
cc @AshwinSekar @akhi3030 @topointon-jump @0x0ece
All reactions