Skip to content

feat(blockifier_test_utils): download compilers (async), then recompile all (async)#5591

Merged
dorimedini-starkware merged 1 commit into
mainfrom
04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_
May 4, 2025
Merged

feat(blockifier_test_utils): download compilers (async), then recompile all (async)#5591
dorimedini-starkware merged 1 commit into
mainfrom
04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_

Conversation

@dorimedini-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@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:20
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_make_compiler_download_async branch from 1aff9c9 to 0298cd7 Compare April 5, 2025 12:28
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 36086a9 to fd4287c Compare April 5, 2025 12:28
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_make_compiler_download_async branch from 0298cd7 to 5b2776c Compare April 5, 2025 12:35
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from fd4287c to 0f49e79 Compare April 5, 2025 12:35
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_make_compiler_download_async branch from 5b2776c to 8fa5cc8 Compare April 5, 2025 12:44
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch 2 times, most recently from 1a039dc to 0d3a6b2 Compare April 5, 2025 19:45
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-05-feat_blockifier_test_utils_make_compiler_download_async to 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code April 5, 2025 19:45

@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 1 files reviewed, all discussions resolved (waiting on @elintul and @noaov1)


crates/blockifier_test_utils/tests/feature_contracts_compatibility_test.rs line 101 at r1 (raw file):

                FeatureContract::cairo1_feature_contracts_by_version()
            {
                for contract in feature_contracts

note that now we don't recompile in 3 batches (one batch per compiler version) - all are compiled in parallel, using different binaries.

Code quote:

            for (_version, feature_contracts) in
                FeatureContract::cairo1_feature_contracts_by_version()
            {
                for contract in feature_contracts

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from e33bc43 to d3f24fb Compare April 7, 2025 07:39
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 0d3a6b2 to a4c748e Compare April 7, 2025 07:40
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from d3f24fb to 6c29882 Compare April 7, 2025 07:58
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from a4c748e to 713eb0f Compare April 7, 2025 07:58
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 5eac26f to db45bc6 Compare April 26, 2025 15:49
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from 4ffc4b2 to 6b1f228 Compare April 27, 2025 10:30
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from db45bc6 to faa20ee Compare April 27, 2025 10:30
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from 6b1f228 to f23bb3a Compare April 27, 2025 14:34
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from faa20ee to 11764db Compare April 27, 2025 14:34
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from f23bb3a to 28c60e3 Compare April 27, 2025 14:36
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 11764db to e1d6c08 Compare April 27, 2025 14:37
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from 28c60e3 to 00ab8b3 Compare April 27, 2025 16:26
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from e1d6c08 to 1e5ef75 Compare April 27, 2025 16:26
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from 00ab8b3 to c1af191 Compare April 28, 2025 09:20
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 1e5ef75 to cf18b14 Compare April 28, 2025 09:20
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from c1af191 to 50276e0 Compare April 29, 2025 08:13
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from cf18b14 to 7db5892 Compare April 29, 2025 08:13
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from 50276e0 to d4a2855 Compare April 29, 2025 08:55
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 7db5892 to 072e5b8 Compare April 29, 2025 08:55
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code branch from d4a2855 to 3772f92 Compare April 29, 2025 09:26
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch 2 times, most recently from 5ca6083 to a73fb50 Compare April 29, 2025 11:33
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-05-chore_blockifier_test_utils_delete_tag-and-toolchain_related_code to main April 29, 2025 11:33
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from a73fb50 to 2aa42db Compare May 1, 2025 09:47

@TzahiTaub TzahiTaub 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 all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @elintul and @noaov1)


crates/blockifier_test_utils/tests/feature_contracts_compatibility_test.rs line 95 at r2 (raw file):

            info!("Done spawning tasks for package downloads. Awaiting them...");
            download_task_set.join_all().await;
            info!("Done downloading packages.");

I think the logs will be confusing. We will get a "spawning" log and "done downloading" log even if all packages existed and we didn't download anything. I see the download_cairo_package has its own "Downloading" log, so I think we can just remove all of the logs in the current function. Optionally, we can collect the versions and print them once - something like:

Suggestion:

            {
                download_task_set.spawn(async move { verify_cairo1_package(&version).await });
            }
            info!("Verifying Cairo1 packages for versions {}.", FeatureContract::cairo1_feature_contracts_by_version().keys());
            download_task_set.join_all().await;
            info!("Cairo1 packages verified");
            

@TzahiTaub TzahiTaub 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 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware, @elintul, and @noaov1)

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_download_compilers_async_then_recompile_all_async_ branch from 2aa42db to d95686c Compare May 4, 2025 13:02

@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 1 files reviewed, 1 unresolved discussion (waiting on @elintul, @noaov1, and @TzahiTaub)


crates/blockifier_test_utils/tests/feature_contracts_compatibility_test.rs line 95 at r2 (raw file):

Previously, TzahiTaub (Tzahi) wrote…

I think the logs will be confusing. We will get a "spawning" log and "done downloading" log even if all packages existed and we didn't download anything. I see the download_cairo_package has its own "Downloading" log, so I think we can just remove all of the logs in the current function. Optionally, we can collect the versions and print them once - something like:

Done.

@TzahiTaub TzahiTaub 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 1 files at r3, 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 May 4, 2025
Merged via the queue into main with commit 2aa66b5 May 4, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 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