-
Notifications
You must be signed in to change notification settings - Fork 936
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
Fix phase 1 withdrawable and refactor phase 0 withdrawable setting #1066
Conversation
else: | ||
return current_epoch >= validator.exit_epoch + MIN_VALIDATOR_WITHDRAWAL_EPOCHS | ||
validator.withdrawable_epoch = epoch |
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.
If a validator has not responded to all challenges and revealed all keys at the point where they are slashed or request an exit, there is no means by which their withdrawable_epoch
can be updated. This means that an honest validator cannot withdraw as they cannot have revealed all of their custody keys all the way up to their exit epoch, but this is what is required to set their withdrawable_epoch
.
hi @hwwhww. Sorry this has sat so long. Can you handle the merge conflict as I review? |
Part of the reason this has sat so long is my not having resolved what I mentioned in my review comment. Basically I don't think this solves withdrawability for a few reasons:
The problem is that There are 2 ways I can see for solving this, either we introduce a InitiateWithdrawable object that can be sent by an exited validator to become withdrawable or we automate the process and after every challenge response and key-reveal, we check if the validator is exited and try to initiate withdrawable for them. In addition, I think this PR is missing the logic around how long a validator remains exited-but-not-withdrawable as a function of open challenges, resolved challenges and key reveals. |
Issue
After #850,
process_penalties_and_exits
andeligible
helpers are removed and then phase 1 "eligible to exit" logic is broken.Solution
withdrawable_epoch
. This PR extractsinitiate_validator_withdrawable
frominitiate_validator_exit
and makes phase 1 eligible check insideinitiate_validator_withdrawable
. I think it may help Make phase 1 spec executable #1061 be easier?slashed_validator.withdrawable_epoch
would be set twice when executingslash_validator
function (first time: ininitiate_validator_exit
; second time: overwrite inslash_validator
). Now it's only set once.initiate_validator_exit
due to Withdrawal queue -> exit queue #850 logic change?