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): add NewHint#25 and NewHint#24 #994

Merged
merged 15 commits into from
Apr 17, 2023
Merged

Conversation

MegaRedHand
Copy link
Contributor

Description

Depends: #992

This PR adds the missing hints NewHint#25 and NewHint#24, now known as DIV_MOD_N_SAFE_DIV_PLUS_ONE and DIV_MOD_N_PACKED_DIVMOD_V2 respectively. It also renames DIV_MOD_N_PACKED_DIVMOD to DIV_MOD_N_PACKED_DIVMOD_V1.

@MegaRedHand MegaRedHand force-pushed the newhint26-verify-zero-v3 branch from 34db699 to 7553821 Compare April 17, 2023 13:19
@MegaRedHand MegaRedHand changed the title feat(hints): add Newhint#25 and NewHint#24 feat(hints): add NewHint#25 and NewHint#24 Apr 17, 2023
@MegaRedHand MegaRedHand force-pushed the newhint25n24-divmod branch from 3dcbf0f to 7de765d Compare April 17, 2023 14:35
@MegaRedHand MegaRedHand added the whitelisted-hint Implementation of hint on whitelist directory label Apr 17, 2023
@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #994 (6a3cd1b) into main (75e9ab8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #994   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files          75       75           
  Lines       31260    31297   +37     
=======================================
+ Hits        30640    30677   +37     
  Misses        620      620           
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor_definition.rs 98.78% <100.00%> (+0.01%) ⬆️
...processor/builtin_hint_processor/secp/signature.rs 99.01% <100.00%> (+0.17%) ⬆️

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

Copy link
Collaborator

@pefontana pefontana left a comment

Choose a reason for hiding this comment

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

Amazing @MegaRedHand !!!
Just check that little detail

@MegaRedHand MegaRedHand force-pushed the newhint26-verify-zero-v3 branch from 1854c68 to 67477d9 Compare April 17, 2023 18:07
@MegaRedHand MegaRedHand force-pushed the newhint25n24-divmod branch from 7de765d to 7207002 Compare April 17, 2023 18:34
Base automatically changed from newhint26-verify-zero-v3 to main April 17, 2023 20:05
@MegaRedHand MegaRedHand enabled auto-merge April 17, 2023 20:17
@github-actions
Copy link

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 2.474 ± 0.034 2.447 2.558 1.00 ± 0.02
head blake2s_integration_benchmark 2.469 ± 0.021 2.442 2.505 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.028 ± 0.043 2.999 3.144 1.00
head compare_arrays_200000 3.059 ± 0.041 3.019 3.169 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.403 ± 0.016 2.385 2.431 1.00 ± 0.01
head dict_integration_benchmark 2.399 ± 0.007 2.387 2.408 1.00
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 3.699 ± 0.023 3.670 3.736 1.00
head factorial_multirun 3.728 ± 0.008 3.715 3.738 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 2.964 ± 0.011 2.948 2.991 1.00
head fibonacci_1000_multirun 2.994 ± 0.015 2.972 3.023 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 3.016 ± 0.014 3.000 3.049 1.00
head integration_builtins 3.044 ± 0.044 2.989 3.129 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 2.674 ± 0.032 2.644 2.753 1.00 ± 0.02
head keccak_integration_benchmark 2.669 ± 0.037 2.618 2.759 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.103 ± 0.019 3.078 3.138 1.00
head linear_search 3.135 ± 0.010 3.120 3.149 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.725 ± 0.030 2.696 2.797 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 2.691 ± 0.008 2.682 2.710 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.502 ± 0.022 2.478 2.548 1.00
head math_integration_benchmark 2.512 ± 0.075 2.476 2.723 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.132 ± 0.054 2.098 2.282 1.00
head memory_integration_benchmark 2.138 ± 0.013 2.121 2.162 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.251 ± 0.079 2.209 2.474 1.02 ± 0.04
head operations_with_data_structures_benchmarks 2.210 ± 0.035 2.186 2.306 1.00
Command Mean [s] Min [s] Max [s] Relative
base pedersen 3.208 ± 0.008 3.196 3.223 1.00
head pedersen 3.287 ± 0.052 3.231 3.384 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.493 ± 0.007 1.485 1.504 1.00
head poseidon_integration_benchmark 1.499 ± 0.004 1.494 1.505 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.371 ± 0.008 2.362 2.388 1.00 ± 0.01
head secp_integration_benchmark 2.370 ± 0.018 2.354 2.404 1.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.677 ± 0.004 1.670 1.684 1.00
head set_integration_benchmark 1.700 ± 0.021 1.687 1.757 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.877 ± 0.014 3.859 3.902 1.00 ± 0.00
head uint256_integration_benchmark 3.866 ± 0.010 3.849 3.880 1.00

@MegaRedHand MegaRedHand added this pull request to the merge queue Apr 17, 2023
Merged via the queue into main with commit e5068d4 Apr 17, 2023
@MegaRedHand MegaRedHand deleted the newhint25n24-divmod branch April 17, 2023 21:03
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Add NewHint#26

* Update changelog

* Change assert_matches for assert + is_ok

* Get and insert SECP_P from scope where applicable

* Add NewHint#25

* Add NewHint#24

* Update changelog

* Appease clippy

* Rename hint codes

* Get or insert N from scope

* Change test contract

* Fix test

* Fix test (for real this time)
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.

3 participants