-
Notifications
You must be signed in to change notification settings - Fork 211
feat: Implement hints on field_arithmetic lib #985
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oppen
approved these changes
Apr 19, 2023
…-rs into field-arithmetic-hints
Oppen
reviewed
Apr 19, 2023
Oppen
approved these changes
Apr 20, 2023
MegaRedHand
approved these changes
Apr 20, 2023
Contributor
MegaRedHand
left a comment
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.
LGTM
Co-authored-by: Tomás <[email protected]>
kariy
pushed a commit
to dojoengine/cairo-rs
that referenced
this pull request
Jun 23, 2023
* Add hint code for UINT348_UNSIGNED_DIV_REM * Add file for uint348 files * Add pack & split for uint348 * Move comment * Implement uint348_unsigned_div_rem hint * Add integration test * Add integration test * Add unit tests * Add hint on split_128 * Test split_128 hint * Add add_no_uint384_hint * Fix hint + add tests * Add hint code for UINT348_UNSIGNED_DIV_REM_EXPAND * Msc fixes * Add integration test * Reduce Uint384_expand representation to the 3 used limbs * Add unit test * Add hint code for UINT384_SQRT * Add implementation for hint on sqrt * Integration test * Add unit tests * Fix missing directive * Run cairo-format * Add changelog entry * Spelling * Add hint code + Uint768 type * Implement hint unsigned_div_rem_uint768_by_uint384 * Update src/hint_processor/builtin_hint_processor/uint384.rs Co-authored-by: Mario Rugiero <[email protected]> * Update src/hint_processor/builtin_hint_processor/uint384.rs Co-authored-by: Mario Rugiero <[email protected]> * Update src/hint_processor/builtin_hint_processor/uint384.rs Co-authored-by: Mario Rugiero <[email protected]> * Make hint code more readable * Add integration test * Add test * Add unit test * Add changelog entry + fmt * Fix plural * cargo fmt * Add first draft of get_square_root * Fix test * Fix syntax * Fix test * Add necessary lib fns * fix fmt * Fix test value * Add test program * Add hint to execute_hint * Fix wrong hint being tested * Implement sqrt * Add test fix file * Fix _sqrt_mod_tonelli_shanks implementation * Expand integration test * Add unit test * Add proptests * Fix merge conflict * Fix merge conflict * Add changelog entry * Use no-std compatible rng when std is not enabled * Clippy * Add misc tests * Remove vec use * Remove merge conflict from changelog * Use seeded rng instead of from_entropy * Catch potential zero divison errors * Catch potential zero divison errors * Prevent zero divison error in is_quad_residue fn * Add tests case when no successes * Add tests case when success_gx * Add some tests * Fix test value * Fix test value * Add unit test for specific case * Add specific case unit test * Catch prime being 0 * Add prime check to sqrt_prime_power + Fix proptest values + unify rng generation across test + use rng prime in sqrt_prime_power proptest * Use `trailing_zeros` instead of sympy trailing implementation * Fix proptest format * Remove unused feature from tml * Clean test file * Fix merge conflict * Fix bug in add_no_uint384_check * Add benchmark file * Remove duplicated file * Fix cairo file * Fix wasm tests * Move proptest to dev-dependencies * Revert "Move proptest to dev-dependencies" This reverts commit 017e8d0. * Revert change + use feature directive for proptest import * fmt * Update src/hint_processor/builtin_hint_processor/field_arithmetic.rs Co-authored-by: Tomás <[email protected]> * Remove unused import --------- Co-authored-by: Mario Rugiero <[email protected]> Co-authored-by: Tomás <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #983
Checklist