[Merged by Bors] - Metrics for sync aggregate fullness#2439
[Merged by Bors] - Metrics for sync aggregate fullness#2439paulhauner wants to merge 3 commits intosigp:unstablefrom
Conversation
commit 8847bd0 Author: Paul Hauner <[email protected]> Date: Thu Jul 8 18:24:00 2021 +1000 Add metrics for sync committee fullness
|
Blocked on #2279. After it mergers I'll change the base to |
8847bd0 to
fb084ef
Compare
|
This is unblocked and ready for review :) |
michaelsproul
left a comment
There was a problem hiding this comment.
Happy to merge with or without suggested fix
| block.body().attestations().len() as f64, | ||
| ); | ||
|
|
||
| if let Ok(block) = block.as_altair() { |
There was a problem hiding this comment.
This would be good as block.body().sync_aggregate() so that it works for all post-Altair block types, but I realise that the sync_aggregate method doesn't exist yet in unstable.
When we implement the next fork we should audit all uses of as_altair anyway, so I'm happy to merge without fixing this.
The definition of sync_aggregate is:
impl<'a, T: EthSpec> BeaconBlockBodyRef<'a, T> {
/// Access the sync aggregate from the block's body, if one exists.
pub fn sync_aggregate(self) -> Option<&'a SyncAggregate<T>> {
match self {
BeaconBlockBodyRef::Base(_) => None,
BeaconBlockBodyRef::Altair(inner) => Some(&inner.sync_aggregate),
}
}
}in beacon_block_body.rs
There was a problem hiding this comment.
Oh, great idea. I hadn't considered this problem before. I've added this function in 0dc02e5. Thanks for laying it all out nicely for me 🙂
|
bors r+ |
## Issue Addressed NA ## Proposed Changes Adds a metric to see how many set bits are in the sync aggregate for each beacon block being imported. ## Additional Info NA
|
Pull request successfully merged into unstable. Build succeeded: |
Issue Addressed
NA
Proposed Changes
Adds a metric to see how many set bits are in the sync aggregate for each beacon block being imported.
Additional Info
NA