apollo_infra_utils,apollo_compile_to_native: add compiler version text files#13671
Conversation
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on avi-starkware).
crates/apollo_compile_to_native/src/constants.rs line 7 at r1 (raw file):
pub(crate) const CAIRO_NATIVE_BINARY_NAME: &str = "starknet-native-compile"; pub const REQUIRED_CAIRO_NATIVE_VERSION: &str =
this (and the other constant) are already verified to match the respective crate version in our root Cargo.toml, right?
Code quote:
pub const REQUIRED_CAIRO_NATIVE_VERSION: &str =|
Previously, dorimedini-starkware wrote…
Yes. The version was just moved to a txt file instead of the const. Additionally, the version test would have failed if the version was not consistent with the Cargo.toml |
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware made 1 comment and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on avi-starkware).
1c9cbc1 to
6562e53
Compare
|
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. |
6562e53 to
a80bb64
Compare
PR SummaryLow Risk Overview Updates test documentation to clarify that the pinned Cargo dependency version and the externally-installed compiler binary version are managed independently and must remain in sync. Reviewed by Cursor Bugbot for commit e2d42bf. Bugbot is set up for automated code reviews on this repo. Configure here. |
a80bb64 to
f5db659
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on avi-starkware).
a discussion (no related file):
please rebase over main
f5db659 to
fd8628c
Compare
|
Semgrep found 1 Risk: Affected versions of ecdsa are vulnerable to Minerva timing attack (side-channel) when using the NIST P-256 curve. Using the Manual Review Advice: A vulnerability from this advisory is reachable if you expose the library in a way that allows an attacker to measure how long it takes to generate a key pair or sign a message through a side-channel. Examples include but are not limited to an attacker being able to run code on the same physical machine in which key pair generation or signing is taking place (this includes virtual machines), an attacker being able to measure how much power your computer uses during key pair generation or signing, and an attacker being able to measure RF interference coming from your computer during key pair generation or signing. Fix: There are no safe versions of this library available for upgrade. Library included at sequencer/scripts/requirements.txt:17. Reference(s): GHSA-wj6h-64fc-37mp, CVE-2024-23342 |
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on avi-starkware).
|
Triaged: pre-existing transitive dep (via |
…t files Create plain text files containing compiler binary versions as the single source of truth. Rust constants now use include_str!().trim_ascii_end() to read from these files. Shell scripts and Dockerfiles will read them with cat in a follow-up. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on avi-starkware).
fd8628c to
e2d42bf
Compare
avi-starkware
left a comment
There was a problem hiding this comment.
@avi-starkware made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on avi-starkware).
a discussion (no related file):
Previously, dorimedini-starkware wrote…
please rebase over
main
Done.
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on avi-starkware).

Create plain text files containing compiler binary versions as the single
source of truth. Rust constants now use include_str!().trim_ascii_end()
to read from these files. Shell scripts and Dockerfiles will read them
with cat in a follow-up.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Note
Low Risk
Low risk: only changes how version constants are sourced (from embedded text files) without altering compiler selection logic or runtime behavior beyond build-time string loading.
Overview
Centralizes Cairo compiler version pins by moving the hardcoded Rust string constants into plain
.txtfiles and embedding them viainclude_str!(...).trim_ascii_end().This makes
REQUIRED_CAIRO_NATIVE_VERSIONandCAIRO1_COMPILER_VERSIONderive from file contents, enabling other tooling (e.g., scripts/Dockerfiles) to reuse the same version source going forward.Reviewed by Cursor Bugbot for commit 6562e53. Bugbot is set up for automated code reviews on this repo. Configure here.