[pull] develop from OffchainLabs:develop#973
Merged
pull[bot] merged 2 commits intoAll-Blockchains:developfrom Apr 7, 2026
Merged
[pull] develop from OffchainLabs:develop#973pull[bot] merged 2 commits intoAll-Blockchains:developfrom
pull[bot] merged 2 commits intoAll-Blockchains:developfrom
Conversation
…computed effective balance is unchanged. (#16631) **What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** In (electra) `ProcessEffectiveBalanceUpdates`, a `0x00...` validator with a balance > 33.25 ETH enters in the ```go if balance+downwardThreshold < val.EffectiveBalance() || val.EffectiveBalance()+upwardThreshold < balance { ... } ``` condition. The validator is copied (`newVal = val.Copy()`) and returned, **even if the effective balance did not actually change**. As a consequence, this validator is considered as "dirty" in the validators field trie, and all the corresponding branches are re-computed when computing the hash trie root of the the validators field trie of the beacon state. This PR adopts the same behavior as before Electra: https://github.com/OffchainLabs/prysm/blob/6f437b561a794a1f667cf000be0fa10b4234b85a/beacon-chain/core/electra/effective_balance_updates.go#L32-L63 and copies/considers dirty the validator only if its effective balance changed. **Which issues(s) does this PR fix?** - #16630 **Other notes for review** The first commit only introduces a new metric showing the issue. The second commit actually solves the issue. **Before this PR:** **~9.400 validators** considered as dirty on mainnet every epoch <img width="942" height="308" alt="image" src="https://github.com/user-attachments/assets/31da9c92-aa0f-4d71-a402-92ed62738803" /> **After this PR:** **~15 validators** considered as dirty on mainnet every epoch (reduction of ~x620). <img width="946" height="312" alt="image" src="https://github.com/user-attachments/assets/afc5e72a-ccda-4636-87d9-dab2fbbf5c1c" /> **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [x] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable). --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
…oto (#16634) - Adds `cast_type` annotation to `proposer_lookahead` field in `BeaconStateFulu` and `BeaconStateGloas` protobuf definitions to use `primitives.ValidatorIndex` instead of raw `uint64` - Matches the spec type `Vector[ValidatorIndex, ...]` and is consistent with how `ptc_window` already uses `cast_type` for its validator indices - Updates `InitializeProposerLookahead` to return `[]primitives.ValidatorIndex` directly, removing all `uint64` conversion boilerplate - Adds `proposerLookaheadVal()` copy method for `ToProto` consistency with other slice fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )