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-7251: process_registry_updates #14005

Merged
merged 8 commits into from
Jun 29, 2024
Merged

Conversation

prestonvanloon
Copy link
Member

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Required for Electra.

Extracted from #13903.

Which issues(s) does this PR fix?

Tracking @ #13849

Other notes for review

@prestonvanloon prestonvanloon added the Electra electra hardfork label May 16, 2024
@prestonvanloon
Copy link
Member Author

Working on fixing this up. Just needs more unit tests (spectests are passing)

@prestonvanloon prestonvanloon force-pushed the eip-7251-registry_updates branch 6 times, most recently from c4eda0b to 8fa05b7 Compare June 18, 2024 01:33
@prestonvanloon prestonvanloon marked this pull request as ready for review June 18, 2024 01:33
@prestonvanloon prestonvanloon requested a review from a team as a code owner June 18, 2024 01:33
james-prysm
james-prysm previously approved these changes Jun 18, 2024
Copy link
Contributor

@james-prysm james-prysm left a comment

Choose a reason for hiding this comment

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

lgtm

saolyn
saolyn previously approved these changes Jun 18, 2024
currentEpoch := time.CurrentEpoch(state)
ejectionBal := params.BeaconConfig().EjectionBalance
activationEpoch := helpers.ActivationExitEpoch(currentEpoch)
vals := state.Validators()
Copy link
Member

Choose a reason for hiding this comment

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

state.Validators() copies the entire validator set and this is very expensive given the current validator set size.
Have you thought about using ValidatorsReadOnly or ReadFromEveryValidator

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. I'll do something about this

Copy link
Member Author

Choose a reason for hiding this comment

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

This is done now. Using the same design as #14130

@prestonvanloon
Copy link
Member Author

Design in #14130 was approved. I'll update this PR today to adopt that design.

terencechain
terencechain previously approved these changes Jun 28, 2024
terencechain
terencechain previously approved these changes Jun 28, 2024
@prestonvanloon prestonvanloon added this pull request to the merge queue Jun 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 28, 2024
@prestonvanloon prestonvanloon added this pull request to the merge queue Jun 29, 2024
Merged via the queue into develop with commit 041e81a Jun 29, 2024
17 checks passed
@prestonvanloon prestonvanloon deleted the eip-7251-registry_updates branch June 29, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants