SIMD-0015
Partitioned Epoch Rewards Distribution
TL;DR
A new way to distribute epoch rewards across multiple blocks is proposed to address the current performance problems associated with epoch reward distribution in a first block of a new epoch.
Summary
A new way to distribute epoch rewards across multiple blocks is proposed to address the current performance problems associated with epoch reward distribution in a first block of a new epoch.
Motivation
The distribution of epoch rewards at the start block of an epoch becomes a significant bottleneck due to the rising number of stake accounts and voting nodes on the network. To address this bottleneck, we propose a new approach for distributing the epoch rewards over multiple blocks.
Key Changes
- rewards calculation: calculate the epoch rewards for all active stake accounts
- rewards distribution: distribute the epoch rewards for the active stake accounts
- rewards calculation phase - during which the epoch rewards for all activate stake accounts are computed and distribution chunks are scheduled.
- rewards distribution phase - during which the calculated epoch rewards for the active stake accounts are distributed.
Impact
There are the two main impacts of the changes to stake accounts during the epoch rewarding phase. The first impact is that stake accounts will see their rewards being credited a few blocks later in the epoch than before. The second impact is that users will not be able to update their stakes during the epoch reward phases, and will have to wait until the end of the epoch reward period to make any changes. Nonetheless, the overall amount of time that the user must wait before receiving and updating their stake rewards should be roughly equivalent to what they are now experiencing on the current mainnet beta, since the prolonged first block time at the epoch boundary effectively obstructs the user's access to those stake accounts during that time. Another advantage with the new approach is that all non-staking transactions will continue to be processed, while those transactions are blocked on mainnet beta today.
Backwards Compatibility
This is a breaking change. The new epoch calculation and distribution approach will not be compatible with the old approach.
Security Considerations
While the proposed new approach does impact and modify various components of the validators, it does not alter the economics of the reward system. If all the changes are implemented correctly and tested fully, there are no security issues.