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

Add keccak circuit to zk light client PoC #1619

Closed
ed255 opened this issue Sep 21, 2023 · 1 comment · Fixed by #1644
Closed

Add keccak circuit to zk light client PoC #1619

ed255 opened this issue Sep 21, 2023 · 1 comment · Fixed by #1644
Assignees

Comments

@ed255
Copy link
Member

ed255 commented Sep 21, 2023

@adria0 has been working on the zk light client circuit PoC here https://github.com/privacy-scaling-explorations/zkevm-circuits/tree/zklight/light-client-poc
Currently it's able to verify a list of MPT updates and expose the initial and final roots; and it's tested with real block data.
A test with the real prover on a laptop only took ~25 seconds, leading Adria to think that maybe the keccak circuit was missing (see #1543 (comment)); and Miha confirmed this! Only the table is loaded, but the keccak circuit is not included.

This issue is about adding the Keccak circuit into the LightClientCircuit so that all keccaks looked up by the MPT circuit are also verified.

@ed255 ed255 added this to the ZK Light Client milestone Sep 21, 2023
@ed255 ed255 self-assigned this Sep 21, 2023
@ChihChengLiang ChihChengLiang moved this to 🏗 In progress in zkEVM Community Edition Sep 22, 2023
@adria0 adria0 mentioned this issue Oct 5, 2023
4 tasks
@adria0 adria0 linked a pull request Oct 5, 2023 that will close this issue
4 tasks
@ed255 ed255 moved this from 🏗 In progress to 👀 In review in zkEVM Community Edition Oct 5, 2023
@ChihChengLiang
Copy link
Collaborator

The work has been merged in the branch of #1644. We can close this after we merge #1644 to main

github-merge-queue bot pushed a commit that referenced this issue Oct 25, 2023
### Description

This PR merges the current milestone's light client PoC into main. Take
into consideration:

- The circuit is almost fished, although there are some small things
that can be to be improved
- There are some changes that maybe needs to be done in the go wrapper
(like sending proofs results in the wrapper call, instead of go code to
retrieve himself) that will requiere changes in the light client. This
is the main cause to currently disable tests since it requieres to
access to a RPC node. In a future changes will be mocked.
- There's still pending some tests passing from a local geth node and
mainnet blocks, when finished, the idea is to reuse some of the code for
the MPT tests, to prove that a set of mainnet block state transitions
can be successfully verified.

### Issue Link

-
#1619
-
#1543

### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Contents

- A circuit that verifies the state updates requiered to go from one
state root to another
- The witness generator for this circuit, that also, calls internally
the `mpt-witness-generator` wrapper.
- Tests to verify mainnet blocks
- Test to verify a local geth node with `eth_accessListByNumber` RPC
enabled
- A draft of a server to create proofs and serve them. Note that this
can be finished when local geth node tests will be passing.
- Upstreamed MPT golang witness generator changes from miha branch

---------

Co-authored-by: ChihChengLiang <chihchengliang@gmail.com>
Co-authored-by: adria0 <adria0@nowhere>
Co-authored-by: Miha Stopar <stopar.miha@gmail.com>
Co-authored-by: Eduard S <eduardsanou@posteo.net>
@ChihChengLiang ChihChengLiang moved this from 👀 In review to ✅ Done in zkEVM Community Edition Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants