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

Integrate precompiles into callop #498

Closed
Tracked by #924
KimiWu123 opened this issue Oct 25, 2023 · 3 comments · Fixed by #508
Closed
Tracked by #924

Integrate precompiles into callop #498

KimiWu123 opened this issue Oct 25, 2023 · 3 comments · Fixed by #508
Assignees
Labels
T-feature Type: new features

Comments

@KimiWu123
Copy link
Contributor

Currently, our precompile gadgets are all individual verification gadgets, but we need to integrate these precompile gadgets into callop (bcs precompiles are part of callop). Could refer to Scroll's implementation: https://github.com/scroll-tech/zkevm-circuits/blob/2e06a0f4d089c2c01f2f62f44dc4a2ed354f4d28/zkevm-circuits/src/evm_circuit/execution/callop.rs#L315-L523

@KimiWu123 KimiWu123 added the T-feature Type: new features label Oct 25, 2023
@KimiWu123 KimiWu123 added this to the Feature Completeness milestone Oct 25, 2023
@KimiWu123 KimiWu123 moved this to Milestone Tasks in zkEVM Community Edition Oct 25, 2023
@KimiWu123 KimiWu123 moved this from Milestone Tasks to 📋 Sprint Focus in zkEVM Community Edition Nov 26, 2023
@KimiWu123 KimiWu123 self-assigned this Nov 26, 2023
@KimiWu123 KimiWu123 moved this from 📋 Sprint Focus to 🏗 In progress in zkEVM Community Edition Nov 26, 2023
@KimiWu123 KimiWu123 moved this from 🏗 In progress to 📋 Sprint Focus in zkEVM Community Edition Nov 26, 2023
@ed255
Copy link
Member

ed255 commented Nov 30, 2023

Is this issue resolved via privacy-scaling-explorations/zkevm-circuits#1628 ? We need to investigate. @ChihChengLiang will take a look at this.

@ChihChengLiang
Copy link
Collaborator

ChihChengLiang commented Nov 30, 2023

Update: 🙈 Sorry, this task remains to be worked. I just realized I'm at the spec repo not the circuit repo.

I can confirm the precompile part of the callop gadget is handled in #1628
See https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/1628/files#diff-e72a6a818cbda6c14cb551573432e59fe61ce109345dd4c088508a60c27979af

@KimiWu123
Copy link
Contributor Author

KimiWu123 commented Dec 1, 2023

Yep, this is about the spec not the circuit. We need to sync the spec with the circuit. 😄

@KimiWu123 KimiWu123 moved this from 📋 Sprint Focus to 🏗 In progress in zkEVM Community Edition Dec 13, 2023
@KimiWu123 KimiWu123 moved this from 🏗 In progress to 👀 In review in zkEVM Community Edition Dec 21, 2023
@KimiWu123 KimiWu123 moved this from 👀 In review to 🏗 In progress in zkEVM Community Edition Jan 25, 2024
@KimiWu123 KimiWu123 moved this from 🏗 In progress to 👀 In review in zkEVM Community Edition Jan 31, 2024
KimiWu123 added a commit that referenced this issue Feb 21, 2024
* feat: callop and PrecompileGadget (draft)

* feat: precompile oog

* feat: remove rlc in callop for PrecompileGadget

* test: refactor callop test for precompiles

* test: complete testing for precompiles in callop

* chore: add comments

* feat: complete precompile checks in precompile_gadget

* Update src/zkevm_specs/evm_circuit/execution/callop.py

Co-authored-by: Chih Cheng Liang <[email protected]>

* fix: incorrect caller/callee call context

* fix: ecRecover allows input len is not 128 bytes

* feat: add copy rlc for precompiles input/output

* feat: add input/output rlc data check in ecRecover (PoC)

* refactor ecrecover rlc input

---------

Co-authored-by: Chih Cheng Liang <[email protected]>
@KimiWu123 KimiWu123 moved this from 👀 In review to ✅ Done in zkEVM Community Edition Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-feature Type: new features
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants