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

feat(hints): Implement NewHint#40 #1038

Merged
merged 52 commits into from
Apr 25, 2023
Merged

feat(hints): Implement NewHint#40 #1038

merged 52 commits into from
Apr 25, 2023

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Apr 21, 2023

Depends on #1037

TITLE

Description

Description of the pull request changes and motivation.

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.

@fmoletta fmoletta marked this pull request as ready for review April 21, 2023 21:29
@github-actions
Copy link

github-actions bot commented Apr 21, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 2.831 ± 0.039 2.796 2.909 1.00 ± 0.02
head blake2s_integration_benchmark 2.819 ± 0.022 2.799 2.877 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.485 ± 0.043 3.439 3.568 1.00 ± 0.01
head compare_arrays_200000 3.485 ± 0.020 3.456 3.530 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.595 ± 0.012 2.578 2.621 1.00
head dict_integration_benchmark 2.598 ± 0.018 2.581 2.642 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 4.177 ± 0.028 4.150 4.237 1.00
head factorial_multirun 4.200 ± 0.028 4.178 4.265 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.389 ± 0.011 3.373 3.407 1.00
head fibonacci_1000_multirun 3.394 ± 0.015 3.370 3.416 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 129.9 ± 0.5 129.2 130.8 1.00
head field_arithmetic_get_square_benchmark 131.7 ± 1.5 130.1 135.4 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 3.373 ± 0.157 3.290 3.804 1.01 ± 0.05
head integration_builtins 3.340 ± 0.030 3.310 3.401 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 3.155 ± 0.167 3.061 3.552 1.02 ± 0.06
head keccak_integration_benchmark 3.105 ± 0.069 3.063 3.293 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.603 ± 0.029 3.581 3.678 1.00
head linear_search 3.604 ± 0.021 3.575 3.642 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.981 ± 0.017 2.966 3.023 1.00
head math_cmp_and_pow_integration_benchmark 2.992 ± 0.010 2.980 3.011 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.690 ± 0.011 2.676 2.712 1.00
head math_integration_benchmark 2.701 ± 0.008 2.688 2.712 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.388 ± 0.006 2.381 2.404 1.00
head memory_integration_benchmark 2.396 ± 0.011 2.381 2.417 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.391 ± 0.015 2.376 2.427 1.00
head operations_with_data_structures_benchmarks 2.414 ± 0.037 2.394 2.519 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 798.7 ± 6.6 793.9 816.8 1.00
head pedersen 800.7 ± 2.7 796.3 804.6 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.482 ± 0.004 1.474 1.489 1.00
head poseidon_integration_benchmark 1.503 ± 0.025 1.489 1.569 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.665 ± 0.012 2.650 2.694 1.00
head secp_integration_benchmark 2.682 ± 0.010 2.668 2.695 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.810 ± 0.005 1.802 1.817 1.00
head set_integration_benchmark 1.918 ± 0.006 1.906 1.927 1.06 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.209 ± 0.020 4.181 4.242 1.00
head uint256_integration_benchmark 4.214 ± 0.011 4.195 4.228 1.00 ± 0.01

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #1038 (93e5145) into main (c729b9f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1038   +/-   ##
=======================================
  Coverage   98.08%   98.08%           
=======================================
  Files          84       84           
  Lines       33345    33375   +30     
=======================================
+ Hits        32705    32735   +30     
  Misses        640      640           
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor_definition.rs 98.88% <100.00%> (+<0.01%) ⬆️
...int_processor/builtin_hint_processor/ec_recover.rs 100.00% <100.00%> (ø)

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

@pefontana pefontana added the whitelisted-hint Implementation of hint on whitelist directory label Apr 24, 2023
Base automatically changed from new-hint-39 to main April 25, 2023 14:23
@fmoletta fmoletta enabled auto-merge April 25, 2023 15:00
@fmoletta fmoletta added this pull request to the merge queue Apr 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 25, 2023
@fmoletta fmoletta added this pull request to the merge queue Apr 25, 2023
Merged via the queue into main with commit ce36cf7 Apr 25, 2023
@fmoletta fmoletta deleted the new-hint-40 branch April 25, 2023 19:18
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Add test

* Ignore builtin segments in get_memory_holes

* Improve test

* Add memory holes check for cairo_run_test tests

* Fix broken condition

* Make memory_holes check optional & customizable

* Fix bounds

* Add a test with deliberately created memory holes

* Fix test value

* Remove duplicated tests + add memory hole value to some tests

* Add memory holes value + remove duplicated tests + fix typo

* Fix test values

* Add changelog entry

* Link PR in Changelog

* Mark breaking change in changelog

* fmt

* Fix test value

* Fix codecov-patch diff

* Add hint code

* Add integration test

* Add untracked file

* Add changelog entry

* Rename hint

* Fix test

* Fix test

* Add hint code + hint impl + unit test

* fmt

* Add integration test

* Add changelog entry

* Implement hint + add tests

* Add changelog entry

* Remove indent from hint string

* Add wasm import

* Fix prev hint + implement new hint

* Add tests

* Add changelog entry

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix Pr numbers

* Update src/hint_processor/builtin_hint_processor/ec_recover.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix changelog

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whitelisted-hint Implementation of hint on whitelist directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants