Skip to content

Conversation

@dorimedini-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator Author

dorimedini-starkware commented Jun 3, 2025

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

@dorimedini-starkware dorimedini-starkware self-assigned this Jun 3, 2025
@dorimedini-starkware dorimedini-starkware marked this pull request as ready for review June 3, 2025 12:03
@github-actions
Copy link

github-actions bot commented Jun 3, 2025

Benchmark movements: No major performance changes detected.

Copy link
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 r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 21 at r1 (raw file):

}

fn unknown_hints_for_program(program: &Program, filter: &HashSet<&str>) -> HashSet<String> {

Please doc (this arg specifically), and consider renaming

Suggestion:

ignored_hints: &HashSet<&str>

crates/starknet_os/src/hints/enum_definition_test.rs line 27 at r1 (raw file):

        .iter_hints()
        .map(|hint| hint.code.clone())
        .filter(|hint_str| !filter.contains(hint_str.as_str()))

Can you use a filter_map and avoide the hint code cloning for the filter set?

Code quote:

        .map(|hint| hint.code.clone())
        .filter(|hint_str| !filter.contains(hint_str.as_str()))

crates/starknet_committer_and_os_cli/src/os_cli/tests/python_tests.rs line 97 at r1 (raw file):

}

fn vm_hints() -> HashSet<&'static str> {

Delete this as well in your TODO (maybe move it upwards so it will be together with the rest of the code for deletion).

Code quote:

fn vm_hints() -> HashSet<&'static str> {

@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch from 93979e0 to d7d7284 Compare June 3, 2025 13:45
Copy link
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: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)


crates/starknet_committer_and_os_cli/src/os_cli/tests/python_tests.rs line 97 at r1 (raw file):

Previously, TzahiTaub (Tzahi) wrote…

Delete this as well in your TODO (maybe move it upwards so it will be together with the rest of the code for deletion).

stale


crates/starknet_os/src/hints/enum_definition_test.rs line 21 at r1 (raw file):

Previously, TzahiTaub (Tzahi) wrote…

Please doc (this arg specifically), and consider renaming

went with a static set instead


a discussion (no related file):
py side

@dorimedini-starkware dorimedini-starkware force-pushed the 04-14-feat_starknet_os_remove_the_program_from_the_os_runner_inputs branch from dca637c to 6ce1da8 Compare June 3, 2025 15:32
@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch from d7d7284 to de2f617 Compare June 3, 2025 15:32
Copy link
Collaborator

@amosStarkware amosStarkware 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: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)


crates/starknet_os/src/hints/enum_definition_test.rs line 67 at r2 (raw file):

#[test]
fn test_all_hints_are_known() {

maybe we should also verify that all hints are used?

Code quote:

fn test_all_hints_are_known() {

Copy link
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, 1 unresolved discussion (waiting on @dorimedini-starkware and @nimrod-starkware)

@dorimedini-starkware dorimedini-starkware force-pushed the 04-14-feat_starknet_os_remove_the_program_from_the_os_runner_inputs branch from 6ce1da8 to 394fb8f Compare June 4, 2025 14:11
@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch from de2f617 to 2265a80 Compare June 4, 2025 14:11
Copy link
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, 1 unresolved discussion (waiting on @amosStarkware, @nimrod-starkware, and @TzahiTaub)


crates/starknet_os/src/hints/enum_definition_test.rs line 67 at r2 (raw file):

Previously, amosStarkware wrote…

maybe we should also verify that all hints are used?

Done.

@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch from 2265a80 to 63043ed Compare June 4, 2025 14:25
Copy link
Collaborator

@amosStarkware amosStarkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 88 at r3 (raw file):

        .filter(|hint| {
            // Skip syscalls; they do not appear in the OS code.
            !matches!(hint, AllHints::DeprecatedSyscallHint(_))

This means the deprecated syscalls aren't tested in either test, right?
isn't that a problem?

Code quote:

!matches!(hint, AllHints::DeprecatedSyscallHint(_))

Copy link
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: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 88 at r3 (raw file):

Previously, amosStarkware wrote…

This means the deprecated syscalls aren't tested in either test, right?
isn't that a problem?

how would you test them without a flow test?
we could add a test that compiles a cairo0 contract with all syscalls somewhere in it, and then add it's hints to the list of known hints; is that what you mean?

Copy link
Collaborator

@amosStarkware amosStarkware 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: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 88 at r3 (raw file):

Previously, dorimedini-starkware wrote…

how would you test them without a flow test?
we could add a test that compiles a cairo0 contract with all syscalls somewhere in it, and then add it's hints to the list of known hints; is that what you mean?

that sounds good. add a TODO?

Copy link
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: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 88 at r3 (raw file):

Previously, amosStarkware wrote…

that sounds good. add a TODO?

part 1
part 2

Copy link
Collaborator

@amosStarkware amosStarkware 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: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 68 at r4 (raw file):

#[test]
fn test_all_hints_are_known() {

comment here & in test_all_hints_are_used that these tests don't include deprecated syscall hints? non blocking

Code quote:

fn test_all_hints_are_known() {

Copy link
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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)


crates/starknet_os/src/hints/enum_definition_test.rs line 68 at r4 (raw file):

Previously, amosStarkware wrote…

comment here & in test_all_hints_are_used that these tests don't include deprecated syscall hints? non blocking

this test does not care, and the second test includes a comment + there will be explicit tests for the syscalls, so I'm good with how things are

@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch from 63043ed to 4cd582d Compare June 5, 2025 13:02
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-14-feat_starknet_os_remove_the_program_from_the_os_runner_inputs to main-v0.14.0 June 5, 2025 13:02
@github-actions
Copy link

github-actions bot commented Jun 5, 2025

Artifacts upload workflows:

@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch 2 times, most recently from b5cbf8d to ef0e32d Compare June 5, 2025 17:08
@dorimedini-starkware dorimedini-starkware force-pushed the 06-03-test_starknet_os_hint_consistency_test_with_local_program_objects branch from ef0e32d to 168e351 Compare June 8, 2025 08:57
@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue Jun 8, 2025
Merged via the queue into main-v0.14.0 with commit 5b21dc6 Jun 8, 2025
13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 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.

5 participants