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

feat(grpc): Add ABCIQuery gRPC endpoint and register in BaseApp #11017

Closed
wants to merge 3 commits into from
Closed

feat(grpc): Add ABCIQuery gRPC endpoint and register in BaseApp #11017

wants to merge 3 commits into from

Conversation

ChristianBorst
Copy link

@ChristianBorst ChristianBorst commented Jan 24, 2022

Description

Related To: #11012
Potentially Closes: #7036

Exposes the ABCI Query method via gRPC, useful for obtaining proofs of application state without occupying Tendermint JSON-RPC bandwith. This is a pressing need with slow Tendermint JSON-RPC endpoints being used (and overloaded) by IBC relayers, but is also useful as a general purpose proven query source, enabling gRPC-based trustless clients.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ChristianBorst! I know it's annoying but we would prefer not to depend on tendermint types here. Can you create unique types in the query.proto file?

@ChristianBorst
Copy link
Author

Thanks @ChristianBorst! I know it's annoying but we would prefer not to depend on tendermint types here. Can you create unique types in the query.proto file?

Sure thing!

@ChristianBorst ChristianBorst changed the title Add ABCIQuery gRPC endpoint and register in BaseApp feat(grpc): Add ABCIQuery gRPC endpoint and register in BaseApp Jan 24, 2022
Exposes the ABCI Query method via gRPC, useful for obtaining proofs of
application state without occupying Tendermint JSON-RPC bandwith.
@ChristianBorst
Copy link
Author

ChristianBorst commented Jan 24, 2022

Thanks @ChristianBorst! I know it's annoying but we would prefer not to depend on tendermint types here. Can you create unique types in the query.proto file?

Done @aaronc, I hope this use of tendermint's ProofOps is alright, let me know if not.

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't go in types/. We need to find another package. Also where is the implementation?

Comment on lines +11 to +14
service Service {
// Query exposes the ABCIApplication Query method on BaseApp
rpc Query(QueryRequest) returns (QueryResponse);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ChristianBorst, thanks! We already have a Tendermint proxy service in proto/cosmos/base/tendermint/v1beta1/query.proto. What do you think of putting this there?

Copy link
Author

@ChristianBorst ChristianBorst Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that, and it should resolve @aaronc's issue with having the query endpoint somewhere other than the root of types/.

@ChristianBorst
Copy link
Author

This shouldn't go in types/. We need to find another package. Also where is the implementation?

The implementation is the app itself, I wrapped the app with Tendermint's ABCI Application wrapper to make the signature work. This forwards the request to the same source Tendermint uses, completely bypassing Tendermint.

@amaury1093 amaury1093 self-assigned this Jan 25, 2022
@amaury1093 amaury1093 marked this pull request as draft January 31, 2022 09:31
@tac0turtle
Copy link
Member

@ChristianBorst id love to land this in the sdk for relayers as a short term solution. Do you want to push it to the finish line?

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 8, 2022
@charleenfei
Copy link
Contributor

bumping this pr as it looks like its gone stale

@charleenfei charleenfei removed the stale label Apr 12, 2022
@alexanderbez
Copy link
Contributor

@ChristianBorst would you like me to take this over?

@jackzampolin
Copy link
Member

This is needed for us to fully move to gRPC on the go relayer. Excited to see this in!

@alexanderbez
Copy link
Contributor

Ok, I'll have this wrapped up by EOD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC proof support
8 participants