-
Notifications
You must be signed in to change notification settings - Fork 996
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
EIP-6914: Update the equivocating indices in the fork-choice store #3446
Conversation
Since we sometimes reuse the slashed validator index, we need to remove it from the list of equivocating indices in the fork-choice store.
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.
really nice catch!
I want to try to be more specific about when this is called, see below
|
||
A new handler is added with this upgrade: | ||
|
||
- `on_reused_index(store, index)` whenever a validator index `index: ValidatorIndex` is reused |
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.
This is a bit wordy, but I'd like to provide a more specific clarification of what this means.
- `on_reused_index(store, index)` whenever a validator index `index: ValidatorIndex` is reused | |
- `on_reused_index(store, index)` whenever a validator index `index: ValidatorIndex` is reused. That is [`get_index_for_new_validator()`](./beacon-chain.md#get_index_for_new_validator) provides an index due a return value of `True` from [`is_reusable_validator()`](./beacon-chain.md#is_reusable_validator). |
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.
Looks good, thank you!
Since, in EIP-6914, we sometimes reuse the slashed validator index, we need to remove it from the list of equivocating indices in the fork-choice store.
See #3335 (comment) for discussion. Thank @dapplion for the solution.