Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat(prover): tracking for most recent block ID to ensure (relatively…
Browse files Browse the repository at this point in the history
…) consecutive proving by notification system (#174)
  • Loading branch information
RogerLamTd authored Mar 7, 2023
1 parent 4fab06a commit e500039
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var (

// Prover
ProverLatestVerifiedIDGauge = metrics.NewRegisteredGauge("prover/latestVerified/id", nil)
ProverLatestProvenBlockIDGauge = metrics.NewRegisteredGauge("prover/latestProven/id", nil)
ProverQueuedProofCounter = metrics.NewRegisteredCounter("prover/proof/all/queued", nil)
ProverQueuedValidProofCounter = metrics.NewRegisteredCounter("prover/proof/valid/queued", nil)
ProverQueuedInvalidProofCounter = metrics.NewRegisteredCounter("prover/proof/invalid/queued", nil)
Expand Down
1 change: 1 addition & 0 deletions prover/proof_submitter/invalid_proof_submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (s *InvalidProofSubmitter) SubmitProof(

metrics.ProverSentProofCounter.Inc(1)
metrics.ProverSentInvalidProofCounter.Inc(1)
metrics.ProverLatestProvenBlockIDGauge.Update(proofWithHeader.BlockID.Int64())

return nil
}
Expand Down
1 change: 1 addition & 0 deletions prover/proof_submitter/valid_proof_submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func (s *ValidProofSubmitter) SubmitProof(

metrics.ProverSentProofCounter.Inc(1)
metrics.ProverSentValidProofCounter.Inc(1)
metrics.ProverLatestProvenBlockIDGauge.Update(proofWithHeader.BlockID.Int64())

return nil
}

0 comments on commit e500039

Please sign in to comment.