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

Update initial earliest_exit_epoch calculation & add tests #4001

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

jtraglia
Copy link
Member

@jtraglia jtraglia commented Nov 1, 2024

This came up when discussing an edge case: what is the correct earliest_exit_epoch value given a state where the greatest validator exit epoch is less than the current epoch. For example, given a state with one validator and its exit epoch is 3, current epoch is 100, should earliest_exit_epoch be 4? That doesn't seem right.

I believe it should be at least compute_activation_exit_epoch(get_current_epoch(pre)) + 1. And updated to validator.exit_epoch + 1 if there is a validator with a greater exit epoch.

Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

given the implementation of the exit churn computation post-electra, this PR will have no discernible change

I can see this the intent of upgrade_to_electra so fine with me if we want to be explicit about it

@jtraglia jtraglia merged commit 50f8fa6 into ethereum:dev Nov 4, 2024
26 checks passed
@jtraglia jtraglia deleted the improve-initial-earliest-exit-epoch branch November 4, 2024 21:21
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.

3 participants