@@ -171,6 +171,9 @@ func validateBlobTx(tx *types.Transaction, head *types.Header, opts *ValidationO
171
171
if len (sidecar .Blobs ) != len (hashes ) {
172
172
return fmt .Errorf ("invalid number of %d blobs compared to %d blob hashes" , len (sidecar .Blobs ), len (hashes ))
173
173
}
174
+ if err := sidecar .ValidateBlobCommitmentHashes (hashes ); err != nil {
175
+ return err
176
+ }
174
177
// Fork-specific sidecar checks, including proof verification.
175
178
if opts .Config .IsOsaka (head .Number , head .Time ) {
176
179
return validateBlobSidecarOsaka (sidecar , hashes )
@@ -185,9 +188,6 @@ func validateBlobSidecarLegacy(sidecar *types.BlobTxSidecar, hashes []common.Has
185
188
if len (sidecar .Proofs ) != len (hashes ) {
186
189
return fmt .Errorf ("invalid number of %d blob proofs expected %d" , len (sidecar .Proofs ), len (hashes ))
187
190
}
188
- if err := sidecar .ValidateBlobCommitmentHashes (hashes ); err != nil {
189
- return err
190
- }
191
191
for i := range sidecar .Blobs {
192
192
if err := kzg4844 .VerifyBlobProof (& sidecar .Blobs [i ], sidecar .Commitments [i ], sidecar .Proofs [i ]); err != nil {
193
193
return fmt .Errorf ("invalid blob %d: %v" , i , err )
@@ -203,13 +203,7 @@ func validateBlobSidecarOsaka(sidecar *types.BlobTxSidecar, hashes []common.Hash
203
203
if len (sidecar .Proofs ) != len (hashes )* kzg4844 .CellProofsPerBlob {
204
204
return fmt .Errorf ("invalid number of %d blob proofs expected %d" , len (sidecar .Proofs ), len (hashes )* kzg4844 .CellProofsPerBlob )
205
205
}
206
- if err := sidecar .ValidateBlobCommitmentHashes (hashes ); err != nil {
207
- return err
208
- }
209
- if err := kzg4844 .VerifyCellProofs (sidecar .Blobs , sidecar .Commitments , sidecar .Proofs ); err != nil {
210
- return err
211
- }
212
- return nil
206
+ return kzg4844 .VerifyCellProofs (sidecar .Blobs , sidecar .Commitments , sidecar .Proofs )
213
207
}
214
208
215
209
// ValidationOptionsWithState define certain differences between stateful transaction
0 commit comments