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

chore(cairo_native): allow disabling native compilation in the contract class manager #2703

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

avi-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

github-actions bot commented Dec 16, 2024

@avi-starkware avi-starkware force-pushed the avi/compilation-thread/add-config branch from b6bffd0 to 49520e2 Compare December 16, 2024 15:13
@avi-starkware avi-starkware changed the title Allow disabling native compilation in the contract class manager chore(cairo_native): allow disabling native compilation in the contract class manager Dec 16, 2024
Copy link
Contributor

@meship-starkware meship-starkware 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 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avi-starkware and @noaov1)


crates/blockifier/src/state/contract_class_manager.rs line 103 at r1 (raw file):

    pub fn set_casm(&self, class_hash: ClassHash, compiled_class: RunnableCompiledClass) {
        self.contract_caches.set_casm(class_hash, compiled_class);
    }

Why do we need the set casm function?

Code quote:

    /// Sets the casm compiled class for the given class hash in the cache.
    pub fn set_casm(&self, class_hash: ClassHash, compiled_class: RunnableCompiledClass) {
        self.contract_caches.set_casm(class_hash, compiled_class);
    }

Copy link
Contributor

@meship-starkware meship-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 @avi-starkware and @noaov1)

Copy link
Collaborator

@noaov1 noaov1 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 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avi-starkware)

Copy link
Collaborator Author

@avi-starkware avi-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 @meship-starkware)


crates/blockifier/src/state/contract_class_manager.rs line 103 at r1 (raw file):

Previously, meship-starkware (Meshi Peled) wrote…

Why do we need the set casm function?

When just getting the casm and not using sierra to native compilation (e.g., when using cairo 0, or when native compilation is disabled).

We need to be able to use the casm cache directly as a normal cache - setting the value obtained from the state when it couldn't be found in cache.

@avi-starkware avi-starkware merged commit aa71cff into main Dec 17, 2024
11 of 20 checks passed
@avi-starkware avi-starkware deleted the avi/compilation-thread/add-config branch December 17, 2024 09:28
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
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