Skip to content

Commit

Permalink
use blobkey.hex()
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanc committed Feb 19, 2025
1 parent 080f405 commit 3c5db5d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions relay/chunkstore/chunk_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ func NewChunkReader(
func (r *chunkReader) GetBinaryChunkProofs(ctx context.Context, blobKey corev2.BlobKey) ([][]byte, error) {
bytes, err := r.client.DownloadObject(ctx, r.bucket, s3.ScopedProofKey(blobKey))
if err != nil {
r.logger.Error("failed to download proofs from S3", "blob", blobKey, "error", err)
return nil, fmt.Errorf("failed to download proofs from S3 for blob %s: %w", blobKey, err)
r.logger.Error("failed to download proofs from S3", "blob", blobKey.Hex(), "error", err)
return nil, fmt.Errorf("failed to download proofs from S3 for blob %s: %w", blobKey.Hex(), err)
}

proofs, err := rs.SplitSerializedFrameProofs(bytes)
if err != nil {
r.logger.Error("failed to split proofs", "blob", blobKey, "error", err)
return nil, fmt.Errorf("failed to split proofs for blob %s: %w", blobKey, err)
r.logger.Error("failed to split proofs", "blob", blobKey.Hex(), "error", err)
return nil, fmt.Errorf("failed to split proofs for blob %s: %w", blobKey.Hex(), err)
}

return proofs, nil
Expand All @@ -82,18 +82,18 @@ func (r *chunkReader) GetBinaryChunkCoefficients(

if err != nil {
r.logger.Error("failed to download coefficients from S3",
"blob", blobKey,
"blob", blobKey.Hex(),
"totalSize", fragmentInfo.TotalChunkSizeBytes,
"fragmentSize", fragmentInfo.FragmentSizeBytes,
"error", err)
return 0, nil, fmt.Errorf("failed to download coefficients from S3 for blob %s (total size: %d, fragment size: %d): %w",
blobKey, fragmentInfo.TotalChunkSizeBytes, fragmentInfo.FragmentSizeBytes, err)
blobKey.Hex(), fragmentInfo.TotalChunkSizeBytes, fragmentInfo.FragmentSizeBytes, err)
}

elementCount, frames, err := rs.SplitSerializedFrameCoeffs(bytes)
if err != nil {
r.logger.Error("failed to split coefficient frames", "blob", blobKey, "error", err)
return 0, nil, fmt.Errorf("failed to split coefficient frames for blob %s: %w", blobKey, err)
r.logger.Error("failed to split coefficient frames", "blob", blobKey.Hex(), "error", err)
return 0, nil, fmt.Errorf("failed to split coefficient frames for blob %s: %w", blobKey.Hex(), err)
}

return elementCount, frames, nil
Expand Down

0 comments on commit 3c5db5d

Please sign in to comment.