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

skip eth1data voting after electra #14835

Merged
merged 15 commits into from
Jan 31, 2025
Merged

skip eth1data voting after electra #14835

merged 15 commits into from
Jan 31, 2025

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Jan 28, 2025

What type of PR is this?

Feature

What does this PR do? Why is it needed?

https://eips.ethereum.org/EIPS/eip-6110
mentions the following

Eth1Data poll deprecation
Consensus layer clients will be able to remove Eth1Data poll mechanism in an uncoordinated fashion once transition period is finished. The transition period is considered as finished when a network reaches the point where state.eth1_deposit_index == state.deposit_requests_start_index.

Eth 1 voting should stop post electra and the eth1 transition period. This PR adds a check that has already been added in deposit packing by @syjn99 in #14697

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

@james-prysm james-prysm added the Electra electra hardfork label Jan 28, 2025
@james-prysm james-prysm marked this pull request as ready for review January 28, 2025 22:13
@james-prysm james-prysm requested a review from a team as a code owner January 28, 2025 22:13
@james-prysm james-prysm requested review from kasey, nalepae, saolyn, nisdas, terencechain and prestonvanloon and removed request for nalepae and saolyn January 28, 2025 22:13
}

// Should not happen, but if the canonicalEth1Data is nil
// default to legacy
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this fine?

Copy link
Member

Choose a reason for hiding this comment

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

This should be impossible, I don't think this is the right approach

Copy link
Contributor

@syjn99 syjn99 left a comment

Choose a reason for hiding this comment

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

Thanks for legacy.go! I've also considered to move the function into common util while working on #14829.

Comment on lines 40 to 44
// post eth1 deposits, the Eth 1 data will then be frozen
if !helpers.IsLegacyDepositProcessPeriod(beaconState, vs.HeadFetcher.HeadETH1Data()) {
return vs.HeadFetcher.HeadETH1Data(), nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

First, I'm not quite sure that eth1_data will be frozen after the transition period, as it's up to each client team how to handle Eth1 polling after Electra.
Second, if we decided to freeze eth1_data, isn't it fine to simply fetch from beaconState, like beaconState.Eth1Data()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thats's a good point should just do it from beacon state. there is an update to the spec here
ethereum/consensus-specs#4106

Copy link
Contributor

Choose a reason for hiding this comment

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

DepositRequestHaveStarted seems much better to read, and more aligned with the latest spec. I will use this for my work also!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i should rename to Requests oops

}

//canonicalEth1Data should never be nil
eth1DepositIndexLimit := math.Min(canonicalEth1Data.DepositCount, requestsStartIndex)
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

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

LGTM

@james-prysm james-prysm added this pull request to the merge queue Jan 31, 2025
Merged via the queue into develop with commit d887536 Jan 31, 2025
17 checks passed
@james-prysm james-prysm deleted the electra-eth1voting branch January 31, 2025 15:51
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.

3 participants