diff --git a/beacon_chain/spec/state_transition_epoch.nim b/beacon_chain/spec/state_transition_epoch.nim index f537313d2..c170fa160 100644 --- a/beacon_chain/spec/state_transition_epoch.nim +++ b/beacon_chain/spec/state_transition_epoch.nim @@ -44,7 +44,6 @@ import # TODO - cleanup imports logScope: topics = "consens" -# TODO Implement the _root metrics # https://github.com/ethereum/eth2.0-metrics/blob/master/metrics.md declareGauge beacon_finalized_epoch, "Current finalized epoch" # On epoch transition declareGauge beacon_finalized_root, "Current finalized root" # On epoch transition @@ -612,7 +611,12 @@ proc process_epoch*(state: var BeaconState) = # Once per epoch metrics beacon_finalized_epoch.set(state.finalized_checkpoint.epoch.int64) + beacon_finalized_root.set(state.finalized_checkpoint.root.toGaugeValue) beacon_current_justified_epoch.set( state.current_justified_checkpoint.epoch.int64) + beacon_current_justified_root.set( + state.current_justified_checkpoint.root.toGaugeValue) beacon_previous_justified_epoch.set( state.previous_justified_checkpoint.epoch.int64) + beacon_previous_justified_root.set( + state.previous_justified_checkpoint.root.toGaugeValue)