-
Notifications
You must be signed in to change notification settings - Fork 164
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
create vm diff fuzzer #1358
create vm diff fuzzer #1358
Conversation
Benchmark Results for unmodified programs 🚀
|
Codecov Report
@@ Coverage Diff @@
## main #1358 +/- ##
=======================================
Coverage 96.96% 96.96%
=======================================
Files 94 94
Lines 38662 38662
=======================================
Hits 37490 37490
Misses 1172 1172 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Makefile
Outdated
cargo +nightly install cargo-fuzz | ||
. cairo-vm-env/bin/activate; pip install atheris==2.2.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I should include this dependency in requirements.txt
… generate-cairo-for-diff
Makefile
Outdated
fuzzer-run-cairo-compiled: | ||
cd fuzzer | ||
cargo +nightly fuzz run --fuzz-dir . cairo_compiled_programs_fuzzer | ||
|
||
diff-fuzz: | ||
fuzzer-run-hint-diff: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add these targets to .PHONY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved: e14a086
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left some minor comments
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Create diff fuzzer for vm for python hints
Description
This PR creates a python script that runs a differential fuzzer that compares rust vs py vm implementation of all hints containing
SECP_P
and shifts to the left.The fuzzer generates a cairo program through a hint that is obtained through the VM code. Then the cairo program is compiled and ran on the python and rust implementations of the VM, both with the memory output enabled. The memory is then compared as a multi-set, meaning both memories must have the same values with the same repetitions but not necessarily the same order.