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: updated compute_proposer_index #14153

Closed

Conversation

prestonvanloon
Copy link
Member

@prestonvanloon prestonvanloon commented Jun 26, 2024

What type of PR is this?

Feature

What does this PR do? Why is it needed?

ethereum/consensus-specs#3769

Which issues(s) does this PR fix?

Other notes for review

@prestonvanloon prestonvanloon force-pushed the electra-updated_compute_proposer_index branch from 6f760f8 to 9ebf547 Compare June 26, 2024 20:04
@prestonvanloon prestonvanloon force-pushed the electra-updated_compute_proposer_index branch from 9ebf547 to 125935b Compare June 28, 2024 19:00
@prestonvanloon prestonvanloon marked this pull request as ready for review June 28, 2024 19:01
@prestonvanloon prestonvanloon requested a review from a team as a code owner June 28, 2024 19:01
@@ -357,10 +358,11 @@ func BeaconProposerIndexAtSlot(ctx context.Context, state state.ReadOnlyBeaconSt
// candidate_index = indices[compute_shuffled_index(i % total, total, seed)]
// random_byte = hash(seed + uint_to_bytes(uint64(i // 32)))[i % 32]
// effective_balance = state.validators[candidate_index].effective_balance
// if effective_balance * MAX_RANDOM_BYTE >= MAX_EFFECTIVE_BALANCE * random_byte:
Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to not remove this line for pseudocode since implementation still takes maxEB = params.BeaconConfig().MaxEffectiveBalance anyway

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not removed, it's modified 1 line down

@prestonvanloon prestonvanloon added the Electra electra hardfork label Jun 28, 2024
@prestonvanloon
Copy link
Member Author

Possible duplicate of #14010

@prestonvanloon
Copy link
Member Author

Closing in favor of #14010

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.

2 participants