In the client applications (using Node/Go) we provide connection profile to identify the endpoints of endorsers.
There we specify endpoint of peer in terms of grpc://localhost:port but actually gRPC runs on HTTP2 right?
Then does the Fabric SDK convert the endpoint to a HTTP url or is it handled by fabric peer code?
I mean how is grpc endpoint converted to an HTTP one?
Or does the peer expose a grpc endpoint itself? If yes, how?
As suggested by @david_k in comments above, the URL in connection profile is used for extracting the host and port number after identifying whether it is grpc or grpcs (over SSL) call.
To verify:
fabcarsample and install the node modules.Endpoint.jsfile in thefabric-commonnode module inside thelibdirectory. Edit the line corresponding to line 44 here.first-networkdirectory (the network used by fabcar sample) to edit the connection profile. Replace the grpcs in the peer and orderer URL corresponding to the edit you made to theEndpoint.jsfile in node modules.javascriptdirectory and fetch the wallet identities.invoke.jsto read the new connection profile.Therefore, we can identify that only the host and port are fetched from the URL to be used for making a grpc/grpcs call to the fabric network.