Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(l2): verify proof on chain #1115

Merged
merged 58 commits into from
Nov 14, 2024
Merged

feat(l2): verify proof on chain #1115

merged 58 commits into from
Nov 14, 2024

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented Nov 7, 2024

Motivation

After sending the commitment, we should generate the zkProof and then verify it on chain.

Description

Using the Risc0Groth16Verifier in Sepolia.

Steps:
Use the .env.example but change the following variables:

RISC0_DEV_MODE=0
ETH_RPC_URL=<Any sepolia endpoint>
DEPLOYER_CONTRACT_VERIFIER=0xd9b0d07CeCd808a8172F21fA7C97992168f045CA (`Risc0Groth16Verifier`)
  1. cd ~/lambda_ethereum_rust/crates/l2
  2. run make deploy-l1 -- if it fails change the SALT in crates/l2/contracts/deployer.rs
    1. Copy the OnChainProposer address given in the .env file (PROPOSER_ON_CHAIN_PROPOSER_ADDRESS)
    2. Copy the Bridge address given in the .env file (L1_WATCHER_BRIDGE_ADDRESS)
  3. rm the libmdbx files rm -rf ~/.local/share/ethereum_rust
  4. run the proposer/sequencer: make init-l2
  5. In a new tab/window run the prover: make init-l2-prover-gpu

@jrchatruc jrchatruc marked this pull request as ready for review November 13, 2024 19:26
@jrchatruc jrchatruc requested a review from a team as a code owner November 13, 2024 19:26
Copy link
Contributor

@ManuelBilbao ManuelBilbao left a comment

Choose a reason for hiding this comment

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

Left a comment of an error I've dealt with today

crates/l2/utils/eth_client/mod.rs Outdated Show resolved Hide resolved
crates/l2/utils/eth_client/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ManuelBilbao ManuelBilbao left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

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

This PR looks good. Left some comments & suggestions.

cmd/ethereum_rust/ethereum_rust.rs Outdated Show resolved Hide resolved
cmd/ethereum_rust/ethereum_rust.rs Outdated Show resolved Hide resolved
crates/l2/Makefile Outdated Show resolved Hide resolved
crates/l2/contracts/deployer.rs Outdated Show resolved Hide resolved
crates/l2/contracts/src/l1/OnChainProposer.sol Outdated Show resolved Hide resolved
crates/l2/contracts/src/l1/OnChainProposer.sol Outdated Show resolved Hide resolved
crates/l2/proposer/l1_committer.rs Outdated Show resolved Hide resolved
crates/l2/proposer/prover_server.rs Outdated Show resolved Hide resolved
crates/l2/prover/src/prover_client.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

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

LGTM

@ilitteri ilitteri added this pull request to the merge queue Nov 14, 2024
@ilitteri ilitteri removed this pull request from the merge queue due to a manual request Nov 14, 2024
**Motivation**

We need better docs and instructions on how to run the whole system.

**Description**

- Set the `libmdbx` file name so it's easier to delete with a makefile
target.
- Provide instructions and requirements.
@ilitteri ilitteri added this pull request to the merge queue Nov 14, 2024
Merged via the queue into main with commit b804aa2 Nov 14, 2024
21 checks passed
@ilitteri ilitteri deleted the l2/proof_on_chain branch November 14, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants