Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed FieldElement usages. #5690

Merged
merged 1 commit into from
Jun 2, 2024
Merged

Removed FieldElement usages. #5690

merged 1 commit into from
Jun 2, 2024

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented May 30, 2024

commit-id:eee3e66d


Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.


This change is Reviewable

@ilyalesokhin-starkware
Copy link
Contributor

crates/cairo-lang-runner/src/casm_run/mod.rs line 1796 at r1 (raw file):

            let scalar = get_val(vm, scalar)?;
            let max_x = get_val(vm, max_x)?;
            let x_value = value.floor_div(&NonZeroFelt::from_felt_unchecked(scalar)).min(max_x);

how do you know the scalar is not zero?

Code quote:

NonZeroFelt::from_felt_unchecked(scalar)

@ilyalesokhin-starkware
Copy link
Contributor

crates/cairo-lang-starknet-classes/src/casm_contract_class.rs line 135 at r1 (raw file):

        // Compute total hash by hashing each component on top of the previous one.
        Poseidon::hash_array(&[
            Felt252::from_bytes_be_slice(b"COMPILED_CLASS_V1"),

Do we have a regression test for that?

are you sure it is the same as what we had before?

Code quote:

  Felt252::from_bytes_be_slice(b"COMPILED_CLASS_V1"),

Copy link
Collaborator Author

@orizi orizi 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 7 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware)


crates/cairo-lang-runner/src/casm_run/mod.rs line 1796 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

how do you know the scalar is not zero?

Yes


crates/cairo-lang-starknet-classes/src/casm_contract_class.rs line 135 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

Do we have a regression test for that?

are you sure it is the same as what we had before?

the casm-class hashes did not change.

@orizi orizi force-pushed the pr/orizi/misc/eee3e66d branch from 072f163 to b683ea2 Compare May 30, 2024 11:38
@orizi orizi force-pushed the pr/orizi/misc/2f5d0193 branch from b1b4e11 to df418b0 Compare May 30, 2024 11:38
@ilyalesokhin-starkware
Copy link
Contributor

crates/cairo-lang-runner/src/casm_run/mod.rs line 1796 at r1 (raw file):

Previously, orizi wrote…

Yes

How?

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware 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 7 of 7 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @orizi)

Copy link
Collaborator Author

@orizi orizi 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 @orizi)


crates/cairo-lang-runner/src/casm_run/mod.rs line 1796 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

How?

The hint is called only for non zero scalars.
(It is always a const on the call site of the hint)

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-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 @orizi)

commit-id:eee3e66d
@orizi orizi changed the base branch from pr/orizi/misc/2f5d0193 to main June 2, 2024 09:00
@orizi orizi force-pushed the pr/orizi/misc/eee3e66d branch from b683ea2 to c22e7c5 Compare June 2, 2024 09:00
@orizi orizi enabled auto-merge June 2, 2024 09:07
@orizi orizi added this pull request to the merge queue Jun 2, 2024
Merged via the queue into main with commit 30e36fc Jun 2, 2024
85 checks passed
@orizi orizi deleted the pr/orizi/misc/eee3e66d branch June 10, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants