Repository navigation
Rework DepositDelegatorRewards to only include VAT paying vote accounts
#686
joncinque
started this conversation in
SIMD Discussions
Replies: 1 comment 2 replies
The |
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.
Problem
SIMD-0123 originally included a new instruction that anyone could call to deposit delegator rewards into a vote account. Lamports deposited with this instruction are included during the block revenue sharing mechanism described in SIMD-0123.
This instruction will be removed as part of the Alpenglow adaptations.
All vote accounts with pending delegator rewards must be swept during the first block of a new epoch, requiring an update to all vote accounts with pending delegator lamports.
It's possible for an attacker to create many vote accounts and deposit small amounts of lamports into them, causing the runtime more work at epoch rollover.
Proposed Solution
Keep the instruction as is, but add one more requirement: the target vote account must have paid VAT for the current epoch.
We can achieve this behavior by passing the
RewardEpochDelegatedStakesaccount, which is updated at every epoch boundary during Alpenglow's reward payout process.The instruction must check that the target vote address is present in the
RewardEpochDelegatedStakesaccount. If it isn't, returnInstructionError::InvalidArgument.Alternatives Considered
Instead, check that the target vote account is present in the leader schedule for the current epoch.
This option, however, requires having the leader schedule in the runtime, which requires more extensive plumbing for both Agave and Firedancer.
Also, since SIMD-0123 uses VAT payment as a required criterion for block reward distribution, it's more consistent to also gate the
DepositDelegatorRewardsinstruction on VAT payment.cc @0x0ece @topointon-jump @buffalojoec
All reactions