Skip to content

Commit

Permalink
increase blob size
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jul 25, 2024
1 parent 85bd03f commit 5191c5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

const systemAccountKey = "system"

const maxBlobSize = 2 * 1024 * 1024 // 2 MiB
const maxBlobSize = 8 * 1024 * 1024 // 8 MiB

type DispersalServer struct {
pb.UnimplementedDisperserServer
Expand Down Expand Up @@ -277,6 +277,8 @@ func (s *DispersalServer) disperseBlob(ctx context.Context, blob *core.Blob, aut
}
}

s.logger.Debug("received a new blob dispersal request", "authenticatedAddress", authenticatedAddress, "origin", origin, "blob Size", blobSize)

requestedAt := uint64(time.Now().UnixNano())
metadataKey, err := s.blobStore.StoreBlob(ctx, blob, requestedAt)
if err != nil {
Expand Down Expand Up @@ -728,6 +730,8 @@ func (s *DispersalServer) RetrieveBlob(ctx context.Context, req *pb.RetrieveBlob
// Check throughout rate limit
blobSize := encoding.GetBlobSize(blobMetadata.ConfirmationInfo.BlobCommitment.Length)

s.logger.Debug("received a new blob retrieval request", "origin", origin, "blob Size", blobSize)

if s.ratelimiter != nil {
allowed, param, err := s.ratelimiter.AllowRequest(ctx, []common.RequestParams{
{
Expand Down

0 comments on commit 5191c5f

Please sign in to comment.