Skip to content

Commit

Permalink
chore(taiko-client): more cost estimation metrics (#18713)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Jan 6, 2025
1 parent b62d390 commit b9bd6ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/taiko-client/internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var (
ProposerEstimatedCostBlob = factory.NewGauge(prometheus.GaugeOpts{Name: "proposer_estimated_cost_blob"})
ProposerProposeByCalldata = factory.NewCounter(prometheus.CounterOpts{Name: "proposer_propose_by_calldata"})
ProposerProposeByBlob = factory.NewCounter(prometheus.CounterOpts{Name: "proposer_propose_by_blob"})
ProposerCostEstimationError = factory.NewGauge(prometheus.GaugeOpts{Name: "proposer_cost_estimation_error"})

// Prover
ProverLatestVerifiedIDGauge = factory.NewGauge(prometheus.GaugeOpts{Name: "prover_latestVerified_id"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func (b *TxBuilderWithFallback) BuildOntake(

if err = g.Wait(); err != nil {
log.Error("Failed to estimate transactions cost, will build a type-3 transaction", "error", err)
metrics.ProposerCostEstimationError.Inc()
// If there is an error, just build a blob transaction.
return b.blobTransactionBuilder.BuildOntake(ctx, txListBytesArray)
}
Expand Down

0 comments on commit b9bd6ea

Please sign in to comment.