-
Notifications
You must be signed in to change notification settings - Fork 971
Ensure /eth/v2/beacon/pool/attestations honors committee_index
#7298
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
Changes from 4 commits
12d382b
9e592c2
ac6fb34
0c78827
75c27c8
3feefad
0b7e0b5
0c53c52
6fc9202
b3d116c
250b5bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -119,6 +119,18 @@ impl<E: EthSpec> CompactAttestationRef<'_, E> { | |||
| } | ||||
| } | ||||
|
|
||||
| pub fn committee_index(&self) -> Option<u64> { | ||||
| match self.indexed { | ||||
| CompactIndexedAttestation::Base(_) => Some(self.data.index), | ||||
| CompactIndexedAttestation::Electra(indexed_att) => indexed_att | ||||
| .committee_bits | ||||
| .iter() | ||||
| .enumerate() | ||||
| .find(|&(_, bit)| bit) | ||||
|
||||
| pub fn aggregate_across_committees(&mut self, checkpoint_key: CheckpointKey) { |
We could use the committee_indices vec and check committee_indices.contains(&query.committee_index)? We should also add a test covering this case (might need to call aggregate_across_committees to prompt aggregation).
(We should maybe remove the committee_index methods here so we don't accidentally misuse them)
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.
One of the issues with out test harness is that we only have attestations across a single committee. so the aggregation isnt doing much. I've added it anyways, but I had to make a field public which isnt the best solution
We should clean this up and get the test harness to create attestations across more than a single committee. I just didnt want to block v7 testing because of this. Let me know what you think
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.
Oh yeah good point. We can come back to test this more thoroughly, I've opened an issue:
Uh oh!
There was an error while loading. Please reload this page.