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

EIP-7549: Allow multiple committee bits #14203

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Jul 10, 2024

What type of PR is this?

Other

What does this PR do? Why is it needed?

This PR fixes tests failing with could not create attestation ID in #14180.

We need to allow more than 1 committee bit set when creating an attestation ID because when we prune attestations we create IDs based on what we see in a block. And an Electra block will have aggregated attestations with more than 1 committee bit.

@rkapka rkapka requested a review from a team as a code owner July 10, 2024 20:23
@rkapka rkapka added Ready For Review A pull request ready for code review Electra electra hardfork labels Jul 10, 2024
Comment on lines -55 to -61
t.Run("data source Electra - multiple bits set", func(t *testing.T) {
cb := primitives.NewAttestationCommitteeBits()
cb.SetBitAt(0, true)
cb.SetBitAt(1, true)
att := util.HydrateAttestationElectra(&ethpb.AttestationElectra{CommitteeBits: cb})
_, err := attestation.NewId(att, attestation.Data)
assert.ErrorContains(t, "2 committee bits are set", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we not keep this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no because this asserts that setting 2 committee bits is wrong, while this PR allows it

@rkapka rkapka added this pull request to the merge queue Jul 12, 2024
Merged via the queue into develop with commit ec84a1b Jul 12, 2024
17 checks passed
@rkapka rkapka deleted the eip-7549-multiple-committee-bits branch July 12, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants