From 9a4de70a74aecbc0e9ba75d2a37671006a5b160b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 26 Jul 2024 22:11:34 +0000 Subject: [PATCH] add logs --- disperser/apiserver/server.go | 2 ++ tools/traffic/generator.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/disperser/apiserver/server.go b/disperser/apiserver/server.go index 5e227ad2fb..effbb21bc4 100644 --- a/disperser/apiserver/server.go +++ b/disperser/apiserver/server.go @@ -267,6 +267,8 @@ func (s *DispersalServer) disperseBlob(ctx context.Context, blob *core.Blob, aut return nil, api.NewInvalidArgError(err.Error()) } + s.logger.Debug("received a new blob before rate limit", "authenticatedAddress", authenticatedAddress, "origin", origin, "blob Size", blobSize) + s.logger.Debug("received a new blob dispersal request", "authenticatedAddress", authenticatedAddress, "origin", origin, "securityParams", strings.Join(securityParamsStrings, ", ")) if s.ratelimiter != nil { diff --git a/tools/traffic/generator.go b/tools/traffic/generator.go index 2f8731ffd5..b64e264ae6 100644 --- a/tools/traffic/generator.go +++ b/tools/traffic/generator.go @@ -105,7 +105,7 @@ func (g *TrafficGenerator) sendRequest(ctx context.Context, data []byte) error { return err } - g.Logger.Info("successfully dispersed new blob", "authenticated", true, "key", hex.EncodeToString(key), "status", blobStatus.String()) + g.Logger.Info("successfully dispersed new blob", "authenticated", true, "key", hex.EncodeToString(key), "status", blobStatus.String(), "size", len(data)) return nil } else { blobStatus, key, err := g.DisperserClient.DisperseBlob(ctxTimeout, data, g.Config.CustomQuorums) @@ -113,7 +113,7 @@ func (g *TrafficGenerator) sendRequest(ctx context.Context, data []byte) error { return err } - g.Logger.Info("successfully dispersed new blob", "authenticated", false, "key", hex.EncodeToString(key), "status", blobStatus.String()) + g.Logger.Info("successfully dispersed new blob", "authenticated", false, "key", hex.EncodeToString(key), "status", blobStatus.String(), "size", len(data)) return nil }