You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporarily classify a prover-task panic as UnsupportedBuiltins when the PIE used add_mod or mul_mod components absent from the recursive verifier's component set. Map that error to JSON-RPC 1002 (Unsupported builtin).
The prover still runs normally. Successful proofs are unchanged; returned errors, cancellations, and panics without unsupported-builtin usage remain internal errors.
This is a heuristic: an unrelated panic in a transaction using an unsupported mod builtin will also produce 1002. A TODO at the classification branch calls for a typed unsupported-component error from privacy-prove, replacing this inference with direct error handling.
Use JoinError::is_panic() and positive PIE builtin counts. No panic capture module, thread-local storage, or source-location matching.
Leave the existing observability panic hook unchanged and preserve the original documentation in prover.rs.
Test panic/cancellation classification with and without mod-builtin usage, display formatting, and RPC mapping.
Keep real-proving tests for mul-only and add-plus-mul transactions alongside the multicall success test. The tests assert builtin usage and the returned error, not a panic source location.
Stacked directly on #15124 over main-v0.14.4. This replaces the approach that depended on #15125's panic-capture machinery.
Medium Risk
Changes proving error classification and public RPC semantics (new 1002) using a heuristic that may mislabel unrelated panics when mod builtins were used; successful proofs are unchanged.
Overview
When proving fails on a blocking task panic and the Cairo PIE used add_mod / mul_mod builtins that are absent from PRIVACY_TRANSACTION_COMPONENTS, the prover now surfaces ProvingError::UnsupportedBuiltins instead of a generic join failure. That maps to JSON-RPC 1002 (Unsupported builtin) with builtin names and instance counts in data; other proving failures stay internal errors.
The proving path scans the PIE before privacy_recursive_prove, wires privacy-circuit-verify-v2 under the stwo_proving feature, bumps the pinned proving API to 0.10.4, and documents the limitation. CI runs all ignored prove_* flow tests via a local stwo_proving feature on starknet_os_flow_tests; integration tests add try_prove and prove_tx_using_mod_builtins_fails to pin the failure mode.
Reviewed by Cursor Bugbot for commit c23cf02. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Temporarily classify a prover-task panic as
UnsupportedBuiltinswhen the PIE usedadd_modormul_modcomponents absent from the recursive verifier's component set. Map that error to JSON-RPC1002(Unsupported builtin).The prover still runs normally. Successful proofs are unchanged; returned errors, cancellations, and panics without unsupported-builtin usage remain internal errors.
This is a heuristic: an unrelated panic in a transaction using an unsupported mod builtin will also produce
1002. A TODO at the classification branch calls for a typed unsupported-component error fromprivacy-prove, replacing this inference with direct error handling.JoinError::is_panic()and positive PIE builtin counts. No panic capture module, thread-local storage, or source-location matching.prover.rs.8c315cb2d3bde23379d92b415c2371ce68b51643, report spec version0.10.4, and validate the new RPC error against the schema.Stacked directly on #15124 over
main-v0.14.4. This replaces the approach that depended on #15125's panic-capture machinery.Verification
-D warningspassed in both configurations, as did formatting.prover.rsdocstrings match the base verbatim. The observability hook and its tests also match the base.