Skip to content

Commit

Permalink
fix: v1 update for accountID
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Dec 20, 2024
1 parent 5007d10 commit 1017692
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,7 @@ func (s *DispersalServer) DisperseBlobAuthenticated(stream pb.Disperser_Disperse
return api.NewErrorInvalidArg(err.Error())
}

// Get the ethereum address associated with the public key. This is just for convenience so we can put addresses instead of public keys in the allowlist.
// Decode public key
// publicKeyBytes, err := hexutil.Decode(blob.RequestHeader.AccountID)
// if err != nil {
// s.metrics.HandleInvalidArgRpcRequest("DisperseBlobAuthenticated")
// s.metrics.HandleInvalidArgRequest("DisperseBlobAuthenticated")
// return api.NewErrorInvalidArg(fmt.Sprintf("failed to decode account ID (%v): %v", blob.RequestHeader.AccountID, err))
// }

// pubKey, err := crypto.UnmarshalPubkey(publicKeyBytes)
// if err != nil {
// s.metrics.HandleInvalidArgRpcRequest("DisperseBlobAuthenticated")
// s.metrics.HandleInvalidArgRequest("DisperseBlobAuthenticated")
// return api.NewErrorInvalidArg(fmt.Sprintf("failed to decode public key (%v): %v", hexutil.Encode(publicKeyBytes), err))
// }

// authenticatedAddress := crypto.PubkeyToAddress(*pubKey).String()
authenticatedAddress := blob.RequestHeader.AccountID
authenticatedAddress := blob.RequestHeader.BlobAuthHeader.AccountID

// Send back challenge to client
challengeBytes := make([]byte, 32)
Expand Down

0 comments on commit 1017692

Please sign in to comment.