-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Events are getting lost from query response #10277
Comments
Hey @crussell-figure. Rosetta has nothing to do with Tendermint's tx indexing. The code you referenced is just a proxy to Tendermint's RPC to query a tx by hash. Can you instead post a diff of the events that are in one response and not the other? |
My issue includes the events from the query vs from tendermint. The code i linked to is where the tendermint response gets converted to rosetta, specifically this function https://github.com/cosmos/cosmos-sdk/blob/v0.44.0/server/rosetta/converter.go#L268 |
Ahh I see, thank you. Yet, I don't see what Rosetta has to do with anything here. Are you querying for the tx via a Rosetta API or something? |
No, Im querying through cli/grpc. But both of those point to the function that fetches from the tendermint api and then converts to rosetta. Again, I may be off base, but when tendermint gives me all the events and cosmos cli/grpc doesnt, thats an issue. |
Sorry, I'm just not getting where Rosetta comes into the picture here. Maybe that's where the issue lies. @fdymylja any thoughts or insight? |
So after discussion with my team who knows this stuff a lot better than I do, it seems that tendermint is returning those events in an Either way, this needs to be resolved if the cosmos query response is going to have those new events in the response. |
Cosmos doesn't ignore anything. The SDK simply proxies that request to Tendermint and returns the response directly from Tendermint. What does your application's configuration set for which events to index? Is it set to index all events? |
This is the response from Tendermint:
This is how cosmos returns the response from Tendermint: Line 66 in bf11b1b
The |
Renamed to remove I figured out what is going on. Msg events are indexed by msg index. If a tx has multiple msgs, events are grouped by the msg they belong to. So any pre- or post-msg processing events that happen, ie those that are about the tx itself ( I would like to see the |
I'm not sure I understand what you're asking. Tendermint successfully indexes all ABCI Are you asking to include events in the SDK's |
Yes, thats exactly what I would like to see. And when I was saying |
Summary of Bug
When querying for a tx with indexing turned on for all events, the grpc/cli query returns a subset of events that are actually on the tx. When querying from tendermint, all events are returned as should be the case.
For example:
From GRPC -> http://34.82.40.187:1317/cosmos/tx/v1beta1/txs/1CA6357119C42A9743C7BA0F6AE520F7E78D49E7950AA51239206A44522FEE6E
Response ->
From Tendermint -> http://34.82.40.187:26657/tx?hash=0x1CA6357119C42A9743C7BA0F6AE520F7E78D49E7950AA51239206A44522FEE6E
Response ->
Tracking the code, it seems to stem from the conversion from tendermint to rosetta, but thats where my go-foo ends. Specifically here: https://github.com/cosmos/cosmos-sdk/blob/v0.44.0/x/auth/tx/query.go#L82
Version
0.44.0
Steps to Reproduce
Query a tx from cli/grpc vs tendermint api, and view the results.
For Admin Use
The text was updated successfully, but these errors were encountered: