v3.9.x post fusaka blob backports (#4007, #4110, #4111)#4113
Merged
Conversation
The Ethereum Fusaka fork introduced /eth/v1/beacon/blobs as a replacement
for the legacy /eth/v1/beacon/blob_sidecars endpoint. Nitro's getBlobs()
function fetches from the new endpoint but was not saving blobs to disk.
The legacy blobSidecars() function saves blobs in "Version 0" format with
full metadata (commitments, proofs, block roots). The new endpoint returns
only blob data, requiring a minimal storage format optimized for hash-based
lookups.
Additionally, there was no ReadBlobsFromDisk() function - blobs could be
saved but not read back. This commit adds the reader for testing and to
enable a future beacon endpoint emulator that we may add.
Storage Format V1 (new):
- Stores blobs as versioned hash -> blob map
- File: {blob-directory}/{slot}
- Format: {"version": 1, "data": {"0xHASH": "0xBLOB", ...}}
- Used by getBlobs() when fetching from /eth/v1/beacon/blobs
Storage Format V0 (legacy, backward compatible):
- Stores blob_sidecars array with full metadata
- Format: {"data": [{"blob": "0x...", "kzg_commitment": "0x...",
"kzg_proof": "0x...", ...}]}
- Used by blobSidecars() when fetching from legacy endpoint
- Still readable for backward compatibility
ReadBlobsFromDisk() (new):
- Reads blobs from disk, transparently handling V0 or V1 format
- Auto-detects version via presence of "version" field
- Validates blob integrity:
* V1: Computes commitment -> versioned hash, verifies match to key
* V0: Computes commitment from blob, verifies match to stored commitment
- No migration needed - both formats coexist
Renamed functions for clarity:
- saveBlobDataToDisk -> saveBlobsV0ToDisk (legacy format)
- Added saveBlobsV1ToDisk (new format)
Testing improvements:
- Updated createTestBlobs() to use production blobs.EncodeBlobs()
- All tests now use real KZG blobs with valid commitments
- Added TestReadBlobsV1ValidationFailure and TestReadBlobsV0ValidationFailure
- Renamed existing tests to indicate format (e.g., TestSaveBlobsV0ToDisk)
(cherry picked from commit 0ea5b8f)
…ched The Fusaka hard fork introduced the new /eth/v1/beacon/blobs endpoint which is now universally available. This removes all code related to the legacy blob_sidecars endpoint including the toggle logic that would switch between endpoints on errors. - Remove useLegacyEndpoint config field and --use-legacy-endpoint flag - Remove blobSidecars() function from blob_client.go - Simplify GetBlobsBySlot() to always use getBlobs() - Remove --compare-endpoints flag and compareEndpoints() from blobtool - Keep saveBlobsV0ToDisk() and V0 reading code for backwards compatibility with existing blob files saved to disk (cherry picked from commit 8299e50)
The Fusaka hard fork made cell proofs (Version1) universally required, so the legacy single-proof-per-blob (Version0) code path is no longer needed. - Remove enableCellProofs parameter from ComputeProofs(), always use cell proofs - Remove EnableCellProofs config field and --enable-cell-proofs flag - Remove shouldEnableCellProofs() function from data_poster.go - Remove SupportsCellProofs() function from parent.go - Remove Version0 tests (cherry picked from commit 3df0d2e)
auto-merge was automatically disabled
December 4, 2025 19:56
Pull request was closed
Contributor
❌ 3 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports of