Skip to content

Comments

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
avi/privacy/stwo-proving-feature-gates
Open

starknet_os_runner: add stwo_proving feature gates and compile-safe fallbacks#12708
avi-starkware wants to merge 2 commits intoavi/privacy/align-proving-deps-stwo-1.0.1from
avi/privacy/stwo-proving-feature-gates

Conversation

@avi-starkware
Copy link
Collaborator

@avi-starkware avi-starkware commented Feb 18, 2026

Summary

  • Add stwo_proving Cargo feature gating the proving and server modules behind nightly-only stwo deps.
  • Provide a fallback main() that exits with a message when stwo_proving is disabled.
  • cfg-gate ProvingError::ProverExecution, related server error handling, and proving imports in virtual_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_proving is off, not runtime logic changes.

Overview
Adds a new stwo_proving Cargo feature to starknet_os_runner that gates the proving + JSON-RPC server code (and nightly-only stwo dependencies) while keeping the crate buildable on stable.

When stwo_proving is disabled, the binary now exits early with a clear message and proving-related error variants/paths are cfg-guarded (including VirtualSnosProver proving execution and server error mapping). CI tooling (scripts/run_tests.py) is updated to avoid running cargo clippy --all-features on 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, extra memmap2/bincode_derive/thiserror-no-std entries).

Written by Cursor Bugbot for commit d5460a7. This will update automatically on new commits. Configure here.

@avi-starkware avi-starkware requested a review from a team as a code owner February 18, 2026 13:37
@reviewable-StarkWare
Copy link

This change is Reviewable

@avi-starkware avi-starkware force-pushed the avi/privacy/stwo-proving-feature-gates branch from 621fe36 to f154ccc Compare February 18, 2026 19:05
@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from 8d4a427 to 10ba7a0 Compare February 18, 2026 20:24
@avi-starkware avi-starkware force-pushed the avi/privacy/stwo-proving-feature-gates branch from f154ccc to 24179e3 Compare February 18, 2026 20:54
Copy link

@cursor cursor bot left a comment

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 1 potential issue.

@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from 10ba7a0 to 39fd2b2 Compare February 18, 2026 21:14
@avi-starkware avi-starkware force-pushed the avi/privacy/stwo-proving-feature-gates branch 2 times, most recently from 0058dfb to bb7f513 Compare February 18, 2026 21:23
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

@avi-starkware avi-starkware force-pushed the avi/privacy/stwo-proving-feature-gates branch from bb7f513 to dfb2fc9 Compare February 22, 2026 15:15
@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch 2 times, most recently from 3ee787c to 0cb054c Compare February 22, 2026 15:38
@avi-starkware avi-starkware force-pushed the avi/privacy/stwo-proving-feature-gates branch 2 times, most recently from b8c3814 to bbfce30 Compare February 22, 2026 16:08
avi-starkware and others added 2 commits February 22, 2026 18:45
…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>
@avi-starkware avi-starkware force-pushed the avi/privacy/stwo-proving-feature-gates branch from bbfce30 to d5460a7 Compare February 22, 2026 16:50
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