Open alexanderbez opened 1 year ago
we should expand the interface so something can be registered instead of having to use some global method to get the endpoint to be part of the already exposed endpoints
let me try onece again! haha.
we should expand the interface so something can be registered instead of having to use some global method to get the endpoint to be part of the already exposed endpoints
What is being registered? Elaborate on the API
We could do something along the lines to https://github.com/cosmos/cosmos-sdk/blob/1055478d48571288277b6c0b87bcd60772d56559/client/grpc/cmtservice/service.go#L249, where we register it at a top level, or, if possible, have a method on the interface that would return the service to be registered
Yeah this is why I said:
Alternatively, given that mempools can vary in shapes and sizes, we leave this up to the application.
Since the application has access to the gRPC server, it can just register whatever queries it wants itself.
- Expand the Mempool interface to support a Query method
- Implement a gRPC method
I think we can add interface of mempool txs function in this line https://github.com/cosmos/cosmos-sdk/blob/ee458eb6c4362305fa08fad6dff5c32b6c9c6252/client/cometbft.go#L12
then Implement a gRPC method
This is for the app-side mempool, not Comet's. Comet already has a mempool endpoint to expose Txs.
@alexanderbez I have submitted a pr that marked as Draft, you can now review my pr and give me some suggestions。
Summary
With ABCI++, the application can now define and power it's own mempool.
Problem Definition
When designing the integration of ABCI++, we never considered the barrier between the mempool and the gRPC layer, i.e. exposing any insight into the contents and perhaps telemetry of the mempool.
Should we expand the
Mempool
interface to expose some sort of query method and write a gRPC query with a pagination request?Proposal
Mempool
interface to support aQuery
methodAlternatively, given that mempools can vary in shapes and sizes, we leave this up to the application.
cc @kocubinski @tac0turtle