Skip to content

Avoid attestations with incompatible shuffling#5276

Merged
jtraglia merged 1 commit into
ethereum:masterfrom
mkalinin:comp-tests-att-filter
May 21, 2026
Merged

Avoid attestations with incompatible shuffling#5276
jtraglia merged 1 commit into
ethereum:masterfrom
mkalinin:comp-tests-att-filter

Conversation

@mkalinin

Copy link
Copy Markdown
Contributor

Fixes #5271 by introducing shuffling_compatibility_filter which prevents attestations from being included into a block if a dependent root of an attestation and the block mismatch.

@github-actions github-actions Bot added the testing CI, actions, tests, testing infra label May 21, 2026
@mkalinin mkalinin changed the title comptests: Do not include atts with incompatible shuffling in block Сomptests: Do not include atts with incompatible shuffling in block May 21, 2026
@mkalinin mkalinin changed the title Сomptests: Do not include atts with incompatible shuffling in block Сomptests: do not include atts with incompatible shuffling in block May 21, 2026
@mkalinin mkalinin changed the title Сomptests: do not include atts with incompatible shuffling in block Сomptests: avoid atts with incompatible shuffling in block May 21, 2026
@jtraglia jtraglia changed the title Сomptests: avoid atts with incompatible shuffling in block Avoid attestations with incompatible shuffling May 21, 2026
@jtraglia jtraglia merged commit 03c0073 into ethereum:master May 21, 2026
63 of 67 checks passed
if epoch <= spec.MIN_SEED_LOOKAHEAD:
dependent_slot = spec.GENESIS_SLOT
else:
dependent_slot = spec.compute_start_slot_at_epoch(epoch - spec.MIN_SEED_LOOKAHEAD)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be spec.compute_start_slot_at_epoch(epoch - spec.MIN_SEED_LOOKAHEAD) - 1, right? It's the block root at the end of the prior epoch that determines what happens in the epoch transition.

This is defined e.g. in the beacon API spec:

https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/getAttesterDuties

I think this discrepancy is safe in general, because an equal root at the start of epoch - 1 implies an equal root at the end of epoch - 2. We are just potentially missing out on a little bit of test coverage (the case where the start slot roots are different but the end slot roots are still equal).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot for looking into that! Fixed by #5287

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

Labels

testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fork choice compliance tests assume the existence of impossible attestations

4 participants