Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Spec for opcode SHL#225

Merged
lispc merged 31 commits into
privacy-ethereum:masterfrom
scroll-tech:feat/opcode-shl
Aug 19, 2022
Merged

Spec for opcode SHL#225
lispc merged 31 commits into
privacy-ethereum:masterfrom
scroll-tech:feat/opcode-shl

Conversation

@silathdiir
Copy link
Copy Markdown
Contributor

@silathdiir silathdiir commented Jun 19, 2022

Circuit: privacy-ethereum/zkevm-circuits#578

Summary

  1. Fix to use MulAddWordsGadget to implement both SHL and SHR circuits.

  2. Merge new SHL spec into SHR.

@adria0
Copy link
Copy Markdown
Contributor

adria0 commented Jun 30, 2022

IMO merging SHL, SHR with the previous MUL_DIV_MOD adds sobre extra complexity in reviews that we can avoid for the moment. Some kind of low-constraint optimizations could be done at the end. I'm more comfortable with ad0ed96

Anyway, just an opinion, more opinions are welcomed. :)

@silathdiir
Copy link
Copy Markdown
Contributor Author

As @adria0 commented, will fix to merge SHL with SHR. Thanks.

@silathdiir silathdiir marked this pull request as draft July 21, 2022 02:18
@silathdiir silathdiir marked this pull request as ready for review August 1, 2022 01:17
@silathdiir
Copy link
Copy Markdown
Contributor Author

Hi @adria0 , @lispc and @icemelon , I updated both spec and circuit PRs for only merging opcode SHL and SHR to use MulAddWordsGadget.
Please help review when you have time. Thanks.

Comment thread specs/opcode/1bSHL_1cSHR.md Outdated
Comment thread specs/opcode/1bSHL_1cSHR.md Outdated
Comment thread src/zkevm_specs/evm/execution/shl_shr.py
silathdiir and others added 3 commits August 10, 2022 10:45
Co-authored-by: adria0.eth <5526331+adria0@users.noreply.github.com>
Co-authored-by: adria0.eth <5526331+adria0@users.noreply.github.com>
@silathdiir silathdiir requested a review from adria0 August 10, 2022 02:57
Copy link
Copy Markdown
Contributor

@adria0 adria0 left a comment

Choose a reason for hiding this comment

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

LGTM, an extra review will be nice, this math stuff is always tricky :)

@lispc
Copy link
Copy Markdown
Collaborator

lispc commented Aug 19, 2022

lgtm

@lispc lispc merged commit dd004ba into privacy-ethereum:master Aug 19, 2022
@lispc lispc deleted the feat/opcode-shl branch August 19, 2022 04:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants