starknet_os_runner: add stwo_proving feature gates and compile-safe fallbacks#12708
Open
avi-starkware wants to merge 2 commits intoavi/privacy/align-proving-deps-stwo-1.0.1from
Open
Conversation
2 tasks
621fe36 to
f154ccc
Compare
8d4a427 to
10ba7a0
Compare
f154ccc to
24179e3
Compare
10ba7a0 to
39fd2b2
Compare
0058dfb to
bb7f513
Compare
|
Artifacts upload workflows: |
bb7f513 to
dfb2fc9
Compare
3ee787c to
0cb054c
Compare
b8c3814 to
bbfce30
Compare
…allbacks Gate the proving and server modules behind the new `stwo_proving` Cargo feature so the crate compiles on stable Rust without pulling in nightly-only stwo dependencies. Changes: - Add `stwo_proving` feature in Cargo.toml with optional deps (cairo-program-runner-lib, stwo_run_and_prove_lib). - cfg-gate `proving` and `server` modules in lib.rs. - Provide a fallback main() that exits with a message when stwo_proving is not enabled. - Gate ProvingError::ProverExecution and related server error handling behind the feature. - Gate proving imports and call sites in virtual_snos_prover.rs. - cfg-gate RpcRunner, RpcRunnerFactory, VirtualSnosRunner trait, and related test utilities that are only used from the gated proving module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bbfce30 to
d5460a7
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
stwo_provingCargo feature gating the proving and server modules behind nightly-only stwo deps.main()that exits with a message whenstwo_provingis disabled.ProvingError::ProverExecution, related server error handling, and proving imports invirtual_snos_prover.rs.Stack: 2/4 — reviewable wiring PR; no core proving logic yet, just feature boundaries and error plumbing.
Depends on: #12707
Test plan
cargo test -p starknet_os_runner(default features, no stwo_proving)cargo clippy -p starknet_os_runner --all-targets🤖 Generated with Claude Code
Note
Medium Risk
Introduces new feature-gated proving/server compilation paths and adjusts CI clippy behavior; risk is mainly around build/feature matrix and missing coverage when
stwo_provingis off, not runtime logic changes.Overview
Adds a new
stwo_provingCargo feature tostarknet_os_runnerthat gates the proving + JSON-RPC server code (and nightly-only stwo dependencies) while keeping the crate buildable on stable.When
stwo_provingis disabled, the binary now exits early with a clear message and proving-related error variants/paths arecfg-guarded (includingVirtualSnosProverproving execution and server error mapping). CI tooling (scripts/run_tests.py) is updated to avoid runningcargo clippy --all-featureson packages that have nightly-only features, running a reduced clippy invocation for those crates instead.Dependency lockfile updates pull in new Cairo/stwo proving-related crates and supporting deps (e.g.,
cairo-program-runner-lib,stwo-run-and-prove, extramemmap2/bincode_derive/thiserror-no-stdentries).Written by Cursor Bugbot for commit d5460a7. This will update automatically on new commits. Configure here.