Skip to content

Commit

Permalink
feat(taiko-client): improve ProverProvenByGuardianGauge metric (#17703
Browse files Browse the repository at this point in the history
)
  • Loading branch information
davidtaikocha authored Jun 29, 2024
1 parent 3687b1e commit c88fcd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/taiko-client/prover/event_handler/block_verified.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ func NewBlockVerifiedEventHandler(guardianProverAddress common.Address) *BlockVe
func (h *BlockVerifiedEventHandler) Handle(e *bindings.TaikoL1ClientBlockVerified) {
metrics.ProverLatestVerifiedIDGauge.Set(float64(e.BlockId.Uint64()))

if e.Prover == h.guardianProverAddress {
metrics.ProverProvenByGuardianGauge.Set(1)
}

log.Info(
"New verified block",
"blockID", e.BlockId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func (h *TransitionProvedEventHandler) Handle(
) error {
metrics.ProverReceivedProvenBlockGauge.Set(float64(e.BlockId.Uint64()))

if e.Tier >= encoding.TierGuardianMinorityID {
metrics.ProverProvenByGuardianGauge.Add(1)
}

// If this prover is in contest mode, we check the validity of this proof and if it's invalid,
// contest it with a higher tier proof.
if !h.contesterMode {
Expand Down

0 comments on commit c88fcd1

Please sign in to comment.