Skip to content

Commit

Permalink
Use accountKey as accountID
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanc committed Jun 7, 2024
1 parent e90cb74 commit 31b1bd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 31b1bd2

Please sign in to comment.