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

Missing NextClientSequence, NextConnectionSequence and NextChannelSequence in ExportGenesis #199

Closed
3 tasks
allthatjazzleo opened this issue May 27, 2021 · 0 comments · Fixed by #200
Closed
3 tasks

Comments

@allthatjazzleo
Copy link
Contributor

allthatjazzleo commented May 27, 2021

Summary of Bug

When a new chain is exported from an old chain with chain-id revision number increased, we found that there are existing ibc clients on the new chain inherited from the old chain e.g. 07-tendermint-0, ..1 , ..2 and more.

It turns out when we try to create new ibc client on new chain, it will create new client-id starting from 0 again i.e. 07-tendermint-0 .
This will cause the whole process from creating ibc-client to ibc-connection to ibc-channel failure with following error.

channel handshake open init failed: could not create channel capability for port ID transfer and channel ID channel-0: module: ibc, name: capabilities/ports/transfer/channels/channel-0: capability name already taken

In the above condition, we can still create client and connection which have id start from zero to replace the existing one, but the above error will be returned when creating channel.

It is found that ExportGenesis for client, connection and channel do not include NextClientSequence , NextConnectionSequence and NextChannelSequence respectively. Any reason behind to not include these fields? Otherwise, the new channel will be created from 0 again but it is already taken.

Version

lastest main branch

Steps to Reproduce

  1. Export the genesis from a chain with existing ibc client, connection and channel created,
  2. Run a new chain from exported genesis
  3. Try to create ibc client, connection and channel in the new chain
  4. It will fail in channel creation step

Proposal

Adding back NextClientSequence , NextConnectionSequence and NextChannelSequence to ExportGenesis


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant