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

Include vendored proto definitions in the proto_descriptor file #4425

Merged
merged 1 commit into from
May 21, 2024

Conversation

zbuc
Copy link
Member

@zbuc zbuc commented May 21, 2024

Describe your changes

This changes the proto build process to include cosmos/ibc-go proto files in the vendored proto file list used to generate the proto_descriptor file.

As-implemented, there are some duplicate paths that appear both as dependencies of the penumbra protos and in ibc-go. The ibc-go protos will be included first so the penumbra protos take priority. This shouldn't be an issue in the way we currently use the protos but this seems important to document for future reference.

Issue ticket number and link

Closes #4422

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    Just changes gRPC reflection returns

@zbuc zbuc requested a review from conorsch May 21, 2024 00:27
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

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

This is a slick change, I'm bullish on merge.

It's possible that judicious use of vendoring here may affect downstream consumers of our protos: I'm thinking in particular of interchaintest pulling in copies of buf.build/penumbra-zone and also its own imports of the cosmos deps. In order to evaluate behavior there, we need to press on with merging, pushing to buf, and re-pulling in those other repos, which is too long of a round trip to block merge on now, given the priority on unblocking the Skip IBC work.

@@ -338,6 +338,8 @@ impl Opt {
.add_service(tonic_web::enable(stake_query_proxy))
.add_service(tonic_web::enable(compact_block_query_proxy))
.add_service(tonic_web::enable(tendermint_proxy_proxy))
// TODO: should we add the IBC services here as well? they will appear
// in reflection but not be available.
Copy link
Contributor

Choose a reason for hiding this comment

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

As a general rule, I'd say any services that can be exposed in both pd and pclientd, meaning they'll work equally well in both contexts, probably should be. Otherwise we're starting down a path where there are odd discrepancies that are hard to document. Not worth blocking merge here though, and I appreciate you adding this TODO.

@zbuc zbuc merged commit 4d42f45 into main May 21, 2024
13 checks passed
@zbuc zbuc deleted the 4422_vendor_ibc_services branch May 21, 2024 00:52
@conorsch
Copy link
Contributor

Confirmed that the new IBC methods are exposed via reflection by testing locally:

❯ grpcurl_1.8.7 -plaintext localhost:8080 list
grpc.reflection.v1alpha.ServerReflection
ibc.core.channel.v1.Query
ibc.core.client.v1.Query
ibc.core.connection.v1.Query
penumbra.cnidarium.v1.QueryService
penumbra.core.app.v1.QueryService
penumbra.core.component.auction.v1.QueryService
penumbra.core.component.community_pool.v1.QueryService
penumbra.core.component.compact_block.v1.QueryService
penumbra.core.component.dex.v1.QueryService
penumbra.core.component.dex.v1.SimulationService
penumbra.core.component.fee.v1.QueryService
penumbra.core.component.governance.v1.QueryService
penumbra.core.component.sct.v1.QueryService
penumbra.core.component.shielded_pool.v1.QueryService
penumbra.core.component.stake.v1.QueryService
penumbra.custody.v1.CustodyService
penumbra.tools.summoning.v1.CeremonyCoordinatorService
penumbra.util.tendermint_proxy.v1.TendermintProxyService
penumbra.view.v1.ViewService

whereas they are not present on main:

❯ grpcurl_1.8.7 -plaintext localhost:8080 list
grpc.reflection.v1alpha.ServerReflection
penumbra.cnidarium.v1.QueryService
penumbra.core.app.v1.QueryService
penumbra.core.component.auction.v1.QueryService
penumbra.core.component.community_pool.v1.QueryService
penumbra.core.component.compact_block.v1.QueryService
penumbra.core.component.dex.v1.QueryService
penumbra.core.component.dex.v1.SimulationService
penumbra.core.component.fee.v1.QueryService
penumbra.core.component.governance.v1.QueryService
penumbra.core.component.sct.v1.QueryService
penumbra.core.component.shielded_pool.v1.QueryService
penumbra.core.component.stake.v1.QueryService
penumbra.custody.v1.CustodyService
penumbra.tools.summoning.v1.CeremonyCoordinatorService
penumbra.util.tendermint_proxy.v1.TendermintProxyService
penumbra.view.v1.ViewService

N.B. the older 1.8.7 version of grpcurl is necessary, pending resolution of #4392. Fortunately, we have #4424 queued up to resolve.

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

Successfully merging this pull request may close these issues.

Vendored gRPC services aren't present in reflection
2 participants