fix(transformations): correct head vote assessment for missed slots#242
Open
samcm wants to merge 2 commits into
Open
fix(transformations): correct head vote assessment for missed slots#242samcm wants to merge 2 commits into
samcm wants to merge 2 commits into
Conversation
When a slot has a missed block proposal, the correct head vote is the most recent canonical ancestor block. Both models incorrectly marked validators as wrong for voting for that ancestor block. - fct_attestation_vote_correctness_by_validator: compare head_root against expected head (most recent canonical block at or before duty slot) instead of comparing duty slot against voted block slot - fct_attestation_correctness_by_validator_head: compute slot_distance relative to expected head slot instead of duty slot
mattevans
approved these changes
Mar 16, 2026
Add missed-slot head correctness assertions to fct_attestation_correctness_by_validator_head tests. Create test file for fct_attestation_vote_correctness_by_validator with comprehensive assertions including missed-slot validation.
samcm
force-pushed
the
fix/head-correctness-missed-slots
branch
from
March 16, 2026 03:07
b7b0269 to
a7d8ef6
Compare
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
When a slot has a missed block proposal, the correct head vote per the Ethereum spec is the most recent canonical ancestor block. Both
fct_attestation_vote_correctness_by_validatorandfct_attestation_correctness_by_validator_headincorrectly penalized validators who correctly voted for that ancestor block.fct_attestation_vote_correctness_by_validator: Addedexpected_headCTE that resolves the correct head block_root for each duty slot (the most recent canonical block at or before that slot).head_correctnow compares the validator's votedhead_rootagainst the expected head rather than comparing slot numbers.fct_attestation_correctness_by_validator_head: Addedexpected_headCTE that resolves the expected head slot for each duty slot.slot_distanceis now computed asexpected_head.slot - blocks.slotinstead ofduties.slot - blocks.slot, so voting for the correct ancestor gives distance 0.Impact: ~14 missed slots per day on mainnet, each affecting ~29k+ attesting validators, totaling ~400k+ validator-slot rows per day incorrectly marked as wrong head votes.