Skip to content

feat: count equivocator weight in gloas is_head_weak#9339

Open
rahulbarmann wants to merge 1 commit intoChainSafe:unstablefrom
rahulbarmann:rahulbarmann/gloas-equivocator-head-weak
Open

feat: count equivocator weight in gloas is_head_weak#9339
rahulbarmann wants to merge 1 commit intoChainSafe:unstablefrom
rahulbarmann:rahulbarmann/gloas-equivocator-head-weak

Conversation

@rahulbarmann
Copy link
Copy Markdown

Motivation

Gloas updates is_head_weak to also count weight from validators that are in head-slot committees AND in store.equivocating_indices (spec). Without it, head weight can decrease as equivocations land, breaking monotonicity.

Description

getProposerHead takes an optional equivocatingCommitteeWeightIncrements (default 0) added to headNode.weight before the threshold check. The chain layer computes it via a callback on updateAndGetHead since fork-choice has no committee access. New IForkChoice.getEquivocatingIndices() getter. Fork-gated to Gloas.

Scope kept to getProposerHead; shouldOverrideForkChoiceUpdate and should_apply_proposer_boost don't call is_head_weak either, 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.

@rahulbarmann rahulbarmann requested a review from a team as a code owner May 7, 2026 17:50
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gloas: also count weight from equivocating committee members when determining if head is weak

1 participant