-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.Context
gRPC queries should use the gRPC port instead of abci_query
#10996
Comments
I think this overlaps with #10859? |
This issues sets the default to gRPC on the client side. I believe #10859 investigates if gRPC queries are still routed through tm on the server side. They are separate issues IMO. but yeah, as you wrote in that other issue, we should make sure that OP there tested parallelism using the gRPC endpoint and not the TM rpc. |
ah okay, I see what you mean |
fixes #10996 Signed-off-by: Artur Troian <troian.ap@gmail.com>
fixes #10996 Signed-off-by: Artur Troian <troian.ap@gmail.com>
fixes #10996 Signed-off-by: Artur Troian <troian.ap@gmail.com>
fixes #10996 Signed-off-by: Artur Troian <troian.ap@gmail.com>
fixes cosmos#10996 Signed-off-by: Artur Troian <troian.ap@gmail.com>
I need additional clarification on what this issue is requesting. From what I gather, you want an interface defined and have |
This issue was actually resolved by #11234. |
Summary
Making a gRPC query using
client.Context
should ping the gRPC server directly, instead of pinging Tendermint's abci_query RPC endpoint.Problem Definition
In #10045, we removed baseapp's grpc router routing all queries through tendermint. This means that when pinging the gRPC endpoint directly, queries don't pass by Tendermint.
However, there's only 1 test file in the SDK that tests this:
cosmos-sdk/server/grpc/server_test.go
Lines 60 to 63 in 628547c
All other tests, and probably other app developers, use the Cosmos SDK's
client.Context
abstraction. Thisclient.Context
pings the Tendermint RPC endpoint:cosmos-sdk/client/grpc_query.go
Line 81 in 628547c
It's slightly less performant to make queries via abci_query than via gRPC directly.
Proposal
Make the
client.Context
ping the gRPC by default. We should still provide an option to use Tendermint RPC if the user wishes.An idea of the user-facing API could be:
For Admin Use
The text was updated successfully, but these errors were encountered: