-
Notifications
You must be signed in to change notification settings - Fork 108
feat(l1,l2): support fusaka blobs cell_proofs #4814
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
base: main
Are you sure you want to change the base?
Conversation
Lines of code reportTotal lines added: Detailed view
|
There was a problem hiding this 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.
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); |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
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.
Ethrex offers eth_config
even before Fusaka. We should find another way to check L1 fork
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
BlobsBundle::create_from_blobs
method now takes aFork
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.get_l1_fork()
. This has a workaround for now since the endpoint is only supported for Osaka or laterfrom_generic_tx
method that takes aFork
and sets the wrapper version and blob bundle accordingly.Closes #4779