forked from lambdaclass/cairo-vm
-
Notifications
You must be signed in to change notification settings - Fork 2
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
CI tests: CairoPie deserialization #39
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark Results for unmodified programs 🚀
|
odesenfans
force-pushed
the
ml/deserialize-cairo-pie
branch
3 times, most recently
from
January 25, 2024 10:23
0402e81
to
1db8a29
Compare
odesenfans
force-pushed
the
ml/deserialize-cairo-pie
branch
from
January 29, 2024 12:56
e9df408
to
7e3ae3f
Compare
…roof_mode (lambdaclass#1597) * Force an output builtin to be present when running in proof_mode * Vm changes * Minor progress + notes * Append last return value to the output segment in the proof_mode header * remove handling that is confusing/not needed * Extend solution to more than one return value * Remove block of comment * Update comments * Add test that was removed when merged * Skip output builtin in special final stack method * Manually set the output builtin's segment size * Move previous solution to where it is needed * fmt + Improve comments * Restore comment * Improve spelling * Add changelog entry * Restore fuzzer/Cargo.lock
* Add allow_missing_builtins flag and handle it * Add + Update tests * changelog * Add doc comment for initialize_builtins * Extend CLI documentation * Update changelog * Update code behind feature flags * Update tests * Update tests * Fix * Fix * Fix * fmt
* Create a cairo_run for cairo1-run crate + Refactor cairo1 execution into different functions * Clippy * Merge imports + Impl Default for Cairo1RunConfig * Remove allow unused imports * Add changelog entry * Use FuncArg slice instead of FuncArgs wrapper in public api * Update changelog
…urn values when running in proof-mode (lambdaclass#1602) * Create a cairo_run for cairo1-run crate + Refactor cairo1 execution into different functions * Clippy * Test first draft * Merge imports + Impl Default for Cairo1RunConfig * Remove allow unused imports * Fix test * Add a case for each test file * Improve test * Clippy * Add changelog entry * Use FuncArg slice instead of FuncArgs wrapper in public api * Update changelog * remove test case for ghost file * Fix misleading comment
…bdaclass#1614) * Use locked dependencies to install cargo-nextest * Also lock wasm-pack
* Update rust version to 1.74.1 * cargo fmt -all * Update Makefile * cargo clippy --fix * fix cargo clippy * restore fuzzer/Cargo.lock --------- Co-authored-by: Pedro Fontana <[email protected]>
* Update cairo-lang version to 2.5.3 * Fix cairo programs * Update rust changes * update CHANGELOG.md * typo * Fix array_append.cairo program * Update rust version to 1.74.1 * cargo fmt -all * Update Makefile * cargo clippy --fix * fix cargo clippy * restore fuzzer/Cargo.lock * restore cairo1-run * restore cairo programs * Restore Makefile * Restore cairo1-run/Makefile * restore vm/src/tests/cairo_1_run_from_entrypoint_tests.rs * Revert "restore cairo programs" This reverts commit d3c9836. * Update cairo1-run crate * Revert "restore vm/src/tests/cairo_1_run_from_entrypoint_tests.rs" This reverts commit 4212f1e. * fix uint256_div_mod entrypoint --------- Co-authored-by: Pedro Fontana <[email protected]>
* change felt for maybe relocatable * add changelog and improve code * Add unit test * cippy --------- Co-authored-by: Pedro Fontana <[email protected]>
Updates the README file to reflect the migration of Cairo VM to the latest implementation in Rust.
…ss#1619) * Add docs label to changelog workflow skiplist * Update changelog.yml --------- Co-authored-by: Pedro Fontana <[email protected]>
* Update hint_processor docs * Remove unecessary comma * Update README.md
* Replace symlinks with script * Add target to deps * Create symlimks in workflow * Remove script * Simplify * Debug * Try * Reorder targets * Try fix * Use gitkeep to push proof_programs directory * restore command * Change target name * Restore * Update workflow * Always build symlinks * Create symlinks before fetching from cache * Create symlinks before fetching from cache before computing traces * Create symlinks before fetching from cache before running comparisons * Remove new symlinks * Create symlinks before fetching from cache clippy * Use artifacts to ensure ther eis no hash mismatch when retrieving files * Fix
Co-authored-by: Pedro Fontana <[email protected]>
* Impl Display for MemorySegmentManager * Remove old code + Add changelog entry * Fix * fmt * Update test --------- Co-authored-by: Pedro Fontana <[email protected]>
Problem: the Python VM generates Cairo PIEs as ZIP archives containing several JSON files and the memory as a binary file. We do not have a solution yet to deserialize these files into CairoPie objects. Solution: add a new `CairoPie::from_file(path)` method that reads the ZIP file and extracts its contents.
Added a `from_bytes` class method to build a `CairoPie` method in addition to the existing `from_file` method.
Problem: Deserializing the PIE additional data as a hashmap of `BuiltinAdditionalData` enums because of an issue with deserializing untagged unions in `serde` (see serde-rs/json#1103). Solution: add a new `AdditionalData` struct with explicit fields for each builtin, circumventing the untagged union issue. This solution has the advantage of always associating the correct data type for each builtin (it's not possible anymore to associate a builtin with a different data type), but requires modifications if a new builtin is added.
Problem: the ECDSA/signature builtin additional data is stored internally as a hashmap, but the Python VM stores it as a vector of tuples. Solution: Add a `SignatureBuiltinAdditionalData` struct and implement a custom deserializer for it that can take either a hashmap or a vector.
odesenfans
force-pushed
the
ml/deserialize-cairo-pie
branch
from
February 21, 2024 23:24
9e4c8b7
to
5d569c6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TITLE
Description
Description of the pull request changes and motivation.
Checklist