Skip to content

Bump stwo-circuits to 33a14cd6.#361

Open
ilyalesokhin-starkware wants to merge 1 commit into
mainfrom
ilya/bump-stwo-circuits-33a14cd6
Open

Bump stwo-circuits to 33a14cd6.#361
ilyalesokhin-starkware wants to merge 1 commit into
mainfrom
ilya/bump-stwo-circuits-33a14cd6

Conversation

@ilyalesokhin-starkware
Copy link
Copy Markdown
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware commented Jun 4, 2026

Summary

  • Bump stwo-circuits from 618db0a33a14cd6 (current main) across both privacy_prove and privacy_circuit_verify.
  • stwo-cairo stays at 0a5e70b7 — that's the rev stwo-circuits@33a14cd6 itself depends on.

API migrations

  • ProofConfig::new no longer takes an enabled_bits argument.
  • CairoVerifierConfig gained a required enabled_bits field, derived from all_components() order via a new get_cairo_enabled_bits() helper.
  • CircuitConfig.output_addresses replaced by n_outputs; the u anchor wire (address 2) is now appended internally by the verifier, so it is excluded from both n_outputs and the recursive output_values.
  • prepare_cairo_proof_for_circuit_verifier now takes the component enable bits as a third argument.
  • Regenerated PRIVACY_RECURSION_CIRCUIT_PREPROCESSED_ROOT for the new circuit.

Testing

Run with --release and RUST_MIN_STACK=4194304 (matching CI):

  • privacy-circuit-verify (incl. slow-tests): 8 passed ✓
  • privacy-prove slow end-to-end (test_privacy_prove_and_verify, test_privacy_recursive_prove_and_verify): 2 passed ✓

🤖 Generated with Claude Code


This change is Reviewable

Update stwo-circuits from 618db0a to 33a14cd6 (stwo-cairo stays at 0a5e70b7,
matching what stwo-circuits@33a14cd6 depends on).

API migrations:
- ProofConfig::new no longer takes an enabled_bits argument.
- CairoVerifierConfig gained a required enabled_bits field, derived from
  all_components() order via a new get_cairo_enabled_bits() helper.
- CircuitConfig.output_addresses replaced by n_outputs; the u anchor wire
  (address 2) is now appended internally by the verifier, so it is excluded
  from both n_outputs and the recursive output_values.
- prepare_cairo_proof_for_circuit_verifier now takes the component enable bits.

Regenerated PRIVACY_RECURSION_CIRCUIT_PREPROCESSED_ROOT for the new circuit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Jun 4, 2026

PR Summary

High Risk
Changes STARK/circuit verifier wiring, public outputs, and the recursion circuit preprocessed root—any mismatch breaks proof acceptance for privacy transactions.

Overview
Bumps stwo-circuits from 618db0a to 33a14cd6 in privacy_prove and privacy_circuit_verify (and Cargo.lock); stwo-cairo stays at 0a5e70b7.

Adapts to upstream API changes: ProofConfig::new no longer takes enabled_bits; Cairo enablement moves to CairoVerifierConfig.enabled_bits via new get_cairo_enabled_bits(). CircuitConfig uses n_outputs instead of output_addresses; the logup anchor u is no longer passed in recursive output_values (verifier appends it). prepare_cairo_proof_for_circuit_verifier now takes component_enable_bits from the flattened Cairo claim. PRIVACY_RECURSION_CIRCUIT_PREPROCESSED_ROOT is regenerated; tests assert n_outputs vs CIRCUIT_OUTPUT_ADDRESSES.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.26%. Comparing base (c0b937b) to head (299d84a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #361      +/-   ##
==========================================
+ Coverage   59.19%   59.26%   +0.06%     
==========================================
  Files          35       35              
  Lines        5303     5312       +9     
==========================================
+ Hits         3139     3148       +9     
  Misses       2164     2164              
Files with missing lines Coverage Δ
crates/privacy_circuit_verify/src/lib.rs 98.44% <100.00%> (+0.03%) ⬆️
crates/privacy_prove/src/lib.rs 97.84% <100.00%> (+0.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@gilbens-starkware reviewed 7 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on anatgstarkware).

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