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 missing electra attestation processing committee check #8901

Merged

Conversation

mehdi-aouadi
Copy link
Contributor

@mehdi-aouadi mehdi-aouadi commented Dec 9, 2024

PR Description

Add missing committee attester check when processing Electra attestations:
https://github.com/ethereum/consensus-specs/blob/31cd9cbec2d93e5a6df84dcee9ca9e8aa77803ee/specs/electra/beacon-chain.md?plain=1#L1330

Fixed Issue(s)

fixes #8892

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@tbenr
Copy link
Contributor

tbenr commented Dec 9, 2024

humm looks like we do things slightly differently there.. for instance where is assert len(attestation.aggregation_bits) == committee_offset?

@mehdi-aouadi
Copy link
Contributor Author

humm looks like we do things slightly differently there.. for instance where is assert len(attestation.aggregation_bits) == committee_offset?

That's done:

if (participantsCount != aggregationBits.size()) {
      return Optional.of(AttestationInvalidReason.PARTICIPANTS_COUNT_MISMATCH);
    }

https://github.com/ConsenSys/teku/blob/8f291ea277a3ace4e1aee6e9c388cc6e325efedc/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/block/BlockProcessorElectra.java#L748-L750

As discussed, I'll push some other changes to make it more aligned with the spec.

@mehdi-aouadi mehdi-aouadi requested a review from tbenr December 9, 2024 15:46
Copy link
Contributor

@tbenr tbenr left a comment

Choose a reason for hiding this comment

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

LGTM. Just a var name suggestion

@mehdi-aouadi mehdi-aouadi enabled auto-merge (squash) December 9, 2024 16:16
@mehdi-aouadi mehdi-aouadi merged commit a04f3ff into Consensys:master Dec 9, 2024
17 checks passed
@mehdi-aouadi mehdi-aouadi deleted the 8892-attestation-processing-fix branch December 9, 2024 16:49
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.

Fix reference test invalid_nonset_bits_for_one_committee (alpha.9)
2 participants