Finish remaining required interop metrics (#477)
* implement beacon_finalized_root, beacon_current_justified_root, and beacon_previous_justified_root interop metrics
This commit is contained in:
parent
255980c9f6
commit
1a62c122d8
|
@ -44,7 +44,6 @@ import # TODO - cleanup imports
|
||||||
|
|
||||||
logScope: topics = "consens"
|
logScope: topics = "consens"
|
||||||
|
|
||||||
# TODO Implement the _root metrics
|
|
||||||
# https://github.com/ethereum/eth2.0-metrics/blob/master/metrics.md
|
# https://github.com/ethereum/eth2.0-metrics/blob/master/metrics.md
|
||||||
declareGauge beacon_finalized_epoch, "Current finalized epoch" # On epoch transition
|
declareGauge beacon_finalized_epoch, "Current finalized epoch" # On epoch transition
|
||||||
declareGauge beacon_finalized_root, "Current finalized root" # 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
|
# Once per epoch metrics
|
||||||
beacon_finalized_epoch.set(state.finalized_checkpoint.epoch.int64)
|
beacon_finalized_epoch.set(state.finalized_checkpoint.epoch.int64)
|
||||||
|
beacon_finalized_root.set(state.finalized_checkpoint.root.toGaugeValue)
|
||||||
beacon_current_justified_epoch.set(
|
beacon_current_justified_epoch.set(
|
||||||
state.current_justified_checkpoint.epoch.int64)
|
state.current_justified_checkpoint.epoch.int64)
|
||||||
|
beacon_current_justified_root.set(
|
||||||
|
state.current_justified_checkpoint.root.toGaugeValue)
|
||||||
beacon_previous_justified_epoch.set(
|
beacon_previous_justified_epoch.set(
|
||||||
state.previous_justified_checkpoint.epoch.int64)
|
state.previous_justified_checkpoint.epoch.int64)
|
||||||
|
beacon_previous_justified_root.set(
|
||||||
|
state.previous_justified_checkpoint.root.toGaugeValue)
|
||||||
|
|
Loading…
Reference in New Issue