fix(vc): skip produceAttestationData when no attester duties - #8962
Open
b0a7 wants to merge 2 commits into
Open
Conversation
b0a7
marked this pull request as ready for review
August 30, 2026 03:52
Contributor
i.e. should read 2018-2026 |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
b0a7
force-pushed
the
fix/vc-skip-empty-attestation-duties
branch
from
August 30, 2026 12:23
17ed2f0 to
8baaafa
Compare
Author
Thx, fixed |
Contributor
This seems questionable. |
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.
Summary
produceAttestationData(or wait for attestation-due) when the slot has no attester duties.Lighthouse hit the same every-slot fetch after an Electra refactor and fixed it in sigp/lighthouse#8559 (“Do not request attestation data when attestation duty is empty”).
Problem
The attestation service runs every slot. With no attester duty it still waited until attestation-due and called
GET /eth/v1/validator/attestation_data. That is not required by the spec: a validator attests once per epoch on the slot fromget_committee_assignment, which returnsNonewhen there is no assignment (phase0 honest validator — Attesting).Against a local BN this is wasted traffic. Against Obol Charon the endpoint blocks on DutyDB until the cluster has attestation data for a real duty, so an idle slot never returns. The VC then times out and flaps the node:
Against a local BN this is wasted traffic. Against Obol Charon the endpoint blocks on DutyDB until the cluster has attestation data for a real duty, so an idle slot never returns. The VC then times out and marks the beacon node down (it is logged online again shortly after):
duties_count=0means no attester duty this slot (Slot startalso showsattestationInmany minutes away). On a duty slot the same path publishes normally (~50ms after attestation-due).Approach
In
spawnAttestationTasksV2, return immediately whengetAttesterDutiesForSlotis empty.Test plan
tests/test_validator_client.nimforgetAttesterDutiesForSlot: empty map, duty on another slot, duty on the requested slottest_validator_clientAI assistance disclosure
I used Cursor to help inspect the Nimbus VC attestation loop, compare other clients and the honest-validator spec, draft this patch, and prepare this PR text. I reviewed the resulting diff and can explain the change. A human author remains responsible for the submitted code (see Status/Logos contributor guidance on AI-assisted work: allowed for drafting; the opener must review, verify, and be able to explain every change; PRs should not be opened automatically by an agent/bot). I am a node operator rather than a regular Nimbus contributor; corrections from maintainers are welcome.