cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.22k stars 3.59k forks source link

[Feature]: allow query tendermint `block_results` with gRPC #15626

Closed xoac closed 11 hours ago

xoac commented 1 year ago

Summary

/block_results is available only via REST request but should be also available with gRPC.

Problem Definition

I need access to (begin, end) block events and tx's block events. For now I am using GetTxsEventRequest with request tx.height={}. Unfortunately there are some chains (for example osmosis) that are not backward compatible and query for block 3513 will fail with error "unable to resolve type URL /osmosis.gamm.v1beta1.MsgCreatePool: tx parse error: invalid request" (source).

block_results endpoint will be also usable for IBC relayers #11012

alexanderbez commented 1 year ago

So you want the gRPC layer to also proxy BlockResults too? At this point, we're starting to proxy almost every single CometBFT RPC method...

WDYT @tac0turtle?

tac0turtle commented 1 year ago

on the comet community call they talked about their data companion api and about exposing a grpc interface. This would allow us to stop wrapping things but also the data companion api would mean its not a node that has the rpc running. I guess we can wrap this for now.

andynog commented 5 months ago

This will be available in Comet v1 https://docs.cometbft.com/v1.0/explanation/data-companion/grpc

tac0turtle commented 11 hours ago

we are opting to push this to the indexer level. There is a streamer there and we are wrapping up work on another that simplifies the overall system. In the effort to keep the feature set in the cosmos sdk smaller we are opting to not move forwards with this feature