Skip to content

feat(blockifier_test_utils): migrate to new cairo recompilation logic#5588

Merged
dorimedini-starkware merged 1 commit into
mainfrom
04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic
Apr 28, 2025
Merged

feat(blockifier_test_utils): migrate to new cairo recompilation logic#5588
dorimedini-starkware merged 1 commit into
mainfrom
04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Collaborator Author

dorimedini-starkware commented Apr 5, 2025

@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-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile branch from 970ad50 to cbca1cd Compare April 5, 2025 12:28
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 4d15216 to cd6ba5d Compare April 5, 2025 12:28
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile branch from cbca1cd to 342b7ed Compare April 5, 2025 12:44
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from cd6ba5d to b10fe33 Compare April 5, 2025 12:44
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile branch from 342b7ed to 03fe325 Compare April 5, 2025 19:45
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from b10fe33 to 6bac67e Compare April 5, 2025 19:45
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile to 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package April 5, 2025 19:45
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from 9360392 to ffeddb7 Compare April 7, 2025 07:39
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 6bac67e to d9b4954 Compare April 7, 2025 07:39
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from ffeddb7 to 207ca73 Compare April 7, 2025 07:58
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from d9b4954 to a1489d6 Compare April 7, 2025 07:58
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from 207ca73 to 19e7afc Compare April 7, 2025 09:16
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from a1489d6 to 456f44a Compare April 7, 2025 09:16
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 6725d67 to fdea480 Compare April 9, 2025 12:00
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from 2f62080 to d81ab93 Compare April 9, 2025 14:48
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from fdea480 to 01166c1 Compare April 9, 2025 14:48
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from d81ab93 to 9fb4a72 Compare April 9, 2025 14:55
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 01166c1 to 0175fb1 Compare April 9, 2025 14:56
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from 9fb4a72 to c5aefbf Compare April 12, 2025 13:03
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 0175fb1 to ad45fc6 Compare April 12, 2025 13:03
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from c5aefbf to fa11520 Compare April 18, 2025 10:22
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from ad45fc6 to 807de22 Compare April 18, 2025 10:22
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package branch from fa11520 to fc85104 Compare April 18, 2025 10:25
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 807de22 to a5cc203 Compare April 18, 2025 10:25
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from a5cc203 to 00aa036 Compare April 26, 2025 15:18
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-05-chore_blockifier_test_utils_split_check_from_verify_of_cairo1_package to 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile April 26, 2025 15:19
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile branch from 61ac940 to f5d805b Compare April 27, 2025 10:30
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 00aa036 to 0554501 Compare April 27, 2025 10:30
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile branch from f5d805b to 8815395 Compare April 27, 2025 14:34
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from 0554501 to f2e7d76 Compare April 27, 2025 14:34
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile branch from 8815395 to 08e5606 Compare April 27, 2025 14:36
@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch 2 times, most recently from c199564 to f7d07d3 Compare April 27, 2025 16:26
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-05-chore_blockifier_test_utils_extract_logic_into_starknet_sierra_compile to main April 27, 2025 16:26
Copy link
Copy Markdown
Contributor

@TzahiTaub TzahiTaub left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @elintul, @giladchase, and @noaov1)


crates/blockifier_test_utils/src/cairo_compile.rs line 137 at r2 (raw file):

    let (tag, _cairo_repo_path) = get_tag_and_repo_file_path(git_tag_override);
    let version = tag.strip_prefix("v").unwrap().to_string();
    assert!(cairo1_package_exists(&version));

Why aren't you calling verify_cairo1_package instead? Is making this function async a problem?

Code quote:

 assert!(cairo1_package_exists(&version));

crates/blockifier_test_utils/src/cairo_compile.rs line 153 at r2 (raw file):

/// Compiles Cairo1 Contract into their Sierra version using the given compiler version.
/// Assumes the relevant compiler version is already downloaded.

Suggestion:

/// Compiles Cairo1 contracts into their Sierra version using the given compiler version.
/// Assumes the relevant compiler version was already downloaded.

crates/blockifier_test_utils/src/cairo_compile.rs line 163 at r2 (raw file):

/// Compiles Sierra code into CASM using the given compiler version.
/// Assumes the relevant compiler version is already downloaded.

Suggestion:

version was already downloaded.

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

                    .unwrap()
                    .to_string();
                verify_cairo1_package(&version).await;

If you add this to the code in the other file it can be removed from here.

Code quote:

 verify_cairo1_package(&version).await;

@dorimedini-starkware dorimedini-starkware force-pushed the 04-05-feat_blockifier_test_utils_migrate_to_new_cairo_recompilation_logic branch from f7d07d3 to 924cf4e Compare April 28, 2025 09:20
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.

Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @elintul, @giladchase, @noaov1, and @TzahiTaub)


crates/blockifier_test_utils/src/cairo_compile.rs line 137 at r2 (raw file):

Previously, TzahiTaub (Tzahi) wrote…

Why aren't you calling verify_cairo1_package instead? Is making this function async a problem?

  1. yes
  2. the package is verified before calling this function

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

Previously, TzahiTaub (Tzahi) wrote…

If you add this to the code in the other file it can be removed from here.

I don't want to make the compile function async


crates/blockifier_test_utils/src/cairo_compile.rs line 153 at r2 (raw file):

/// Compiles Cairo1 Contract into their Sierra version using the given compiler version.
/// Assumes the relevant compiler version is already downloaded.

Done.


crates/blockifier_test_utils/src/cairo_compile.rs line 163 at r2 (raw file):

/// Compiles Sierra code into CASM using the given compiler version.
/// Assumes the relevant compiler version is already downloaded.

Done.

Copy link
Copy Markdown
Contributor

@TzahiTaub TzahiTaub left a comment

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, @giladchase, and @noaov1)

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue Apr 28, 2025
Merged via the queue into main with commit 6b8c345 Apr 28, 2025
13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 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.

3 participants