Skip to content

Commit

Permalink
Assign acconuntKey to accountId
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth More authored and Siddharth More committed May 3, 2024
1 parent 61ab512 commit 0562b5a
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 @@ -450,6 +450,11 @@ func (s *DispersalServer) checkRateLimitsAndAddRatesToHeader(ctx context.Context
// Update the quorum rate
blob.RequestHeader.SecurityParams[i].QuorumRate = accountRates.Throughput

// Update AccountID to accountKey
// This is a combination of origin and authenticatedAddress
// AccountId is later used to track blobs sent by the same account
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 0562b5a

Please sign in to comment.