Skip to content

Commit 8813a97

Browse files
authored
fix: downgrade logging if attestation does not exist yet (#1847)
downgrade logging if attestation does not exist yet
1 parent 9c00da8 commit 8813a97

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

disperser/apiserver/get_blob_status_v2.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
corev2 "github.com/Layr-Labs/eigenda/core/v2"
1313
dispcommon "github.com/Layr-Labs/eigenda/disperser/common"
1414
dispv2 "github.com/Layr-Labs/eigenda/disperser/common/v2"
15+
blobstore "github.com/Layr-Labs/eigenda/disperser/common/v2/blobstore"
1516
)
1617

1718
func (s *DispersalServerV2) GetBlobStatus(ctx context.Context, req *pb.BlobStatusRequest) (*pb.BlobStatusReply, error) {
@@ -80,6 +81,11 @@ func (s *DispersalServerV2) GetBlobStatus(ctx context.Context, req *pb.BlobStatu
8081
}
8182
batchHeader, attestation, err := s.blobMetadataStore.GetSignedBatch(ctx, batchHeaderHash)
8283
if err != nil {
84+
if errors.Is(err, blobstore.ErrAttestationNotFound) {
85+
// attestation may not exist yet if the blob has not been processed by the dispatcher
86+
s.logger.Info("attestation not found for signed batch", "err", err, "blobKey", blobKey.Hex())
87+
continue
88+
}
8389
s.logger.Error("failed to get signed batch", "err", err, "blobKey", blobKey.Hex())
8490
continue
8591
}

disperser/common/v2/blobstore/dynamo_metadata_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ func (s *BlobMetadataStore) GetSignedBatch(ctx context.Context, batchHeaderHash
13921392
}
13931393

13941394
if attestation == nil {
1395-
return nil, nil, fmt.Errorf("%w: attestation not found for hash %x", ErrMetadataNotFound, batchHeaderHash)
1395+
return nil, nil, fmt.Errorf("%w: attestation not found for hash %x", ErrAttestationNotFound, batchHeaderHash)
13961396
}
13971397

13981398
return header, attestation, nil

disperser/common/v2/blobstore/errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ var (
77
ErrMetadataNotFound = errors.New("metadata not found")
88
ErrAlreadyExists = errors.New("record already exists")
99
ErrInvalidStateTransition = errors.New("invalid state transition")
10+
ErrAttestationNotFound = errors.New("attestation not found")
1011
)

0 commit comments

Comments
 (0)