Skip to content

Conversation

@mfachal
Copy link
Contributor

@mfachal mfachal commented Apr 19, 2023

TITLE

Description

Add COMPUTE_SLOPE_SECP256R1 and IMPORT_SECP256R1_P hints (NewHint#20 and NewHint#16)

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.

@mfachal mfachal marked this pull request as ready for review April 19, 2023 18:15
@github-actions
Copy link

github-actions bot commented Apr 19, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 2.473 ± 0.028 2.450 2.544 1.00
head blake2s_integration_benchmark 2.500 ± 0.029 2.473 2.573 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.050 ± 0.045 3.008 3.145 1.01 ± 0.02
head compare_arrays_200000 3.031 ± 0.010 3.012 3.046 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.400 ± 0.017 2.377 2.425 1.00 ± 0.01
head dict_integration_benchmark 2.397 ± 0.008 2.386 2.409 1.00
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 3.700 ± 0.016 3.674 3.728 1.00
head factorial_multirun 3.745 ± 0.024 3.722 3.794 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 2.954 ± 0.011 2.942 2.973 1.00
head fibonacci_1000_multirun 2.998 ± 0.058 2.957 3.147 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 128.7 ± 4.2 125.5 139.8 1.00
head field_arithmetic_get_square_benchmark 132.5 ± 20.3 124.9 190.2 1.03 ± 0.16
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 3.038 ± 0.023 3.016 3.076 1.00
head integration_builtins 3.061 ± 0.019 3.040 3.094 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 2.629 ± 0.006 2.621 2.641 1.00
head keccak_integration_benchmark 2.680 ± 0.081 2.635 2.901 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.168 ± 0.108 3.106 3.397 1.01 ± 0.03
head linear_search 3.136 ± 0.013 3.119 3.166 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.655 ± 0.009 2.647 2.673 1.00
head math_cmp_and_pow_integration_benchmark 2.677 ± 0.012 2.656 2.697 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.472 ± 0.018 2.447 2.503 1.00
head math_integration_benchmark 2.506 ± 0.048 2.481 2.639 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.121 ± 0.010 2.112 2.147 1.00
head memory_integration_benchmark 2.123 ± 0.009 2.109 2.139 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.186 ± 0.013 2.176 2.220 1.00
head operations_with_data_structures_benchmarks 2.230 ± 0.064 2.193 2.403 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base pedersen 3.243 ± 0.050 3.205 3.332 1.00
head pedersen 3.810 ± 0.006 3.801 3.824 1.17 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.483 ± 0.005 1.477 1.494 1.00
head poseidon_integration_benchmark 1.491 ± 0.010 1.482 1.513 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.332 ± 0.010 2.319 2.347 1.00
head secp_integration_benchmark 2.338 ± 0.019 2.319 2.388 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.681 ± 0.005 1.674 1.690 1.00
head set_integration_benchmark 1.692 ± 0.018 1.679 1.734 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.905 ± 0.066 3.870 4.090 1.01 ± 0.02
head uint256_integration_benchmark 3.858 ± 0.013 3.844 3.884 1.00

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #1014 (c0a0c85) into main (593d9a7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1014   +/-   ##
=======================================
  Coverage   98.07%   98.08%           
=======================================
  Files          78       78           
  Lines       32541    32572   +31     
=======================================
+ Hits        31916    31947   +31     
  Misses        625      625           
Impacted Files Coverage Δ
...rocessor/builtin_hint_processor/secp/secp_utils.rs 100.00% <ø> (ø)
...int_processor/builtin_hint_processor_definition.rs 98.84% <100.00%> (+0.01%) ⬆️
..._processor/builtin_hint_processor/secp/ec_utils.rs 99.55% <100.00%> (+0.01%) ⬆️

📣 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 20, 2023
Copy link
Contributor

@MegaRedHand MegaRedHand left a comment

Choose a reason for hiding this comment

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

LGTM

@MegaRedHand MegaRedHand enabled auto-merge April 21, 2023 18:38
@MegaRedHand MegaRedHand added this pull request to the merge queue Apr 21, 2023
Merged via the queue into main with commit e116860 Apr 21, 2023
@MegaRedHand MegaRedHand deleted the newhint20-slope_secp_p branch April 21, 2023 19:49
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
…P256R1_P (lambdaclass#1014)

* add newhint#20

* add slope_compute program

* format

* fix hint#16 string

* WIP

* WIP add SECP_P to exec_scopes

* WIP add SECP_P to exec_scope

* add newhint#16 and newhint#20

* update changelog

* use BigUint for SECP256R1_N and SECP256R1_ALPHA

* refactor compute_slope
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.

5 participants