diff --git a/disperser/batcher/grpc/dispatcher.go b/disperser/batcher/grpc/dispatcher.go index 4591c854f1..74a46038e2 100644 --- a/disperser/batcher/grpc/dispatcher.go +++ b/disperser/batcher/grpc/dispatcher.go @@ -71,6 +71,10 @@ func (c *dispatcher) sendAllChunks(ctx context.Context, state *core.IndexedOpera return } + batchHeaderHash, err := batchHeader.GetBatchHeaderHash() + if err != nil { + return + } requestedAt := time.Now() sig, err := c.sendChunks(ctx, blobMessages, batchHeader, &op) if err != nil { @@ -79,6 +83,7 @@ func (c *dispatcher) sendAllChunks(ctx context.Context, state *core.IndexedOpera Signature: nil, Operator: id, } + c.logger.Warn("Failed to send chunks to operator", "batchHeaderHash", batchHeaderHash, "operator", op.Socket) c.metrics.ObserveLatency(false, float64(time.Since(requestedAt).Milliseconds())) } else { update <- core.SignerMessage{ @@ -86,6 +91,7 @@ func (c *dispatcher) sendAllChunks(ctx context.Context, state *core.IndexedOpera Operator: id, Err: nil, } + c.logger.Debug("Successfully sent chunks to operator", "batchHeaderHash", batchHeaderHash, "operator", op.Socket) c.metrics.ObserveLatency(true, float64(time.Since(requestedAt).Milliseconds())) } diff --git a/node/node.go b/node/node.go index 010b76cf6d..d3654b525c 100644 --- a/node/node.go +++ b/node/node.go @@ -281,7 +281,12 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs start := time.Now() log := n.Logger - log.Debug("Processing batch", "num of blobs", len(blobs)) + batchHeaderHash, err := header.GetBatchHeaderHash() + if err != nil { + return nil, err + } + + log.Debug("Processing batch", "num of blobs", len(blobs), "batchHeaderHash", batchHeaderHash) if len(blobs) == 0 { return nil, errors.New("ProcessBatch: number of blobs must be greater than zero") @@ -301,11 +306,6 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs } n.Metrics.AcceptBatches("received", batchSize) - batchHeaderHash, err := header.GetBatchHeaderHash() - if err != nil { - return nil, err - } - // Store the batch. // Run this in a goroutine so we can parallelize the batch storing and batch // verifaction work.