feat: count equivocator weight in gloas is_head_weak#9339
Open
rahulbarmann wants to merge 1 commit intoChainSafe:unstablefrom
Open
feat: count equivocator weight in gloas is_head_weak#9339rahulbarmann wants to merge 1 commit intoChainSafe:unstablefrom
rahulbarmann wants to merge 1 commit intoChainSafe:unstablefrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements the Gloas fork-choice modification, which accounts for the weight of equivocating validators in head-slot committees when determining if a head block is 'weak' and eligible for re-org. It introduces a mechanism to compute and pass this weight increment from the chain layer to the fork-choice layer, updates the relevant interfaces, and adds comprehensive unit tests to verify the new logic. I have no feedback to provide as there were no review comments.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Gloas updates
is_head_weakto also count weight from validators that are in head-slot committees AND instore.equivocating_indices(spec). Without it, head weight can decrease as equivocations land, breaking monotonicity.Description
getProposerHeadtakes an optionalequivocatingCommitteeWeightIncrements(default 0) added toheadNode.weightbefore the threshold check. The chain layer computes it via a callback onupdateAndGetHeadsince fork-choice has no committee access. NewIForkChoice.getEquivocatingIndices()getter. Fork-gated to Gloas.Scope kept to
getProposerHead;shouldOverrideForkChoiceUpdateandshould_apply_proposer_boostdon't callis_head_weakeither, but that's a pre-existing gap separate from this issue left for follow-up.Tests cover the threshold boundary cases.
Closes #9232
AI Assistance Disclosure
Used Claude Code to draft the implementation. Reviewed every line and made the design calls myself.