-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat: enable proof mode in Rust #955
Open
enitrat
wants to merge
9
commits into
main
Choose a base branch
from
feat/enable-proof-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+626
−354
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #955 +/- ##
==========================================
- Coverage 83.87% 82.83% -1.05%
==========================================
Files 64 65 +1
Lines 16725 17032 +307
==========================================
+ Hits 14028 14108 +80
- Misses 2697 2924 +227
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f986d44
to
4abae08
Compare
4abae08
to
f062f07
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.
PR: Integrate Rust Cairo VM Runner with Proof Mode into Python Testing Framework
Closes #952
Closes #960
Overview
This pull request further pushed the functional parity between the Rust-based Cairo VM runner (
PyCairoRunner
) and the existing Python VM runner (run_python_vm
) by adding support for Proof Mode.Key changes include a refactored
runner.py
file with an 8-step structure, mirrored in both vm runs, extended Rust bindings inrunner.rs
.Changes
Refactored
run_rust_vm
inrunner.py
run_python_vm
for consistency and maintainability.build_entrypoint
.RustCairoRunner
, supporting proof mode and layout configuration.gen_arg_builder
for type conversion.run_until_pc
with exception handling and coverage support.read_return_values
, proof mode updates, and security verification.write_binary_trace
,write_binary_memory
).Serde
, matching Python VM behavior.run_python_vm
, while respecting Rust’s proof mode handling. Bothjmp rel 0
"hacks" are applied to both vm runs.Enhanced
PyCairoRunner
inrunner.rs
initialize_vm
to not handle stack setup, which is now handled in python.run_until_pc
,verify_auto_deductions
,read_return_values
,verify_secure_runner
,relocate
, to be closer from the python vm runnerinitial_pc
,initial_ap
,initial_fp
,program_base
,execution_base
,ap
,relocated_trace
,trace_df
.finalize_segments
,write_binary_trace
,write_binary_memory
,update_execution_public_memory
.write_binary_air_public_input
andwrite_binary_air_private_input
for Rust-native AIR file generation (per your decision to retain the Rust approach).Rationale
run_rust_vm
behaves likerun_python_vm
, easing contributor onboarding and maintenance by clearly defining the rational behind each step.write_binary_air_*
) per project limitations, delegating AIR file details to Rust where applicable.Testing
run_python_vm
on sample Cairo programs.(test_rlp.py)