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

Implement remaining hints in keccak module #276

Merged
merged 70 commits into from
Sep 26, 2023
Merged

Implement remaining hints in keccak module #276

merged 70 commits into from
Sep 26, 2023

Conversation

fmoletta
Copy link
Contributor

Closes #195

@fmoletta fmoletta marked this pull request as ready for review September 21, 2023 14:38
@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2023

Codecov Report

Merging #276 (716bca0) into main (64e07f9) will decrease coverage by 0.57%.
The diff coverage is 35.86%.

@@            Coverage Diff             @@
##             main     #276      +/-   ##
==========================================
- Coverage   57.69%   57.13%   -0.57%     
==========================================
  Files          45       45              
  Lines        5711     5853     +142     
==========================================
+ Hits         3295     3344      +49     
- Misses       2107     2192      +85     
- Partials      309      317       +8     
Files Coverage Δ
pkg/builtins/keccak.go 86.53% <100.00%> (ø)
pkg/hints/hint_utils/hint_reference.go 99.41% <100.00%> (+0.03%) ⬆️
pkg/vm/vm_core.go 44.00% <100.00%> (ø)
pkg/hints/hint_processor.go 94.55% <50.00%> (-3.97%) ⬇️
pkg/hints/keccak_hints.go 41.98% <26.89%> (-19.31%) ⬇️

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

@fmoletta fmoletta marked this pull request as draft September 21, 2023 15:29
@fmoletta fmoletta marked this pull request as ready for review September 21, 2023 19:54
@Juan-M-V Juan-M-V added this pull request to the merge queue Sep 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 26, 2023
@toni-calvin toni-calvin added this pull request to the merge queue Sep 26, 2023
@toni-calvin toni-calvin removed this pull request from the merge queue due to a manual request Sep 26, 2023
github-merge-queue bot pushed a commit that referenced this pull request Sep 26, 2023
* Add hint codes

* Move divrem hint codes to math hint codes

* Finish implementation of unsignedDivRem hint

* Add some fields to range check builtin runner

* WIP implementation of signedDivRem hint

* Dummy commit

* Save work in progress

* Add FeltFromBigInt function

* Add unsigned div rem integration test

* Implement UnsafeKeccak

* Update dependencies

* Add unit test

* Fix division bug and make integration test pass

* Fix hash

* Save work in progress

* Add unit tests

* Add integration test

* Finished unit test for divrem hints

* Remove unused commented code

* Add missing file

* Add constant + GetStructFieldRelocatable + start hint

* Add test file

* Add MemorySegmentManager.GetFeltRange

* Progress

* Finish hint

* Add unit test

* Add integration test

* Remove nParts and bound from range check runner fields, add method to calculate bound from constant and add test to assert bound is never zero

* Remove unused input parameter to NewRangeCheckBuiltinRunner

* Change number to constant in Bound impl

* Add hint + test

* Add integration tests

* Add hint + tests

* Add hint

* Fix test

* Add test

* Implement CAIRO_KECCAK_FINALIZE

* Extract aliased constants

* Fix index out of range

* Fix var name

* Make error more expressive

* Fix hint

* Add test, fix test

* Add test files

* Implement keccakWriteArgs

* Extend hint parsing

* Update program.go

* Fix DivCeil

* Add integration test

* Fix DivCeil

* v2

* Fix bug

* Fix bug but better

* Update keccak_add_uint256.cairo

* Update cairo_run_test.go

---------

Co-authored-by: Mariano Nicolini <[email protected]>
@fmoletta fmoletta enabled auto-merge September 26, 2023 20:16
@fmoletta fmoletta added this pull request to the merge queue Sep 26, 2023
Merged via the queue into main with commit d638fec Sep 26, 2023
@fmoletta fmoletta deleted the keccak-hints-3 branch September 26, 2023 20:28
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.

Keccak Hints
5 participants