Skip to content

[r3.5] cl/phase1/forkchoice: don't maintain GLOAS indexed weight store pre-GLOAS#21699

Merged
domiwei merged 1 commit into
release/3.5from
cp/21698-to-3.5
Jun 9, 2026
Merged

[r3.5] cl/phase1/forkchoice: don't maintain GLOAS indexed weight store pre-GLOAS#21699
domiwei merged 1 commit into
release/3.5from
cp/21698-to-3.5

Conversation

@lystopad

@lystopad lystopad commented Jun 9, 2026

Copy link
Copy Markdown
Member

Cherry-pick of #21698 to release/3.5.

Fixes the Caplin pre-GLOAS attestation head-vote regression: the GLOAS indexedWeightStore was maintained on every vote regardless of fork (top CPU hotspot + GC pressure under the fork-choice lock) but never read pre-GLOAS, delaying head updates past the attestation deadline. Validated on a live Hoodi node (node CPU ~7.5%-><2%, head-vote misses 40%->0%).

Clean cherry-pick; on_attestation.go is identical between main and release/3.5.

…LOAS

The indexedWeightStore (new in the GLOAS merge) was instantiated
unconditionally and its IndexVote/RemoveVote were called per validator
index on every attestation via setLatestMessage, regardless of fork. Its
results are only consumed by GLOAS get_head; pre-GLOAS get_head uses the
non-indexed weightStore, so this was pure overhead — a top CPU hotspot
(RemoveVote) plus heavy allocation/GC, all under the fork-choice write
lock. On high-validator-count networks this stalls block import and head
updates past the attestation deadline, causing stale head votes.

Gate the index maintenance on the GLOAS vote path only.
@lystopad lystopad requested a review from domiwei as a code owner June 9, 2026 12:21
@yperbasis yperbasis added this to the 3.5.0 milestone Jun 9, 2026
@domiwei domiwei enabled auto-merge (squash) June 9, 2026 13:00
@domiwei domiwei merged commit a53e954 into release/3.5 Jun 9, 2026
91 checks passed
@domiwei domiwei deleted the cp/21698-to-3.5 branch June 9, 2026 13:06
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.

3 participants