Skip to content

starknet_transaction_prover: proving-job duration + outcome metrics#14168

Open
avi-starkware wants to merge 1 commit into
avi/prover-v3/metricsfrom
avi/prover-v3/job-metrics
Open

starknet_transaction_prover: proving-job duration + outcome metrics#14168
avi-starkware wants to merge 1 commit into
avi/prover-v3/metricsfrom
avi/prover-v3/job-metrics

Conversation

@avi-starkware
Copy link
Copy Markdown
Collaborator

Adds Prometheus counters / histograms recorded by VirtualSnosProver for
each proving job: total count by outcome (success, validation_error,
internal_error, l1_provider_error) and end-to-end duration.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Low Risk
Observability-only changes with a small refactor wrapper; no auth, data, or proving semantics changes.

Overview
Adds Prometheus instrumentation around prove_transaction and the proving pipeline so operators can track latency and failure mix without unbounded label cardinality.

Each request records a histogram for end-to-end wall time (prover_prove_transaction_duration_seconds) on success and failure, plus a counter with a fixed outcome label (prover_prove_transaction_outcome_total). Failures are bucketed via new VirtualSnosProverError::metric_outcome() into categories like validation, blocked, runner, output parse, and proving (when stwo_proving is enabled).

Successful runs that reach run_and_prove also emit sub-step histograms for virtual OS execution and Stwo proving. Metric names and outcome strings live in server/metrics (names / outcomes modules). Proving logic is unchanged aside from splitting prove_transaction into an inner method so metrics always run in a single wrapper; completion logs now include outcome.

Reviewed by Cursor Bugbot for commit a0e7299. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Adds Prometheus counters / histograms recorded by `VirtualSnosProver` for
each proving job: total count by outcome (`success`, `validation_error`,
`internal_error`, `l1_provider_error`) and end-to-end duration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avi-starkware avi-starkware force-pushed the avi/prover-v3/job-metrics branch from 7d179cb to a0e7299 Compare May 24, 2026 16:48
@avi-starkware avi-starkware force-pushed the avi/prover-v3/metrics branch from 9c4a5a0 to 5eb413f Compare May 24, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants