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

reverted cairo pie handling change #351

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ohad-starkware
Copy link
Contributor

@ohad-starkware ohad-starkware commented Jan 13, 2025

This change is Reviewable

Copy link
Contributor Author

ohad-starkware commented Jan 13, 2025

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

@ohad-starkware ohad-starkware self-assigned this Jan 13, 2025
@ohad-starkware ohad-starkware force-pushed the ohad/fix_cairo_run_from_pie branch 2 times, most recently from b564a3a to 0d0cc27 Compare January 13, 2025 17:08
Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ohad-starkware and @YairVaknin-starkware)


stwo_cairo_prover/crates/utils/Cargo.toml line 7 at r1 (raw file):

[dependencies]
cairo-vm = { git = "https://github.com/lambdaclass/cairo-vm", rev = "83bfdcf", features = [

why do you pin a specific commit?
(it's actually the same commit in workspace)

Copy link
Contributor Author

@ohad-starkware ohad-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 @YairVaknin-starkware and @yuvalsw)


stwo_cairo_prover/crates/utils/Cargo.toml line 7 at r1 (raw file):

Previously, yuvalsw wrote…

why do you pin a specific commit?
(it's actually the same commit in workspace)

fixed

@ohad-starkware ohad-starkware force-pushed the ohad/fix_cairo_run_from_pie branch from 0d0cc27 to 73b7c1c Compare January 13, 2025 17:21
Copy link
Collaborator

@yuvalsw yuvalsw 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 r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ohad-starkware and @YairVaknin-starkware)


stwo_cairo_prover/crates/utils/Cargo.toml line 7 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

fixed

why the addition of default features?

Copy link
Contributor Author

@ohad-starkware ohad-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 @YairVaknin-starkware and @yuvalsw)


stwo_cairo_prover/crates/utils/Cargo.toml line 7 at r1 (raw file):

Previously, yuvalsw wrote…

why the addition of default features?

default features = std
im taking it without default features in the workspace, and getting the std stuff here because we need to read cairo pies

Copy link
Contributor Author

@ohad-starkware ohad-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, 2 unresolved discussions (waiting on @YairVaknin-starkware and @yuvalsw)


stwo_cairo_prover/crates/utils/src/vm_utils.rs line 85 at r3 (raw file):

            RunResources::new(pie.execution_resources.n_steps),
        );
        cairo_run::cairo_run_pie(&pie, &cairo_run_config, &mut hint_processor)

this code should also be hidden behind a default feature flag
it will break wasm support, because utils crate defines the CairoVmError type

@ohad-starkware ohad-starkware force-pushed the ohad/fix_cairo_run_from_pie branch from 73b7c1c to b6eb856 Compare January 14, 2025 09:33
Copy link
Collaborator

@yuvalsw yuvalsw 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 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ohad-starkware and @YairVaknin-starkware)


stwo_cairo_prover/crates/utils/src/vm_utils.rs line 85 at r3 (raw file):

Previously, ohad-starkware (Ohad) wrote…

this code should also be hidden behind a default feature flag
it will break wasm support, because utils crate defines the CairoVmError type

I think this is irrelevant per our last discussion, right?
the prover crate is the only one wasm-friendly, and it doesn't depend on this crate, right?


stwo_cairo_prover/Cargo.toml line 26 at r4 (raw file):

cairo-vm = { git = "https://github.com/lambdaclass/cairo-vm", rev = "83bfdcf", features = [
    "mod_builtin",
], default-features = true }

This is the default, right? Can be omitted (unless you want it to be explicit which makes sense). Up to you.

Code quote:

default-features = true

stwo_cairo_prover/crates/prover/Cargo.toml line 15 at r4 (raw file):

bytemuck.workspace = true
cairo-lang-casm.workspace = true
cairo-vm = { workspace = true, default-features = false }

Please just explain this is for wasm support / no std.

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