Skip to content

Conversation

@ManuelBilbao
Copy link
Contributor

Motivation

Reapply #4814

Description

tomip01 and others added 4 commits October 28, 2025 11:55
**Motivation**

After Osaka, we (ethrex L2) as blob originators have to update our
approach to constructing blob transactions (see
[this](https://x.com/vdwijden/status/1978443940098457669?s=46&t=UeaOPcmE9dAwr9hxRE1oWQ))
and [include the cell blob proofs in the
bundle](#4814).

As a ZK rollup, in the guest program, we verify the blob construction,
but the zkVM libraries lack working functionality for verifying blob
cell proofs (we've created the following issues on SP1 and RISC0,
respectively succinctlabs/kzg-rs#28 and
risc0/risc0#3506).

**Description**

To avoid troubles with libraries, we opted to verify the blob the
old-fashioned way (pre-Osaka-like) in the guest program. This can be
done without any issue, since what's important in the guest program is
to compute the same blob versioned hash as the one that was committed on
the L1; how the blob is verified is independent of this.

This PR reverts the changes done to the prover crate in pos of verifying
cell proofs and updates the prover input generation to generate a single
blob proof for the prover.
Co-authored-by: Manuel Iñaki Bilbao <[email protected]>
@ManuelBilbao ManuelBilbao self-assigned this Oct 30, 2025
@ManuelBilbao ManuelBilbao added L2 Rollup client L1 Ethereum client labels Oct 30, 2025
@ethrex-project-sync ethrex-project-sync bot moved this to In Progress in ethrex_l1 Oct 30, 2025
@github-actions
Copy link

github-actions bot commented Oct 30, 2025

Lines of code report

Total lines added: 236
Total lines removed: 0
Total lines changed: 236

Detailed view
+-------------------------------------------------------+-------+------+
| File                                                  | Lines | Diff |
+-------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/options.rs                       | 1011  | +9   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/common/crypto/kzg.rs                    | 183   | +15  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/common/types/blobs_bundle.rs            | 441   | +80  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/common/types/transaction.rs             | 2837  | +10  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/based/block_fetcher.rs               | 499   | +5   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/monitor/app.rs                       | 502   | +6   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/monitor/widget/batches.rs            | 238   | +22  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/networking/rpc/l2/batch.rs           | 110   | +5   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/src/sdk.rs                       | 918   | +20  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/configs.rs                 | 101   | +1   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/errors.rs                  | 385   | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_committer.rs            | 1059  | +27  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/store.rs                 | 336   | +7   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/l2/l2_connection.rs | 465   | +5   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/errors.rs    | 338   | +9   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/mod.rs       | 621   | +13  |
+-------------------------------------------------------+-------+------+

@ManuelBilbao ManuelBilbao marked this pull request as ready for review November 1, 2025 04:49
@ManuelBilbao ManuelBilbao requested a review from a team as a code owner November 1, 2025 04:49
Copilot AI review requested due to automatic review settings November 1, 2025 04:49
@ethrex-project-sync ethrex-project-sync bot moved this from In Progress to In Review in ethrex_l1 Nov 1, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds support for the Osaka fork's blob wrapper version feature, introducing logic to differentiate between Prague (wrapper version 0) and Osaka (wrapper version 1) fork behaviors for blob handling. The implementation includes timestamp-based fork detection, updates to blob proof generation, and configuration for Osaka activation time.

Key Changes

  • Added osaka_activation_time configuration parameter to determine the active fork on L1
  • Updated BlobsBundle::create_from_blobs() to accept a wrapper_version parameter for generating appropriate blob proofs (KZG proofs for Prague, cell proofs for Osaka)
  • Modified get_batch() method signature to accept a fork parameter throughout the codebase

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/networking/rpc/eth/client.rs Made EthConfigResponse struct public
crates/networking/rpc/clients/eth/mod.rs Added get_eth_config() method and wrapper_version field to Overrides
crates/networking/rpc/clients/eth/errors.rs Added GetEthConfigError and fixed typo in UnreachableNonce
crates/networking/p2p/rlpx/l2/l2_connection.rs Updated get_batch() call to include fork parameter
crates/l2/storage/src/store.rs Modified get_batch() to accept fork parameter and set wrapper version based on fork
crates/l2/sequencer/l1_committer.rs Added osaka_activation_time field and fork-aware proof generation logic
crates/l2/sequencer/errors.rs Added MissingBlob error variant
crates/l2/sequencer/configs.rs Added osaka_activation_time configuration field
crates/l2/sdk/src/sdk.rs Added get_l1_active_fork() helper function and wrapper_version to transaction building
crates/l2/prover/src/guest_program/src/input.rs Fixed blob_proof array initialization syntax
crates/l2/prover/src/guest_program/src/execution.rs Fixed blob_proof comparison to use reference
crates/l2/networking/rpc/l2/batch.rs Updated batch retrieval to include fork parameter
crates/l2/monitor/widget/batches.rs Propagated osaka_activation_time and fork parameter through batch operations
crates/l2/monitor/app.rs Added osaka_activation_time field to monitor widget
crates/l2/docker-compose.yaml Added ETHREX_OSAKA_ACTIVATION_TIME environment variable
crates/l2/based/block_fetcher.rs Added osaka_activation_time and fork-aware blob bundle generation
crates/l2/Makefile Added osaka_activation_time configuration and comment
crates/common/types/transaction.rs Added wrapper_version field to transaction structs
crates/common/types/blobs_bundle.rs Implemented fork-aware blob creation with version validation and tests
crates/common/crypto/kzg.rs Added blob_to_commitment_and_cell_proofs() function for Osaka
cmd/ethrex/l2/options.rs Added osaka_activation_time CLI option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

PROOF_COORDINATOR_ADDRESS?=127.0.0.1
ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_PER_GAS?=1000000000 \
ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_PER_GAS?=1000000000
# Timestamp for Osaka activation in the hoodi. Sufficient to start network with Prague for tests.
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'hoodi' to 'Holesky' (or 'hood' if referring to a different network).

Suggested change
# Timestamp for Osaka activation in the hoodi. Sufficient to start network with Prague for tests.
# Timestamp for Osaka activation in the Holesky. Sufficient to start network with Prague for tests.

Copilot uses AI. Check for mistakes.
@ManuelBilbao ManuelBilbao added this pull request to the merge queue Nov 1, 2025
Merged via the queue into main with commit ac17740 Nov 1, 2025
45 checks passed
@ManuelBilbao ManuelBilbao deleted the fusaka_blobs branch November 1, 2025 13:08
@github-project-automation github-project-automation bot moved this to Done in ethrex_l2 Nov 1, 2025
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 1, 2025
xqft added a commit that referenced this pull request Nov 11, 2025
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->
Reapply #4814 

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->

---------

Co-authored-by: Tomás Paradelo <[email protected]>
Co-authored-by: Tomás Paradelo <[email protected]>
Co-authored-by: Gianbelinche <[email protected]>
Co-authored-by: Estéfano Bargas <[email protected]>
Co-authored-by: ilitteri <[email protected]>
Co-authored-by: Ivan Litteri <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client L2 Rollup client

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants