Skip to content

apollo_starknet_os_program: update cairo-lang to 0.14.3a1#14020

Open
dorimedini-starkware wants to merge 1 commit into
mainfrom
dori-update-cairo-lang-0.14.3a1
Open

apollo_starknet_os_program: update cairo-lang to 0.14.3a1#14020
dorimedini-starkware wants to merge 1 commit into
mainfrom
dori-update-cairo-lang-0.14.3a1

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

No description provided.

@dorimedini-starkware dorimedini-starkware self-assigned this May 11, 2026
@cursor
Copy link
Copy Markdown

cursor Bot commented May 11, 2026

PR Summary

Medium Risk
Bumps the Cairo0 toolchain and updates Starknet OS program hashes/constants, which can affect compilation outputs and proof/verification compatibility. Also adjusts VM resource estimation/test expectations and removes a Patricia hint, so runtime behavior should be revalidated end-to-end.

Overview
Updates the required Cairo0 toolchain to cairo-lang==0.14.3a1 (requirements + tx prover Docker image) and hardens Cairo0 script invocation by resolving the tool via PATH and running it through python.

Refreshes Starknet OS artifacts for the new compiler: updates program_hash.json, bytecode-length expectations, and expands allowed virtual OS program hashes (now 2) with corresponding constraint logic and blockifier versioned constants.

Aligns resource accounting with the new outputs by retuning Blake-based CASM hash step estimation constants and updating compiled-class-hash test expectations; removes the SetSiblings Patricia hint and drops it from hint enums/coverage fixtures.

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

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 1 comment.
Reviewable status: 0 of 73 files reviewed, 1 unresolved discussion (waiting on Yoni-Starkware).


crates/apollo_infra_utils/src/cairo0_compiler.rs line 36 at r1 (raw file):

        })
    })
}

this and related changes are required because cairo-lang scripts (cairo-compile, etc) have a #!python shebang, which apparently does not respect the PATH variable and therefore does not necessarily find the python used in the venv. cairo-compile --version fails, but python ~/workspace/sequencer/sequencer_venv/.../cairo-compile --version does.

Code quote:

fn find_script_in_path(script_name: &str) -> Option<PathBuf> {
    std::env::var_os("PATH").and_then(|paths| {
        std::env::split_paths(&paths).find_map(|dir| {
            let candidate = dir.join(script_name);
            candidate.exists().then_some(candidate)
        })
    })
}

Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 1 comment.
Reviewable status: 0 of 73 files reviewed, 2 unresolved discussions (waiting on Yoni-Starkware).


crates/blockifier/resources/blockifier_versioned_constants_0_14_3.json line 70 at r1 (raw file):

    "os_constants": {
        "allowed_virtual_os_program_hashes": [
            "0x39f55918423cade9e95a6a52286b56bed1c5c9b6fe39aa00301361457a3c604"

we don't want to allow old hash? or do we?

Code quote:

 "0x39f55918423cade9e95a6a52286b56bed1c5c9b6fe39aa00301361457a3c604"

@dorimedini-starkware dorimedini-starkware force-pushed the dori-update-cairo-lang-0.14.3a1 branch 2 times, most recently from 2c74af7 to 6227306 Compare May 11, 2026 17:49
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 1 comment.
Reviewable status: 0 of 75 files reviewed, 3 unresolved discussions (waiting on Yoni-Starkware).


crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/constants.cairo line 69 at r2 (raw file):

// Allowed virtual OS program hashes for client-side proving.
const ALLOWED_VIRTUAL_OS_PROGRAM_HASHES_0 = (
    0x039f55918423cade9e95a6a52286b56bed1c5c9b6fe39aa00301361457a3c604

we don't want to allow old hash? or do we?

Code quote:

0x039f55918423cade9e95a6a52286b56bed1c5c9b6fe39aa00301361457a3c604

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 72 files and all commit messages, and made 2 comments.
Reviewable status: 72 of 75 files reviewed, 3 unresolved discussions (waiting on dorimedini-starkware).


crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/constants.cairo line 69 at r2 (raw file):

Previously, dorimedini-starkware wrote…

we don't want to allow old hash? or do we?

Oh, as long as the prev hash isn't breaking anything - we do want to keep it. You need to append the new hash


crates/blockifier/resources/blockifier_versioned_constants_0_14_3.json line 70 at r1 (raw file):

Previously, dorimedini-starkware wrote…

we don't want to allow old hash? or do we?

We do, please append

@dorimedini-starkware dorimedini-starkware force-pushed the dori-update-cairo-lang-0.14.3a1 branch from 6227306 to f95b681 Compare May 13, 2026 17:11
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 1 comment and resolved 1 discussion.
Reviewable status: 72 of 75 files reviewed, 2 unresolved discussions (waiting on dorimedini-starkware and Yoni-Starkware).


crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/constants.cairo line 69 at r2 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

Oh, as long as the prev hash isn't breaking anything - we do want to keep it. You need to append the new hash

Done.

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 6 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware).

Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

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

Signed-off-by: Dori Medini <dori@starkware.co>
@AvivYossef-starkware AvivYossef-starkware force-pushed the dori-update-cairo-lang-0.14.3a1 branch from f95b681 to dcd17fb Compare May 14, 2026 11:48
Copy link
Copy Markdown
Contributor

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

4 participants