Skip to content

apollo_transaction_converter: align proving deps with stwo 1.0.1#12707

Merged
avi-starkware merged 2 commits intomain-v0.14.2from
avi/privacy/align-proving-deps-stwo-1.0.1
Feb 24, 2026
Merged

apollo_transaction_converter: align proving deps with stwo 1.0.1#12707
avi-starkware merged 2 commits intomain-v0.14.2from
avi/privacy/align-proving-deps-stwo-1.0.1

Conversation

@avi-starkware
Copy link
Copy Markdown
Collaborator

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

Summary

  • Migrate cairo-air from git rev to published 1.0.1, stwo from git rev to 2.0.1.
  • Add workspace entries for cairo-program-runner-lib, stwo-cairo-adapter, stwo-cairo-prover, and stwo-run-and-prove (consumed in later PRs).
  • Adapt proof_verification.rs to the simplified verify_cairo API (CairoProofForRustVerifier replaces CairoProofSorted + PreProcessedTraceVariant).

Stack: 1/4 — this PR isolates the global dependency/API migration from runner behavior changes.

Test plan

  • cargo test -p apollo_transaction_converter
  • cargo clippy -p apollo_transaction_converter --all-targets --all-features

🤖 Generated with Claude Code


Note

Medium Risk
Bumps core proving/verification dependencies and adjusts proof deserialization/verification and native builtin cost wiring, which can change verification behavior and execution accounting despite being mostly dependency/API alignment.

Overview
Upgrades proving/verification dependencies from pinned git revs and dev versions to published crates, including cairo-air 1.1.0, Cairo compiler crates 2.16.0, and stwo 2.1.0, and adds new workspace deps (cairo-program-runner-lib, stwo-cairo-*, stwo-run-and-prove) for follow-up work.

Refactors proof verification to match the new cairo-air API by deserializing into CairoProofForRustVerifier and calling the simplified verify_cairo (no PreProcessedTraceVariant/conversion step), and updates proof-facts test data accordingly. The CASM compilation allowlist is reformatted to a versioned map and extended for new libfuncs (incl. blake-related), with tighter alignment tests; Cairo-native compilation is temporarily pinned to a git branch (and its version test ignored) while adding blake builtin support plumbing into native execution gas costs.

Written by Cursor Bugbot for commit b94d1f5. 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:36
@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@avi-starkware avi-starkware changed the title workspace,apollo_transaction_converter: align proving deps with stwo 1.0.1 apollo_transaction_converter: align proving deps with stwo 1.0.1 Feb 18, 2026
@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch 2 times, most recently from 10ba7a0 to 39fd2b2 Compare February 18, 2026 21:14
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: 1 of 13 files reviewed, 1 unresolved discussion (waiting on avi-starkware, einat-starkware, and noaov1).


crates/apollo_compile_to_casm_types/src/test.rs line 27 at r1 (raw file):

    const EXPECTED: &str = "{\"V1\":[{\"prime\":\"0x0\",\"compiler_version\":\"\",\"bytecode\":[\"\
                            0x1\",\"0x1\",\"0x1\"],\"hints\":[],\"entry_points_by_type\":{\"\
                            EXTERNAL\":[],\"L1_HANDLER\":[],\"CONSTRUCTOR\":[]}},\"1.7.0\"]}";

Ho not again. I fixed this a few fix ago

Code quote:

    const EXPECTED: &str = "{\"V1\":[{\"prime\":\"0x0\",\"compiler_version\":\"\",\"bytecode\":[\"\
                            0x1\",\"0x1\",\"0x1\"],\"hints\":[],\"entry_points_by_type\":{\"\
                            EXTERNAL\":[],\"L1_HANDLER\":[],\"CONSTRUCTOR\":[]}},\"1.7.0\"]}";

Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware made 1 comment.
Reviewable status: 1 of 13 files reviewed, 1 unresolved discussion (waiting on avi-starkware, einat-starkware, and noaov1).


crates/apollo_compile_to_casm_types/src/test.rs line 27 at r1 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

Ho not again. I fixed this a few fix ago

There's an unnecessary feature that propagates from one of the new deps. TAL

Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware made 1 comment.
Reviewable status: 1 of 13 files reviewed, 1 unresolved discussion (waiting on avi-starkware, einat-starkware, and noaov1).


crates/apollo_compile_to_casm_types/src/test.rs line 27 at r1 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

There's an unnecessary feature that propagates from one of the new deps. TAL

"preserve_order"

@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from 39fd2b2 to 3ee787c Compare February 22, 2026 15:15
@avi-starkware
Copy link
Copy Markdown
Collaborator Author

crates/apollo_compile_to_casm_types/src/test.rs line 27 at r1 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

"preserve_order"

fixed (using stwo crates at v1.1.0 resolves this issue)

@avi-starkware
Copy link
Copy Markdown
Collaborator Author

Cargo.toml line 255 at r2 (raw file):

cairo-lang-starknet-classes = "2.16.0"
cairo-lang-utils = "2.16.0"
cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "tomer/blake_builtin" }

I had to use tomer's branch instead of a stable version since there is no published version of cairo_native which supports cairo-lang v2.16.0.

Note that tomer's branch still does not pass lambdaclass's ci

Code quote:

cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "tomer/blake_builtin" }

@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from 3ee787c to 0cb054c Compare February 22, 2026 15:38
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-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:

@Yoni-Starkware reviewed 14 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on einat-starkware and noaov1).

Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware reviewed all commit messages and made 1 comment.
Reviewable status: 14 of 18 files reviewed, 2 unresolved discussions (waiting on avi-starkware, einat-starkware, and noaov1).


crates/apollo_compile_to_casm/src/compile_test.rs line 133 at r4 (raw file):

#[test]
fn allowed_libfuncs_aligned_to_audited() {

Align allowed_libfunc file to the new format

@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from fa0d50b to a8b50bd Compare February 23, 2026 09:38
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware partially reviewed 2 files and made 1 comment.
Reviewable status: 15 of 20 files reviewed, 3 unresolved discussions (waiting on avi-starkware, einat-starkware, and noaov1).


crates/apollo_compile_to_casm/src/compile_test.rs line 159 at r6 (raw file):

        "Audited libfuncs mismatch: (missing, extra)"
    );
}

Compare also the values, not just the keys of this file

Code quote:

    let expected_keys: HashSet<_> = expected.keys().collect();
    let actual_keys: HashSet<_> = actual.keys().collect();
    let missing: Vec<_> = expected_keys.difference(&actual_keys).map(ToString::to_string).collect();
    let extra: Vec<_> = actual_keys
        .difference(&expected_keys)
        .map(ToString::to_string)
        .filter(|libfunc| !pending_set.contains(libfunc))
        .collect();
    assert_eq!(
        (missing, extra),
        (Vec::<String>::new(), Vec::<String>::new()),
        "Audited libfuncs mismatch: (missing, extra)"
    );
}

@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from a8b50bd to 9e076a3 Compare February 23, 2026 11:09
Comment thread crates/apollo_compile_to_native/src/constants.rs
@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from 9e076a3 to e69f7bf Compare February 23, 2026 11:39
Copy link
Copy Markdown
Collaborator Author

@avi-starkware avi-starkware left a comment

Choose a reason for hiding this comment

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

@avi-starkware made 2 comments and resolved 1 discussion.
Reviewable status: 14 of 22 files reviewed, 2 unresolved discussions (waiting on einat-starkware, noaov1, and Yoni-Starkware).


crates/apollo_compile_to_casm/src/compile_test.rs line 133 at r4 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

Align allowed_libfunc file to the new format

Done.


crates/apollo_compile_to_casm/src/compile_test.rs line 159 at r6 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

Compare also the values, not just the keys of this file

Done.

Copy link
Copy Markdown

@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.

Comment thread crates/apollo_compile_to_native/build.rs
@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch 2 times, most recently from 9edc9fb to 7a11925 Compare February 23, 2026 12:26
avi-starkware and others added 2 commits February 23, 2026 14:31
…shed 1.1.0 releases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…6 and cairo-native

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avi-starkware avi-starkware force-pushed the avi/privacy/align-proving-deps-stwo-1.0.1 branch from 7a11925 to b94d1f5 Compare February 23, 2026 12:32
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-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:

@Yoni-Starkware reviewed 8 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on einat-starkware and noaov1).

Copy link
Copy Markdown
Collaborator Author

@avi-starkware avi-starkware left a comment

Choose a reason for hiding this comment

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

@avi-starkware resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on einat-starkware and noaov1).

@avi-starkware avi-starkware added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main-v0.14.2 with commit 91398ae Feb 24, 2026
27 of 29 checks passed
@avi-starkware avi-starkware deleted the avi/privacy/align-proving-deps-stwo-1.0.1 branch February 25, 2026 06:06
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants