Skip to content

Conversation

tomip01
Copy link
Contributor

@tomip01 tomip01 commented Oct 8, 2025

Motivation

We want to support sending blobs with the new specs for Osaka https://eips.ethereum.org/EIPS/eip-7594. This includes generating cell_proofs for each cell instead a proof for every blob.

Description

  • The BlobsBundle::create_from_blobs method now takes a Fork parameter and generates commitments and proofs differently depending on whether the fork is Prague or later (e.g., Osaka). This logic is also reflected in the version field of the bundle.
  • Add new get_l1_fork(). This has a workaround for now since the endpoint is only supported for Osaka or later
  • The EIP-4844 transaction wrapper now exposes a from_generic_tx method that takes a Fork and sets the wrapper version and blob bundle accordingly.

Closes #4779

Copy link

github-actions bot commented Oct 8, 2025

Lines of code report

Total lines added: 84
Total lines removed: 0
Total lines changed: 84

Detailed view
+-------------------------------------------------------+-------+------+
| File                                                  | Lines | Diff |
+-------------------------------------------------------+-------+------+
| ethrex/crates/common/types/blobs_bundle.rs            | 382   | +14  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/common/types/transaction.rs             | 2839  | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/based/block_fetcher.rs               | 495   | +1   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/monitor/widget/batches.rs            | 231   | +15  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/networking/rpc/l2/batch.rs           | 110   | +5   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/src/sdk.rs                       | 895   | +8   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_committer.rs            | 724   | +3   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/proof_coordinator.rs       | 585   | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/store.rs                 | 297   | +5   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/l2/l2_connection.rs | 436   | +5   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/errors.rs    | 289   | +9   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/mod.rs       | 699   | +14  |
+-------------------------------------------------------+-------+------+
| ethrex/tooling/genesis/src/genesis.rs                 | 146   | +1   |
+-------------------------------------------------------+-------+------+

@tomip01 tomip01 changed the title Fusaka blobs feat(l1,l2): support fusaka blobs cell_proofs Oct 9, 2025
@tomip01 tomip01 marked this pull request as ready for review October 9, 2025 16:17
@tomip01 tomip01 requested a review from a team as a code owner October 9, 2025 16:17
@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 16:17
@github-actions github-actions bot added L1 Ethereum client L2 Rollup client labels Oct 9, 2025
Copy link
Contributor

@Copilot 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 PR implements support for Osaka blobs with cell_proofs generation as per EIP-7594. The changes modify the blob bundle creation to generate different proof types based on the fork version, with Prague and earlier using single blob proofs and Osaka using cell proofs for each cell.

  • Adds fork-aware blob bundle creation that generates cell_proofs for Osaka fork instead of single blob proofs
  • Introduces get_l1_fork() helper function with workaround logic to detect fork version
  • Updates all blob bundle creation calls throughout the codebase to pass fork parameter

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tooling/genesis/src/genesis.rs Adds "osakaTime" to genesis configuration sorting
crates/networking/rpc/eth/client.rs Makes EthConfigResponse public for fork detection
crates/networking/rpc/clients/eth/mod.rs Adds get_eth_config method and related error handling
crates/networking/rpc/clients/eth/errors.rs Adds GetEthConfigError and fixes typo in UnreachableNonce
crates/networking/p2p/rlpx/l2/l2_connection.rs Updates get_batch call to include fork parameter
crates/l2/storage/src/store.rs Modifies get_batch method to accept fork parameter
crates/l2/sequencer/proof_coordinator.rs Updates blob bundle creation with fork parameter
crates/l2/sequencer/l1_committer.rs Updates generate_blobs_bundle to use fork parameter
crates/l2/sdk/src/sdk.rs Adds get_l1_fork function and updates EIP4844 transaction handling
crates/l2/networking/rpc/l2/batch.rs Updates batch retrieval with fork parameter
crates/l2/monitor/widget/batches.rs Updates batch operations to include fork parameter
crates/l2/based/block_fetcher.rs Updates blob bundle generation with fork parameter
crates/common/types/transaction.rs Replaces TryFrom with from_generic_tx method for fork-aware handling
crates/common/types/blobs_bundle.rs Implements fork-specific proof generation logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +100 to +104
let (_cells, cell_proofs) = c_kzg_settings
.compute_cells_and_kzg_proofs(&blob)
.map_err(|e| BlobsBundleError::Kzg(ethrex_crypto::kzg::KzgError::CKzg(e)))?;
let cell_proofs = cell_proofs.map(|p| p.to_bytes().into_inner());
proofs.extend(cell_proofs);
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

The variable '_cells' is ignored but the function computes both cells and proofs. If cells are not needed, consider using a more specific function that only computes proofs to avoid unnecessary computation. If cells might be needed in the future, add a comment explaining why they're currently ignored.

Copilot uses AI. Check for mistakes.

ManuelBilbao
ManuelBilbao previously approved these changes Oct 9, 2025
@ManuelBilbao ManuelBilbao dismissed their stale review October 10, 2025 13:40

Ethrex offers eth_config even before Fusaka. We should find another way to check L1 fork

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: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

Send blobs following EIP-7594 in the L2

2 participants