Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align aggregated att gossip validations #13490

Merged
merged 4 commits into from
Jan 23, 2024
Merged

Conversation

terencechain
Copy link
Member

This PR implements ethereum/consensus-specs#3552 by adding the following gossip verifications for aggregated attestation:

- [REJECT] The committee index is within the expected range -- i.e. `aggregate.data.index < get_committee_count_per_slot(state, aggregate.data.target.epoch)`.
- [REJECT] The number of aggregation bits matches the committee size -- i.e. len(aggregate.aggregation_bits) == len(get_beacon_committee(state, aggregate.data.slot, aggregate.data.index)).
- [REJECT] The aggregate attestation has participants -- that is, len(get_attesting_indices(state, aggregate.data, aggregate.aggregation_bits)) >= 1.

The check to ensure the 'committee index is within the expected range' has been moved to occur after the retrieval of the target state, to prevent a denial of service attack on the 'get target state' function.

@terencechain terencechain added the Ready For Review A pull request ready for code review label Jan 19, 2024
@terencechain terencechain requested a review from a team as a code owner January 19, 2024 17:36
@terencechain terencechain force-pushed the align-aggregate-gossip branch from c0371d8 to 8c229cb Compare January 20, 2024 02:44
@terencechain terencechain force-pushed the align-aggregate-gossip branch from 8c229cb to cde097c Compare January 22, 2024 23:33
@nisdas nisdas enabled auto-merge January 23, 2024 04:03
@nisdas nisdas added this pull request to the merge queue Jan 23, 2024
Merged via the queue into develop with commit 3187a05 Jan 23, 2024
17 checks passed
@nisdas nisdas deleted the align-aggregate-gossip branch January 23, 2024 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants