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

Electra core transition operations #14001

Merged
merged 13 commits into from
May 23, 2024
Merged

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented May 15, 2024

What type of PR is this?
Feature

What does this PR do? Why is it needed?

taken from the electra-devnet0 branch, and adds some place holders for Electra core transition. subsequent PRs will address the contents of the processing as well as add tests

spec changes can be found https://github.com/ethereum/consensus-specs/tree/dev/specs/electra

Which issues(s) does this PR fix?

Fixes #

Other notes for review

@james-prysm james-prysm added the Blocked Blocked by research or external factors label May 15, 2024
@prestonvanloon prestonvanloon added the Electra electra hardfork label May 15, 2024
@james-prysm james-prysm marked this pull request as ready for review May 22, 2024 20:23
@james-prysm james-prysm requested a review from a team as a code owner May 22, 2024 20:23
@james-prysm james-prysm removed the Blocked Blocked by research or external factors label May 22, 2024
return nil, errors.Wrap(err, "could not process deposit receipts")
}

if err := electra.ProcessConsolidations(ctx, st, bod.Consolidations()); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

why does this not return a state like the other process functions?

Copy link
Member

Choose a reason for hiding this comment

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

@rkapka made me do it 🤣

The better question is why do the other methods return the state when they are mutating the state argument? 🤔

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'm not sure lol

@@ -7,6 +7,5 @@ import (
)

func TestMainnet_Electra_Transition(t *testing.T) {
t.Skip("TODO: Electra")
Copy link
Member

Choose a reason for hiding this comment

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

Does this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no i forgot to skip it

@james-prysm james-prysm requested a review from rkapka May 22, 2024 21:47
@james-prysm james-prysm added the Ready For Review A pull request ready for code review label May 22, 2024
// ):
// validator.effective_balance = min(balance - balance % EFFECTIVE_BALANCE_INCREMENT, EFFECTIVE_BALANCE_LIMIT)
func ProcessEffectiveBalanceUpdates(state state.BeaconState) error {
// TODO: replace with real implementation
Copy link
Member

Choose a reason for hiding this comment

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

Coming in #14003

// if is_eligible_for_activation(state, validator):
// validator.activation_epoch = activation_epoch
func ProcessRegistryUpdates(ctx context.Context, state state.BeaconState) (state.BeaconState, error) {
// TODO: replace with real implementation
Copy link
Member

Choose a reason for hiding this comment

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

Coming in #14005

@james-prysm james-prysm added this pull request to the merge queue May 23, 2024
Merged via the queue into develop with commit d2966a4 May 23, 2024
16 of 17 checks passed
@james-prysm james-prysm deleted the electra-core-transition branch May 23, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants