diff --git a/validator/client/validator_metrics.go b/validator/client/validator_metrics.go index e116427f4..48e51ddfd 100644 --- a/validator/client/validator_metrics.go +++ b/validator/client/validator_metrics.go @@ -73,6 +73,7 @@ func (v *validator) LogValidatorGainsAndLosses(ctx context.Context, slot uint64) v.prevBalance[pubKeyBytes] = params.BeaconConfig().MaxEffectiveBalance } + fmtKey := fmt.Sprintf("%#x", pubKey) truncatedKey := fmt.Sprintf("%#x", pubKey[:8]) if v.prevBalance[pubKeyBytes] > 0 { newBalance := float64(resp.BalancesAfterEpochTransition[i]) / gweiPerEth @@ -91,7 +92,7 @@ func (v *validator) LogValidatorGainsAndLosses(ctx context.Context, slot uint64) "percentChange": fmt.Sprintf("%.5f%%", percentNet*100), }).Info("Previous epoch voting summary") if v.emitAccountMetrics { - validatorBalancesGaugeVec.WithLabelValues(truncatedKey).Set(newBalance) + validatorBalancesGaugeVec.WithLabelValues(fmtKey).Set(newBalance) } }