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

EIP-6914: Update the equivocating indices in the fork-choice store #3446

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

ppopth
Copy link
Member

@ppopth ppopth commented Jul 11, 2023

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.

Since we sometimes reuse the slashed validator index, we need to remove
it from the list of equivocating indices in the fork-choice store.
@ppopth ppopth force-pushed the on-reused-index branch from 233f194 to 3ed0619 Compare July 11, 2023 14:49
Copy link
Contributor

@djrtwo djrtwo left a 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
Copy link
Contributor

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.

Suggested change
- `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).

Copy link
Collaborator

@dapplion dapplion left a 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!

@djrtwo djrtwo merged commit 726b453 into ethereum:dev Jul 24, 2023
@ppopth ppopth deleted the on-reused-index branch July 25, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants