diff --git a/disperser/apiserver/server.go b/disperser/apiserver/server.go index e604b2a3ae..753b7c55a8 100644 --- a/disperser/apiserver/server.go +++ b/disperser/apiserver/server.go @@ -267,7 +267,7 @@ func (s *DispersalServer) disperseBlob(ctx context.Context, blob *core.Blob, aut return nil, api.NewInvalidArgError(err.Error()) } - s.logger.Debug("received a new blob dispersal request", "origin", origin, "securityParams", strings.Join(securityParamsStrings, ", ")) + s.logger.Debug("received a new blob dispersal request", "authenticatedAddress", authenticatedAddress, "origin", origin, "securityParams", strings.Join(securityParamsStrings, ", ")) if s.ratelimiter != nil { err := s.checkRateLimitsAndAddRatesToHeader(ctx, blob, origin, authenticatedAddress, apiMethodName) @@ -457,6 +457,11 @@ func (s *DispersalServer) checkRateLimitsAndAddRatesToHeader(ctx context.Context // Update the quorum rate blob.RequestHeader.SecurityParams[i].QuorumRate = accountRates.Throughput + // Update AccountID to accountKey. + // This will use the origin as the account key if the user does not provide + // an authenticated address. + blob.RequestHeader.BlobAuthHeader.AccountID = accountKey + // Get the encoded blob size from the blob header. Calculation is done in a way that nodes can replicate encodedLength := encoding.GetEncodedBlobLength(length, uint8(param.ConfirmationThreshold), uint8(param.AdversaryThreshold)) encodedSize := encoding.GetBlobSize(encodedLength)