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

Add additional ClientState types to cosmos module AppModuleBasic #1102

Closed
damiannolan opened this issue Feb 20, 2023 · 1 comment
Closed
Assignees

Comments

@damiannolan
Copy link
Member

damiannolan commented Feb 20, 2023

Summary

Currently the 07-tendermint codec types are the only light client module types registered for the cosmos_chain_provider.
At some point in the relayer workflow, it queries all client states via this method https://github.com/cosmos/relayer/blob/main/relayer/chains/cosmos/query.go#L473.

This means if there are additional clients stored in state, e.g. solomachine or localhost, then the relayer will not be able to unmarshal the response fully, as there is no codec types registered for the Any encoded ClientState.

I ran into this issue when running e2e tests with the new localhost client that will be added in ibc-go v7.1.0. Currently, we are working around this by using a custom built relayer docker image which registers additional types.

Proposal

  1. Add solomachine registration of codec types to cosmos_chain_provider. (ibc-go v7.0.0)
  2. Add localhost registration of codec types to cosmos_chain_provider. (will require upgrading to ibc-go v7.1.0 when released)

ref: https://github.com/cosmos/relayer/blob/main/relayer/chains/cosmos/module/app_module.go#L25-L27

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
	tmlightclient.RegisterInterfaces(registry)
+       sololightclient.RegisterInterfaces(registry)
+       localhostlightclient.RegisterInterfaces(registry)
}

May also be useful to skip or ignore types the relayer can't unmarshal

@jtieri
Copy link
Member

jtieri commented Jun 8, 2023

Addressed in #1207

@jtieri jtieri closed this as completed Jun 8, 2023
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

No branches or pull requests

2 participants