Skip to content
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

simapp does not support /cosmos.tx.v1beta1.Service/Simulate anymore #12466

Closed
webmaster128 opened this issue Jul 6, 2022 · 7 comments
Closed
Labels
S:blocked Status: Blocked T:Bug

Comments

@webmaster128
Copy link
Member

webmaster128 commented Jul 6, 2022

I'm testing simapp 0.46.0-rc2 right now in the ComsJS CI system. This seems to work well overall. However, I cannot send simpulate queries anymore (works with 0.42/0.44):

- Error: Query failed with (6): 
          github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query
                github.com/cosmos/cosmos-sdk/baseapp/abci.go:423
          github.com/tendermint/tendermint/abci/client.(*localClient).QuerySync
                github.com/tendermint/tendermint@v0.34.20-rc0/abci/client/local_client.go:256
          github.com/tendermint/tendermint/proxy.(*appConnQuery).QuerySync
                github.com/tendermint/tendermint@v0.34.20-rc0/proxy/app_conn.go:159
          github.com/tendermint/tendermint/rpc/core.ABCIQuery
                github.com/tendermint/tendermint@v0.34.20-rc0/rpc/core/abci.go:20
          reflect.Value.call
                reflect/value.go:556
          reflect.Value.Call
                reflect/value.go:339
          github.com/tendermint/tendermint/rpc/jsonrpc/server.(*wsConnection).readRoutine
                github.com/tendermint/tendermint@v0.34.20-rc0/rpc/jsonrpc/server/ws_handler.go:381
          unknown query path: unknown request

The query path that I can debug in my test case is /cosmos.tx.v1beta1.Service/Simulate. Other queries like e.g. /cosmos.auth.v1beta1.Query/Account work without an issue.

For historic reasons CosmJS queries through Tendermint RPC. This could change to grpc-web at some point but we are not there yet.

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 6, 2022

So that line goes to the following:

	return sdkerrors.QueryResult(sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "unknown query path"), app.trace)

Which makes sense and it seems to me like this should not even be hitting that BaseApp#Query method? I believe there is a call above this that directs it to either legacy or the gRPC routing. Is that correct @AmauryM?

It should be captured by:

	// handle gRPC routes first rather than calling splitPath because '/' characters
	// are used as part of gRPC paths
	if grpcHandler := app.grpcQueryRouter.Route(req.Path); grpcHandler != nil {
		return app.handleQueryGRPC(grpcHandler, req)
	}

In the same method actually.

@amaury1093
Copy link
Contributor

It seems like the simulate endpoint was not registered into the grpcQueryRouter. Which is weird, because it should be.

@webmaster128 Did you test this with rc1 too? Was this introduced in rc2?

@webmaster128
Copy link
Member Author

@webmaster128 Did you test this with rc1 too? Was this introduced in rc2?

I could not test rc1 as it would require us to get a Tendermint 0.35 client. That is possible but would be heavy lifting for debugging this.

@webmaster128
Copy link
Member Author

I'm observing the same error as above for /cosmos.tx.v1beta1.Service/GetTx

@alexanderbez
Copy link
Contributor

@AmauryM does .Service vs .Query matter here? That's what these two have in common. Is there a way to determine all the registered routes?

@webmaster128
Copy link
Member Author

I now tested interchainio/simapp:v0.46.0-rc1 with a Tendermint 0.35 client. This does not contain the issue.

@amaury1093
Copy link
Contributor

Should be fixed by #12509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:blocked Status: Blocked T:Bug
Projects
None yet
Development

No branches or pull requests

4 participants