Skip to content

Comments

apollo_transaction_converter: align proving deps with stwo 1.0.1#12707

Open
avi-starkware wants to merge 2 commits intomain-v0.14.2from
avi/privacy/align-proving-deps-stwo-1.0.1
Open

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

Conversation

@avi-starkware
Copy link
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
Touches proof verification and core proving dependencies; while mostly dependency/API alignment, any mismatch in proof encoding/verification or Cairo compiler behavior could break verification at runtime.

Overview
Updates proving/verification dependencies by moving cairo-air and stwo from pinned git revs to crates.io releases, bumping Cairo compiler crates to 2.16.0, and adding new workspace deps (cairo-program-runner-lib, stwo-cairo-*, stwo-run-and-prove). cairo-native is switched to a specific git branch.

Adapts apollo_transaction_converter proof verification to the new cairo-air API by deserializing CairoProofForRustVerifier directly and calling the simplified verify_cairo without PreProcessedTraceVariant/conversion. Aligns compilation tooling/tests with updated audited libfuncs (adds blake/gas/boxing-related libfuncs, updates audited-libfunc alignment test), wires the new blake builtin gas cost into native execution, refreshes native test compilation helpers, and updates snapshots/example proof facts plus the pinned proving-utils revision.

Written by Cursor Bugbot for commit fa0d50b. 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

This change is Reviewable

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

@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
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
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
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
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
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" }

…shed 1.1.0 releases

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 3ee787c to 0cb054c Compare February 22, 2026 15:38
Copy link
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).

…6 and cairo-native

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants