From a07336cf2fce85b7d1cf886a3d07f3306ac459b8 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Wed, 30 Oct 2024 21:38:13 +0000 Subject: [PATCH] docs: clearer MaxRetrieveBlobSizeBytes docstring --- api/clients/disperser_client.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/clients/disperser_client.go b/api/clients/disperser_client.go index 7cf96eed6d..bf1e3e1a0d 100644 --- a/api/clients/disperser_client.go +++ b/api/clients/disperser_client.go @@ -32,7 +32,8 @@ type Config struct { // but all other methods use the default 4MiB max message size, whereas RetrieveBlob // potentially needs a larger size. // - // If not set, the default value is 100MiB, to be backward compatible. + // If not set, default value is 100MiB for forward compatibility. + // Check official documentation for current max blob size on mainnet. MaxRetrieveBlobSizeBytes int } @@ -293,8 +294,8 @@ func (c *DisperserClient) RetrieveBlob(ctx context.Context, batchHeaderHash []by ctxTimeout, cancel := context.WithTimeout(ctx, time.Second*60) defer cancel() if c.config.MaxRetrieveBlobSizeBytes == 0 { - // max blob size on mainnet is currently 16MiB but we set this to 100MiB for backward compatibility - // to what it originally was before this config was added + // Set to 100MiB for forward compatibility. + // Check official documentation for current max blob size on mainnet. c.config.MaxRetrieveBlobSizeBytes = 100 * 1024 * 1024 } reply, err := c.client.RetrieveBlob(ctxTimeout, @@ -302,7 +303,7 @@ func (c *DisperserClient) RetrieveBlob(ctx context.Context, batchHeaderHash []by BatchHeaderHash: batchHeaderHash, BlobIndex: blobIndex, }, - grpc.MaxCallRecvMsgSize(c.config.MaxRetrieveBlobSizeBytes)) + grpc.MaxCallRecvMsgSize(c.config.MaxRetrieveBlobSizeBytes)) // for client if err != nil { return nil, err }