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 metric for current epoch total balance #5688

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions consensus/state_processing/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ lazy_static! {
"beacon_participation_prev_epoch_source_attesting_gwei_total",
"Total effective balance (gwei) of validators who attested to the source in the previous epoch"
);
pub static ref PARTICIPATION_CURRENT_EPOCH_TOTAL_ACTIVE_GWEI_TOTAL: Result<IntGauge> = try_create_int_gauge(
"beacon_participation_current_epoch_active_gwei_total",
"Total effective balance (gwei) of validators who are active in the current epoch"
);
/*
* Processing metrics
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ impl<E: EthSpec> EpochProcessingSummary<E> {
&metrics::PARTICIPATION_PREV_EPOCH_SOURCE_ATTESTING_GWEI_TOTAL,
self.previous_epoch_source_attesting_balance()? as i64,
);
metrics::set_gauge(
&metrics::PARTICIPATION_CURRENT_EPOCH_TOTAL_ACTIVE_GWEI_TOTAL,
self.current_epoch_total_active_balance() as i64,
);

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion validator_client/src/duties_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ async fn poll_beacon_attesters_for_epoch<T: SlotClock + 'static, E: EthSpec>(
"Attester duties re-org";
"prior_dependent_root" => %prior_dependent_root,
"dependent_root" => %dependent_root,
"msg" => "this may happen from time to time"
"note" => "this may happen from time to time"
)
}
*mut_value = (dependent_root, duty_and_proof);
Expand Down
Loading