viem
viem copied to clipboard
feat: add EIP-7594 (PeerDAS) blob support
Implements EIP-7594 blob transaction support alongside existing EIP-4844 blobs.
Fixes #4021
BREAKING CHANGES:
blobsToProofsnow returnsHex[][]orByteArray[][]instead of flat arrays- EIP-4844: Returns
[[proof]](one proof per blob, wrapped in array) - EIP-7594: Returns
[[proof1, ...proof128], ...](128 cell proofs per blob)
- EIP-4844: Returns
BlobSidecar.prooftype now acceptstype | type[]to support both formats
Features:
- Add optional
blobVersionparameter ('4844' | '7594') to blob-related methods - Automatic blob version detection based on chain ID (Sepolia uses EIP-7594)
- Add
getBlobVersionhelper for chain-based version selection - Support for
computeCellsAndKzgProofsin KZG interface - EIP-7594 uses wrapper version byte
0x01in transaction serialization - Transaction parsing handles both 4-element (EIP-4844) and 5-element (EIP-7594) wrappers
Implementation:
blobsToProofs: Returns array of proof arrays, usescomputeCellsAndKzgProofsfor EIP-7594toBlobSidecars: Handles proof arrays, unwraps single proofs for EIP-4844serializeTransaction: Flattens proof arrays, adds version byte for EIP-7594parseTransaction: Groups proofs by blob dynamically based on countgetBlobVersion: Auto-detects version from chain ID with override support
Documentation:
- Update blob transaction guide with EIP-7594 information
- Add
blobVersionparameter docs toblobsToProofsandtoBlobSidecars - Document proof structure differences between EIP-4844 and EIP-7594
Dependencies:
- Update
@paulmillr/trusted-setupsto 0.3.0 (PeerDAS support) - Update
micro-eth-signerto 0.17.3 (includescomputeCellsAndProofs)
🤖 Generated with Claude Code
🦋 Changeset detected
Latest commit: 3fd9855532719349d36fd352499427050289ee6f
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| viem | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
| Diff | Package | Supply Chain Security |
Vulnerability | Quality | Maintenance | License |
|---|---|---|---|---|---|---|
| @paulmillr/trusted-setups@0.1.2 ⏵ 0.3.0 | ||||||
| micro-eth-signer@0.14.0 ⏵ 0.17.3 |
I see a bunch of tests are failing, my guess is because the PR does not have access to env vars for executing actual requests? Let me know if there's anything I should adjust to make the CI less angry.
I've tested this manually using the sendRawTransaction.test.ts test against both Sepolia and Hoodi (since it has not yet activated Fusaka), and both worked fine.
Hey @jxom, any news on this one? Fusaka is closing in on mainnet, and without this any blob tx will fail (unless it targets an execution client that backfills pre-fusaka blob proofs).