Skip to content
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

[governance] add validator onboarding epoch #3804

Closed
wants to merge 1 commit into from

Conversation

emmazzz
Copy link
Contributor

@emmazzz emmazzz commented Aug 5, 2022

This PR adds a validator's onboarding epoch to the validator struct and the epoch reward record, as well as corresponding checks in delegation::can_claim_rewards. This fixes a bug we have that permits a delegator to claim rewards for epoch that they didn't delegate to and also completes the validator removal story for now.

@emmazzz emmazzz requested a review from lxfind August 10, 2022 17:23
@emmazzz emmazzz marked this pull request as ready for review August 10, 2022 17:23
@emmazzz emmazzz requested a review from oxade August 10, 2022 17:23
@@ -160,10 +160,6 @@ module sui::validator_set {
let validator_index = option::extract(&mut validator_index_opt);
let validator = vector::borrow_mut(&mut self.active_validators, validator_index);
validator::request_remove_delegation(validator, delegate_amount);
} else {
// TODO: How do we deal with undelegating from inactive validators?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No special action needed here anymore after the changes in this PR.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 12, 2022
@emmazzz
Copy link
Contributor Author

emmazzz commented Oct 17, 2022

Same functionality implemented in #4187

@emmazzz emmazzz closed this Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant