Skip to content

chore(blockifier_test_utils): implement download_cairo_package#5585

Merged
dorimedini-starkware merged 3 commits into
mainfrom
04-05-chore_blockifier_test_utils_implement_download_cairo_package
Apr 20, 2025
Merged

chore(blockifier_test_utils): implement download_cairo_package#5585
dorimedini-starkware merged 3 commits into
mainfrom
04-05-chore_blockifier_test_utils_implement_download_cairo_package

Conversation

@dorimedini-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

dorimedini-starkware commented Apr 5, 2025

Copy link
Copy Markdown
Collaborator Author

@github-actions

github-actions Bot commented Apr 5, 2025

Copy link
Copy Markdown

@dorimedini-starkware dorimedini-starkware self-assigned this Apr 5, 2025
@dorimedini-starkware dorimedini-starkware marked this pull request as ready for review April 5, 2025 12:19
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from f74a30c to 149d96d Compare April 5, 2025 12:28
@github-actions

github-actions Bot commented Apr 5, 2025

Copy link
Copy Markdown

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.698 ms 35.207 ms 35.791 ms]
change: [+1.4532% +3.0617% +4.8658%] (p = 0.00 < 0.05)
Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
2 (2.00%) high mild
10 (10.00%) high severe

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from 149d96d to 46d1295 Compare April 5, 2025 19:45
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from 46d1295 to f6f5df6 Compare April 7, 2025 07:38

@giladchase giladchase left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r1.
Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on @elintul and @noaov1)


crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):

cairo_native = []

[dependencies]

If you want, I think you can Command curl and tar, since we already guarantee through dependencies.sh that the former is installed, and the latter is installed by default.
Motivation: three new deps might be a bit pricey for a test-utils crate (that other crates require during testing), especially if they're single use. Using curl/tar should keep compilation-time unchanged,

@github-actions

github-actions Bot commented Apr 7, 2025

Copy link
Copy Markdown

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [35.052 ms 35.521 ms 36.071 ms]
change: [+2.1391% +3.6462% +5.2411%] (p = 0.00 < 0.05)
Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
5 (5.00%) high mild
8 (8.00%) high severe

full_committer_flow performance regressed!
full_committer_flow time: [30.667 ms 30.765 ms 30.903 ms]
change: [+1.1056% +1.4693% +1.9070%] (p = 0.00 < 0.05)
Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high severe

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from f6f5df6 to e81d559 Compare April 7, 2025 07:57

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on @elintul and @noaov1)


crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):

Previously, giladchase wrote…

If you want, I think you can Command curl and tar, since we already guarantee through dependencies.sh that the former is installed, and the latter is installed by default.
Motivation: three new deps might be a bit pricey for a test-utils crate (that other crates require during testing), especially if they're single use. Using curl/tar should keep compilation-time unchanged,

IDK, using rust crates at least looks cleaner; and shouldn't we be writing towards the glorious day when we build a single project and run all tests once, with good caching?

@dorimedini-starkware dorimedini-starkware force-pushed the 04-04-chore_blockifier_test_utils_split_functions_between_tag_and_version_string branch from 3649dea to 9561130 Compare April 7, 2025 09:15
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from e81d559 to 091fd64 Compare April 7, 2025 09:15

@RoeiE-starkware RoeiE-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @giladchase, and @noaov1)


crates/blockifier_test_utils/src/cairo_compile.rs line 67 at r4 (raw file):

    let filename = "release-x86_64-unknown-linux-musl.tar.gz";
    let package_url =
        format!("https://github.com/starkware-libs/cairo/releases/download/v{version}/{filename}");

As this can be a general function to download artifacts from GH, I think package_url, filename and maybe directory should be input parameters and not constants.

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @giladchase, @noaov1, and @RoeiE-starkware)


crates/blockifier_test_utils/src/cairo_compile.rs line 67 at r4 (raw file):

Previously, RoeiE-starkware wrote…

As this can be a general function to download artifacts from GH, I think package_url, filename and maybe directory should be input parameters and not constants.

in this context it is highly specific to cairo packages; only the cairo compiler version should be input.
a "general url" util would be unsafe, no?
where else in our code do we download files via URL? if we have other locations I can share code

@giladchase giladchase left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @noaov1, and @RoeiE-starkware)


crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):

Previously, dorimedini-starkware wrote…

IDK, using rust crates at least looks cleaner; and shouldn't we be writing towards the glorious day when we build a single project and run all tests once, with good caching?

Can you clr this with Lior? AFAIK he's against single-use ext deps, and here each dep is 1/3-use 😅

Also, it's not just about compilation caching, there is also:

  1. potential for breakage (which does happen on cargo due to semver adherenece)
  2. linking time: we area already forced to use lld due to our irregularly inflated dep-tree, we want to minimize the issue and hopefully not have to use this linker anymore (until it's added to stable rust I guess).

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @giladchase, @noaov1, and @RoeiE-starkware)


crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):

Previously, giladchase wrote…

Can you clr this with Lior? AFAIK he's against single-use ext deps, and here each dep is 1/3-use 😅

Also, it's not just about compilation caching, there is also:

  1. potential for breakage (which does happen on cargo due to semver adherenece)
  2. linking time: we area already forced to use lld due to our irregularly inflated dep-tree, we want to minimize the issue and hopefully not have to use this linker anymore (until it's added to stable rust I guess).

Lior is in favor of curl + tar, making the change :)

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from 091fd64 to ca9d63c Compare April 9, 2025 11:56
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-04-chore_blockifier_test_utils_split_functions_between_tag_and_version_string to main April 9, 2025 11:56
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch 3 times, most recently from cf514cc to cacd63d Compare April 9, 2025 14:55

@giladchase giladchase left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 3 files at r1, 2 of 2 files at r5.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @noaov1, and @RoeiE-starkware)

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from cacd63d to d39f64f Compare April 12, 2025 13:03

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewed 2 of 3 files at r9, 1 of 1 files at r10, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @elintul and @noaov1)

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from d39f64f to b6d57b7 Compare April 18, 2025 10:22
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_implement_download_cairo_package branch from b6d57b7 to be64508 Compare April 18, 2025 10:25

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewed 2 of 3 files at r12, 1 of 1 files at r13, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @elintul and @noaov1)

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue Apr 20, 2025
Merged via the queue into main with commit 977fd0b Apr 20, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 2025
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.

4 participants