Skip to content

feat(l2): prove deposits #2737

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

Open
wants to merge 25 commits into
base: l2/prove_withdrawals
Choose a base branch
from
Open

Conversation

LeanSerra
Copy link
Contributor

@LeanSerra LeanSerra commented May 9, 2025

Note

This is an updated version of #2209 from @xqft

Motivation

We want to prove the L2 deposits in our prover

Description

  • Add to ProgramInput and ProverInputData the field deposit_logs_hash the hash that is created by hashing the concatenated transaction hashes from a batch of blocks to send to the prover
  • Inside the prover add logic to for every batch:
    • Gather the deposit tx hashes for each block from the block's transactions.
    • Calculate the logs hash the same way the l1_committer does
    • Compare our resulting hash with the incoming from the ProgramInput

Closes #2199

@LeanSerra LeanSerra self-assigned this May 9, 2025
@LeanSerra LeanSerra added L2 Rollup client prover L2 prover labels May 9, 2025
Copy link

github-actions bot commented May 9, 2025

Lines of code report

Total lines added: 137
Total lines removed: 0
Total lines changed: 137

Detailed view
+----------------------------------------------------------+-------+------+
| File                                                     | Lines | Diff |
+----------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backends/exec.rs             | 116   | +19  |
+----------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/pico/src/main.rs  | 98    | +19  |
+----------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/risc0/src/main.rs | 106   | +21  |
+----------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/sp1/src/main.rs   | 108   | +19  |
+----------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/src/lib.rs        | 338   | +59  |
+----------------------------------------------------------+-------+------+

@LeanSerra LeanSerra marked this pull request as ready for review May 12, 2025 13:11
@LeanSerra LeanSerra requested a review from a team as a code owner May 12, 2025 13:11
Copy link
Contributor

@xqft xqft left a comment

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L2 Rollup client prover L2 prover
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants