Spec for opcode SHL#43
Closed
silathdiir wants to merge 21 commits into
Closed
Conversation
Closed
silathdiir
commented
Jun 9, 2022
z2trillion
suggested changes
Jun 13, 2022
z2trillion
approved these changes
Jun 14, 2022
Author
|
|
* Add `MULMOD` md draft * Add `MULMOD` implementation * Add tests * Add function `mul_add_words_512` * Account for overflow in word multiplication * Add edge case test * Add additional reduction of factor * Update specs/opcode/09MULMOD.md Co-authored-by: Eduard S. <eduardsanou@posteo.net> * Add `a_reduced < n` constraint * Add 0 overflow constraint to first reduction * Update `MULMOD` spec - Add mod gadget - Fix several overflow related bugs * Add note justifying first factor reduction Co-authored-by: Eduard S. <eduardsanou@posteo.net>
value of opcode SHL and SHR.
z2trillion
approved these changes
Jun 19, 2022
Author
|
Thanks for code review. Moved to upstream privacy-ethereum#225. |
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
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.
Circuit: scroll-tech/zkevm-circuits#157
Summary
Integrate both opcode
SHLandSHRintomul_div_mod(rename tomul_div_mod_shl_shr).Consider
SHLasMUL(a * (1 << shift) = b) andSHRasDIV(a // (1 << shift) = b).