-
Notifications
You must be signed in to change notification settings - Fork 741
defer delegatee rewards until end of validator staking period #1262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending verification with the manual tests.
@@ -25,7 +25,7 @@ import ( | |||
// for the primary network | |||
func TestAdvanceTimeTxUpdatePrimaryNetworkStakers(t *testing.T) { | |||
require := require.New(t) | |||
env := newEnvironment( /*postBanff*/ false) | |||
env := newEnvironment(false /*=postBanff*/, false /*=postCortina*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, we are going to change these tests to be postCortina one Cortina activates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a lot of these tests should be re-vamped. This test is still running pre-Banff...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just minor questions, lgtm
…bs/avalanchego into delegatee-reward-tracking-support
Why this should be merged
Delegatee rewards are often dust amounts which pollute the P-Chain state unnecessarily and make it hard for the validator to spend (case in point: https://explorer-xp.avax.network/tx/3x5sF5zXBto8CHMDR9mFXt5NegymfFpmUxdNTs9TKpPC8TR6a). This PR modifies the delegatee logic so that we consolidate all the delegatee rewards into a single reward utxo distributed at the end of the validator staking period.
How this works
In Cortina, we only provide the validator their delegatee rewards at the end of their validation period. It is awarded in a separate UTXO (first reward utxo is the validation reward, second reward utxo is the total accrued delegatee rewards).
How this was tested