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

CreateClients should return clientID's of the clients created #262

Open
colin-axner opened this issue Aug 25, 2022 · 1 comment
Open

CreateClients should return clientID's of the clients created #262

colin-axner opened this issue Aug 25, 2022 · 1 comment

Comments

@colin-axner
Copy link
Contributor

colin-axner commented Aug 25, 2022

The relayer interface has a CreateClients function, but it does not return any identifying information of the clients created. It could return 2 strings, the identifiers of the clients created


Just mentioning this as food for thought, no rush to implement

It'd be useful to have access to this information. I think it is worth considering taking this a step farther though and returning a type which has filled in client identifier information. In ibc-go, our testing package has an endpoint type which contains the identifier information of all the client/connection/channel associated with it. This makes for a clean API since you can call:

endpoint.CreateClient()
endpoint.CreateConnection()
endpoint.CreateChannel()

and so forth and the identifiers get filled in by the relayer

I'm still getting context around this codebase, so I'm not entirely sure how well this idea gets translated, but I think it'd be immensely useful to have some object similar to this endpoint concept. For IBC design you need sort of three interfaces:

  • relayer
  • chain
  • endpoint

relayers should be responsible for relaying and continuing the flow of initiated IBC actions as well as coordinating larger tasks such as setting up clients/connections/channels. chains should be responsible for actions which only require one side (ie sending a packet) and endpoints should be the way a test writer interacts with certain port/channel pairs. I think it'd be useful if endpoints could initiate IBC flows. Like in relation to this command, I only want to create a client on chainA (I don't care about chainB within the test)

@colin-axner
Copy link
Contributor Author

reference usage cosmos/ibc-go#2130

@jonathanpberger jonathanpberger changed the title CreateClients should return clientID's of the clients created CreateClients should return clientID's of the clients created Jul 11, 2024
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

1 participant