Commit a06a712
feat: add EIP-7594 (PeerDAS) blob support
Implements EIP-7594 blob transaction support alongside existing EIP-4844 blobs.
BREAKING CHANGES:
- `blobsToProofs` now returns `Hex[][]` or `ByteArray[][]` 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)
- `BlobSidecar.proof` type now accepts `type | type[]` to support both formats
Features:
- Add optional `blobVersion` parameter ('4844' | '7594') to blob-related methods
- Automatic blob version detection based on chain ID (Sepolia uses EIP-7594)
- Add `getBlobVersion` helper for chain-based version selection
- Support for `computeCellsAndKzgProofs` in KZG interface
- EIP-7594 uses wrapper version byte `0x01` in transaction serialization
- Transaction parsing handles both 4-element (EIP-4844) and 5-element (EIP-7594) wrappers
Implementation:
- `blobsToProofs`: Returns array of proof arrays, uses `computeCellsAndKzgProofs` for EIP-7594
- `toBlobSidecars`: Handles proof arrays, unwraps single proofs for EIP-4844
- `serializeTransaction`: Flattens proof arrays, adds version byte for EIP-7594
- `parseTransaction`: Groups proofs by blob dynamically based on count
- `getBlobVersion`: Auto-detects version from chain ID with override support
Documentation:
- Update blob transaction guide with EIP-7594 information
- Add `blobVersion` parameter docs to `blobsToProofs` and `toBlobSidecars`
- Document proof structure differences between EIP-4844 and EIP-7594
Tests:
- Add comprehensive EIP-7594 test coverage (128 tests passing)
- Mock KZG implementation with `computeCellsAndKzgProofs` for testing
- Test serialization, parsing, and round-trip for both blob versions
- Verify automatic chain-based version detection
Dependencies:
- Update `@paulmillr/trusted-setups` to 0.3.0 (PeerDAS support)
- Update `micro-eth-signer` to 0.17.3 (includes `computeCellsAndProofs`)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 5031192 commit a06a712
File tree
19 files changed
+719
-282
lines changed- site/pages/docs
- guides
- utilities
- src
- actions/wallet
- types
- utils
- blob
- kzg
- transaction
- test/src
19 files changed
+719
-282
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
107 | 129 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
218 | 236 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
0 commit comments