Skip to content

starknet_transaction_prover: origin-level breadcrumbs for validation errors - #14172

Open
avi-starkware wants to merge 1 commit into
avi/prover-v3/saturation-healthfrom
avi/prover-v3/error-origin-logs
Open

starknet_transaction_prover: origin-level breadcrumbs for validation errors#14172
avi-starkware wants to merge 1 commit into
avi/prover-v3/saturation-healthfrom
avi/prover-v3/error-origin-logs

Conversation

@avi-starkware

Copy link
Copy Markdown
Collaborator

Splits validation-error logging so each origin (request body, RPC,
proving) carries an event tag and trimmed payload context, making it
straightforward to root-cause production failures from the structured
log stream. Also adds an in-test microbenchmark for HttpMetricsLayer
overhead so any regression in the hot path is visible.

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

@cursor

cursor Bot commented May 24, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Observability-only changes to production logs; misclassifying an error variant could leak transaction data or omit useful detail, but proving behavior is unchanged.

Overview
Proving failures that leave the service no longer log full Display strings when they might include client transaction data (fees, hashes, revert reasons, node URLs, program output). A new may_embed_transaction_data on VirtualSnosProverError treats every variant as sensitive except TransactionBlocked, with tests for reverts and payload-carrying validation errors.

Origin-level warn! breadcrumbs in the virtual SNOS prover now use fixed event / reason codes (e.g. validation_error, os_run_error, proving_error) instead of echoing the error. The RPC handler logs the bounded outcome metric label on every failure and only attaches error when the variant is safe to print verbatim.

Background proving during the blocking-check path is **instrument**ed with the current span so request context still flows into the spawned task.

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

avi-starkware commented May 24, 2026

Copy link
Copy Markdown
Collaborator Author

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from e57d84d to eba2906 Compare May 24, 2026 16:48
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from 53381dd to d477f5e Compare May 26, 2026 08:43
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from eba2906 to 22db0d1 Compare May 26, 2026 08:43
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from d477f5e to ef3cf0b Compare May 26, 2026 12:16
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 22db0d1 to 9773ef7 Compare May 26, 2026 12:16
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from ef3cf0b to eb8da8d Compare May 26, 2026 12:17
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 9773ef7 to b7d03bd Compare May 26, 2026 12:17
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from eb8da8d to e084131 Compare May 26, 2026 12:58
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from b7d03bd to 2fc5950 Compare May 26, 2026 12:58
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch 2 times, most recently from dd5534f to 8798823 Compare May 26, 2026 16:47
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from 158a680 to b385d86 Compare May 26, 2026 16:59
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch 2 times, most recently from 84a465f to e048443 Compare May 27, 2026 10:01
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from b385d86 to a462e96 Compare May 27, 2026 10:01
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from e048443 to fa2eff6 Compare May 27, 2026 10:35
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 4af812f to 1138936 Compare July 9, 2026 12:29
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from ff6783f to a17d880 Compare July 12, 2026 12:39
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 1138936 to 486c09b Compare July 12, 2026 12:39
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from a17d880 to dc2c2fb Compare July 13, 2026 11:45
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 486c09b to 553e864 Compare July 13, 2026 11:45
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from dc2c2fb to b6442ff Compare July 19, 2026 12:24
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 553e864 to 3deb8f7 Compare July 19, 2026 12:24
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from b6442ff to e6a15fc Compare July 19, 2026 12:31
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch 2 times, most recently from d817f3b to 575006a Compare July 19, 2026 13:15
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from e6a15fc to 691e967 Compare July 19, 2026 13:15
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from 691e967 to 42e93f7 Compare August 25, 2026 08:23
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 575006a to 32a07a2 Compare August 25, 2026 08:23

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 32a07a2. Configure here.

// No `error`: a runner failure can quote the transaction hash and its revert
// reason — see `VirtualSnosProverError::may_embed_transaction_data`.
warn!(event = "os_run_error");
})?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orphan breadcrumbs on blocked path

Medium Severity

Origin breadcrumbs in run_and_prove emit as soon as the parallel prove task fails, but prove_with_blocking_check can still discard that result and return TransactionBlocked. With the default multi-second check timeout, a fast OS or proving failure often finishes first, so the same request span can show os_run_error or proving_error alongside a final failure_blocked outcome and mislead root-cause analysis.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 32a07a2. Configure here.

// No `error`: proving errors can quote transaction-derived program output — see
// `VirtualSnosProverError::may_embed_transaction_data`.
warn!(event = "proving_error");
})?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output parse mislabeled as proving

Low Severity

The proving_error breadcrumb wraps all of prove_virtual_snos_run, including try_into_proof_facts failures that become ProgramOutputError. Those map to failure_output_parse in metric_outcome, so the origin event and the final outcome disagree and point operators at the wrong stage.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 32a07a2. Configure here.

@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from 32a07a2 to be0a076 Compare August 25, 2026 10:14
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from 42e93f7 to c1af3de Compare August 25, 2026 10:14
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from be0a076 to b3b4624 Compare August 25, 2026 19:09
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch 2 times, most recently from 8486da2 to cd1ec66 Compare August 26, 2026 09:54
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch from b3b4624 to b5817a7 Compare August 26, 2026 09:54
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch from cd1ec66 to 76ffff6 Compare August 26, 2026 13:15
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/error-origin-logs branch 2 times, most recently from 4dcf6e3 to c33d7b5 Compare August 26, 2026 13:39
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/saturation-health branch 2 times, most recently from 445a598 to bd56632 Compare August 26, 2026 14:04
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