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

Add randomized testing for Altair process_sync_aggregate #2507

Merged
merged 3 commits into from
Jul 7, 2021
Merged

Add randomized testing for Altair process_sync_aggregate #2507

merged 3 commits into from
Jul 7, 2021

Conversation

ralexstokes
Copy link
Member

Adds some randomized testing for sync aggregate processing.

The following test cases are added for both committees with duplicated indices and committees without duplicated indices.

  • Only 1 member participates
  • 25% participates (under the sync protocol threshold)
  • 75% participates (over the sync protocol threshold)
  • All but 1 member participates
  • 50% participates with miscellaneous balances

NOTE: the cases of 0% participation and 100% participation are already covered by existing tests (however, they all use the same rng seed)

@@ -206,7 +210,6 @@ def test_sync_committee_rewards_duplicate_committee_no_participation(spec, state
committee_indices = get_committee_indices(spec, state, duplicates=True)
committee_size = len(committee_indices)
committee_bits = [False] * committee_size
assert len(committee_bits) == committee_size
Copy link
Member Author

Choose a reason for hiding this comment

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

this likely got copied from another test where it was more important to check the committee size; however, there is no manipulation of this set here so we just remove the assert

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

great! minor formatting, otherwise good to go

@djrtwo djrtwo merged commit 5e6a0ed into ethereum:dev Jul 7, 2021
@ralexstokes ralexstokes deleted the add-altair-tests-process-sync-aggregate branch July 7, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants