test(st): attestation with already-justified target is silently skipped#591
Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom Apr 11, 2026
Conversation
tcoratger
approved these changes
Apr 11, 2026
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
test_attestation_with_already_justified_target_is_silently_skippedtotest_justification.py🔗 Related Issues or PRs
closes #576
Design notes
The test uses the simplest possible chain (4 validators, 3 slots) to isolate the skip path at
State.process_attestationswherejustified_slots.is_slot_justified(...)returns
Trueand the attestation is dropped viacontinue.Post-state assertions confirm:
latest_justified_slotstays at 1 (no regression)justifications_rootsandjustifications_validatorsare empty (pending votes were cleared on justification and the skipped attestation created no new ones)justified_slotsis unchanged (no double-marking)Test plan
uv run fill --fork=devnet --clean -n auto -k test_attestation_with_already_justifiedpassesuv run fill --fork=devnet --clean -n autopasses (no regressions)uvx tox -e all-checks— ruff, ty, codespell, mdformat all pass