@@ -148,9 +148,12 @@ func (s *ServerV2) StoreChunks(ctx context.Context, in *pb.StoreChunksRequest) (
148
148
}
149
149
}
150
150
if s .blobAuthenticator != nil {
151
+ // TODO: check the latency of request validation later; could be parallelized to avoid significant
152
+ // impact to the request latency
151
153
for _ , blob := range batch .BlobCertificates {
152
154
_ , err = s .validateDispersalRequest (blob )
153
155
if err != nil {
156
+ // TODO: Blacklist the disperser if there's an invalid dispersal request
154
157
return nil , api .NewErrorInvalidArg (fmt .Sprintf ("failed to validate blob request: %v" , err ))
155
158
}
156
159
}
@@ -387,6 +390,7 @@ func (s *ServerV2) GetChunks(ctx context.Context, in *pb.GetChunksRequest) (*pb.
387
390
// - no encoding prover GetCommitmentsForPaddedLength check
388
391
// - directly take blob lengths (no blob data yet)
389
392
// - doesn't check every 32 bytes is a valid field element
393
+ // Node cannot make these checks because the checks require the blob data
390
394
func (s * ServerV2 ) validateDispersalRequest (
391
395
blobCert * corev2.BlobCertificate ,
392
396
) (* corev2.BlobHeader , error ) {
@@ -398,7 +402,7 @@ func (s *ServerV2) validateDispersalRequest(
398
402
return nil , fmt .Errorf ("failed to authenticate blob request: %v" , err )
399
403
}
400
404
401
- //this is the length in SYMBOLS (32 byte field elements) of the blob. it must be a power of 2
405
+ // this is the length in SYMBOLS (32 byte field elements) of the blob. it must be a power of 2
402
406
commitedBlobLength := blobCert .BlobHeader .BlobCommitments .Length
403
407
if commitedBlobLength == 0 {
404
408
return nil , errors .New ("blob size must be greater than 0" )
0 commit comments