diff --git a/consensus/consensus_v2.go b/consensus/consensus_v2.go index 6c4a19f8f..dc67a0f18 100644 --- a/consensus/consensus_v2.go +++ b/consensus/consensus_v2.go @@ -213,6 +213,7 @@ func (consensus *Consensus) finalCommit() { Int("numStakingTxns", len(block.StakingTransactions())). Msg("HOORAY!!!!!!! CONSENSUS REACHED!!!!!!!") ConsensusCounterVec.With(prometheus.Labels{"consensus": "hooray"}).Inc() + ConsensusGaugeVec.With(prometheus.Labels{"consensus": "block_num"}).Set(float64(block.NumberU64())) ConsensusGaugeVec.With(prometheus.Labels{"consensus": "num_commits"}).Set(float64(consensus.Decider.SignersCount(quorum.Commit))) // If still the leader, send commit sig/bitmap to finish the new block proposal, diff --git a/consensus/validator.go b/consensus/validator.go index 820676fdf..42e76c389 100644 --- a/consensus/validator.go +++ b/consensus/validator.go @@ -299,6 +299,7 @@ func (consensus *Consensus) onCommitted(msg *msg_pb.Message) { ConsensusGaugeVec.With(prometheus.Labels{"consensus": "signatures"}).Set(numSig) ConsensusCounterVec.With(prometheus.Labels{"consensus": "signatures"}).Add(numSig) + ConsensusGaugeVec.With(prometheus.Labels{"consensus": "block_num"}).Set(float64(blockObj.NumberU64())) initBn := consensus.blockNum consensus.tryCatchup()