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

fix: add missing call to initialize in cairo_run_parsed_program #1330

Merged
merged 6 commits into from
Jul 14, 2023

Conversation

MegaRedHand
Copy link
Contributor

Description

This missing call meant passing an empty program would cause a panic. Also, now it ignores the error caused by reaching the program's end with steps remaining.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

Copy link
Member

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

LGTM ser

CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #1330 (82ffa9a) into main (2d5b2cc) will increase coverage by 0.35%.
The diff coverage is 98.36%.

@@            Coverage Diff             @@
##             main    #1330      +/-   ##
==========================================
+ Coverage   97.53%   97.88%   +0.35%     
==========================================
  Files          92       89       -3     
  Lines       37474    35529    -1945     
==========================================
- Hits        36549    34778    -1771     
+ Misses        925      751     -174     
Impacted Files Coverage Δ
vm/src/cairo_run.rs 99.50% <ø> (ø)
vm/src/vm/runners/cairo_runner.rs 97.88% <87.50%> (-0.03%) ⬇️
felt/src/lib_lambdaworks.rs 97.88% <100.00%> (+0.09%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 4.807 ± 0.019 4.787 4.857 1.00 ± 0.00
head big_factorial 4.800 ± 0.015 4.769 4.820 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 4.066 ± 0.012 4.051 4.082 1.00
head big_fibonacci 4.067 ± 0.012 4.056 4.095 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 12.457 ± 0.034 12.389 12.522 1.00
head blake2s_integration_benchmark 12.496 ± 0.046 12.435 12.572 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 4.400 ± 0.010 4.385 4.415 1.00
head compare_arrays_200000 4.433 ± 0.086 4.396 4.676 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.960 ± 0.009 2.949 2.978 1.00 ± 0.00
head dict_integration_benchmark 2.953 ± 0.009 2.934 2.963 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 2.201 ± 0.009 2.188 2.217 1.00
head field_arithmetic_get_square_benchmark 2.210 ± 0.010 2.197 2.234 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 11.127 ± 0.016 11.107 11.165 1.00
head integration_builtins 11.226 ± 0.040 11.182 11.298 1.01 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 12.689 ± 0.052 12.643 12.808 1.00
head keccak_integration_benchmark 12.719 ± 0.145 12.601 13.086 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 4.424 ± 0.007 4.415 4.435 1.00
head linear_search 4.430 ± 0.016 4.414 4.462 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 3.188 ± 0.016 3.170 3.224 1.00
head math_cmp_and_pow_integration_benchmark 3.201 ± 0.007 3.189 3.212 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.899 ± 0.011 2.880 2.911 1.00
head math_integration_benchmark 2.909 ± 0.007 2.902 2.924 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.524 ± 0.009 2.511 2.543 1.00
head memory_integration_benchmark 2.526 ± 0.012 2.505 2.546 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.850 ± 0.015 2.828 2.870 1.01 ± 0.01
head operations_with_data_structures_benchmarks 2.825 ± 0.009 2.811 2.842 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 986.6 ± 3.9 982.6 995.2 1.00 ± 0.01
head pedersen 984.4 ± 3.7 978.7 990.4 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.795 ± 0.006 1.787 1.804 1.00 ± 0.01
head poseidon_integration_benchmark 1.792 ± 0.008 1.777 1.803 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.436 ± 0.010 3.416 3.458 1.00 ± 0.00
head secp_integration_benchmark 3.432 ± 0.011 3.413 3.447 1.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.723 ± 0.005 1.715 1.731 1.00
head set_integration_benchmark 1.743 ± 0.008 1.733 1.756 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 8.100 ± 0.029 8.070 8.153 1.00
head uint256_integration_benchmark 8.105 ± 0.038 8.051 8.168 1.00 ± 0.01

@Oppen Oppen added this pull request to the merge queue Jul 14, 2023
Merged via the queue into main with commit cecba20 Jul 14, 2023
34 checks passed
@Oppen Oppen deleted the fix-crun-parsed-program branch July 14, 2023 03:12
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jul 25, 2023
…ambdaclass#1330)

* fix: add missing `CairoRunner::initialize` call

* Ignore `VirtualMachineError::EndOfProgram` error

* Update changelog

* Add "fuzzing" scope to changelog entry

* Remove whitespace
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jul 25, 2023
…ambdaclass#1330)

* fix: add missing `CairoRunner::initialize` call

* Ignore `VirtualMachineError::EndOfProgram` error

* Update changelog

* Add "fuzzing" scope to changelog entry

* Remove whitespace
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.

3 participants