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

Support for Dynamic Layout #50

Merged
merged 13 commits into from
Feb 7, 2025
Merged

Support for Dynamic Layout #50

merged 13 commits into from
Feb 7, 2025

Conversation

rot256
Copy link
Contributor

@rot256 rot256 commented Jan 29, 2025

Support for Dynamic Layout via the SHARP get_dynamic_params API.

rot256 and others added 7 commits December 14, 2024 14:56
Eliminate the stone-prover-sdk dependency
1. Obtain the execution resources from cairo-vm
2. Call the get_dynamic_params API to
   convert these to a dynamic parameters.
3. Replace the dynamic parameters in the air_public_input
   before running stone
@rot256
Copy link
Contributor Author

rot256 commented Jan 29, 2025

The current code fails to build with:

error[E0432]: unresolved import `crate::utils::process_args`
 --> src/cairo.rs:2:52
  |
2 | use crate::utils::{get_formatted_air_public_input, process_args, FileWriter};
  |                                                    ^^^^^^^^^^^^ no `process_args` in `utils`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `stone-cli` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@rot256
Copy link
Contributor Author

rot256 commented Jan 29, 2025

I believe this PR also subsumes #30 ?

@rot256
Copy link
Contributor Author

rot256 commented Jan 30, 2025

I managed to get this working as follows:

  1. Download the corelib:
git clone --depth=1 -b v2.10.0-rc.0 https://github.com/starkware-libs/cairo.git \
	&& mv cairo/corelib/ . \
	&& rm -rf cairo/
  1. Run the stone-cli:
SHARP_CLIENT_CERT=~/src/sharp-cert/user.crt SHARP_KEY_PATH=~/src/sharp-cert/user.key RUST_MIN_STACK=104857600 cargo run -- prove --layout automatic --cairo_program examples/pedersen_example.cairo --stone_version v6

This is going to ask to you:

Enter the password for the SHARP key:

Alternatively you can set the enviroment variable SHARP_KEY_PASSWD and avoid the stone-cli asking for the password.

@mellowcroc mellowcroc changed the title WIP: Support for Dynamic Layout Support for Dynamic Layout Feb 7, 2025
@mellowcroc mellowcroc merged commit a5937a6 into main Feb 7, 2025
2 checks passed
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