-
Notifications
You must be signed in to change notification settings - Fork 973
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
eip7549: Ensure non-zero bits for each committee bitfield comprising an aggregate #4002
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I agree we should check for this. LGTM, with one little nit.
Do we need to add another condition to here? consensus-specs/specs/electra/p2p-interface.md Lines 51 to 53 in 1b408e9
|
what if a whole committee is not voting? ie there are no attestations from that commiteee? |
The validator who does aggregation should include its own vote at the very least. So there should be at least one bit in aggregation bits. edit: I notice https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#construct-aggregate says aggregator should collect all the votes (including its own) that come solely from gossip. But I believe aggregator should include its own vote even if it doesn't receive its own vote through gossip. |
Then the bit corresponding to this committee should be |
Note that a network aggregate only allows a single committee, so the following Phase0 check is enough: consensus-specs/specs/phase0/p2p-interface.md Lines 371 to 372 in 49b6840
|
Currently, the spec allows an on chain aggregate to have only a single non-zero bit regardless of the number of committees. This allows to create an on chain aggregate with 63 committees worth of zeroes which successfully passes all validations (~4kb of uncompressed and wasteful data per aggregate).
This PR adds a validation that requires at least a single non-zero bit for each attesting committee bitfield comprising the aggregate.