zkevm-circuits
zkevm-circuits copied to clipboard
Refactor EVM circuit with challenge API
-
Using the challenge API instead of the instance value for randomness in EVM circuit
-
Maybe we´ll need another upgrade on the entire circuit?
-
Create a task in Halo2, Halo2 wrong, zkevm circuits? dependent on the previous
Reference example: https://github.com/han0110/halo2/blob/feature%2Fchallenge-api/halo2_proofs/examples/shuffle.rs
Notes: update the abstraction done in the EVM circuit to support challenge API. Need to refactor the opcodes.
Uncertainty on how big this task is due to the size of the refactoring.
Notes: in progress.
While checking the errors there's a poltergeist there. The problem how to assign cells no "advised" columns on phase 1 and phase 2. Can do it manually but t's a nightmare, not very maintainable. Find a way for a solution that is more maintainable.
Discussed some time ago how to stop using the word RLC, we could remove it and split the words into HIGH and LOW. Not sure the current progress. If the challenge APIs changes for word we have to revert it.
Pending Discussion Notes:
- Remove RLC and change everything to HIGH and LOW?
Future question, if splitting the circuit to different proofs, removing the challenge API has it's benefits. The challenge API one
- is for word but
- also using it for Keccak inputs, and we have never discussed removing that.
- We also use the challenge API for lookups and haven't discussed removing that.
- We might also use it for batched ECDSA integration.
Notes: meeting with Adria, Carlos and David, addressing the problem on how to use the phase 1 and 2 cell manager. Still in progress.
Do we need to modify the cell manager? The manager now needs to take into account into which phase we're.
Some ideas that need to be explored: specify the phase the value is to allow propagation, but it could mess another part of the code.
Notes: making progress. Pending: when the degree of expression is too high, it automatically needs to split the expressions + other things.
Notes: in progress, it seems everything is working but having 2 pending topics:
- Correctness: need to find systematic way to search for problems
- Performance: 1st implementation working 3-4 times slower, main problem using call identifier from Halo2. Now is 50% slower. Want to continue to debug and optimize this
PR is in draft, could be reviewed. PR https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/990