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

ica docs improvements #2892

Merged
merged 10 commits into from
Dec 8, 2022
Merged

ica docs improvements #2892

merged 10 commits into from
Dec 8, 2022

Conversation

crodriguezvega
Copy link
Contributor

Description

closes: #XXXX

Commit Message / Changelog Entry

docs: improvements to ICA docs

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @crodriguezvega 🚀

Example:

```shell
simd query interchain-accounts controller interchain-account cosmos1.. connection-0
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we use a full bech32 address in examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a strong preference. I used this because I saw it in the SDK docs and I thought it removed a bit of noise, but happy to add the full address if people think it's better.

@@ -23,24 +23,16 @@ This message is expected to fail if:

This message will construct a new `MsgChannelOpenInit` on chain and route it to the core IBC message server to initiate the opening step of the channel handshake.

The controller module will generate a new port identifier and claim the associated port capability. The caller is expected to provide an appropriate application version string. For example, this may be an ICS27 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-alpha1/proto/ibc/applications/interchain_accounts/v1/metadata.proto#L11) type or an ICS29 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-alpha1/proto/ibc/applications/fee/v1/metadata.proto#L11) type with a nested application version.
If the `Version` string is omitted, the application will construct a default version string in the `OnChanOpenInit` handshake callback.
The controller submodule will generate a new port identifier and claim the associated port capability. The caller is expected to provide an appropriate application version string. For example, this may be an ICS-27 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-rc0/proto/ibc/applications/interchain_accounts/v1/metadata.proto#L11) type or an ICS29 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-rc0/proto/ibc/applications/fee/v1/metadata.proto#L11) type with a nested application version.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we now using dash separate ICS numbers? It's really unclear to me on what should be used.

Suggested change
The controller submodule will generate a new port identifier and claim the associated port capability. The caller is expected to provide an appropriate application version string. For example, this may be an ICS-27 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-rc0/proto/ibc/applications/interchain_accounts/v1/metadata.proto#L11) type or an ICS29 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-rc0/proto/ibc/applications/fee/v1/metadata.proto#L11) type with a nested application version.
The controller submodule will generate a new port identifier and claim the associated port capability. The caller is expected to provide an appropriate application version string. For example, this may be an ICS-27 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-rc0/proto/ibc/applications/interchain_accounts/v1/metadata.proto#L11) type or an ICS-29 JSON encoded [`Metadata`](https://github.com/cosmos/ibc-go/blob/v6.0.0-rc0/proto/ibc/applications/fee/v1/metadata.proto#L11) type with a nested application version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand it's confusing and apologies for that. My proposal would be to either use - or a space. I will add a line about this in the docs guidelines PR. At some point I will open a PR to update the whole repository according to that standard.

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM these look great thanks @crodriguezvega

@@ -23,7 +23,7 @@ import (

// Please use MsgRegisterInterchainAccount for use cases which do not need to route to an underlying application.

// Prior to to v6.x.x of ibc-go, the controller module was only functional as middleware, with authentication performed
Copy link
Contributor

Choose a reason for hiding this comment

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

this fix caused all the e2e tests to run :D


A user can query and interact with the Interchain Accounts module using the CLI.

### Controller
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally think this section is mostly unnecessary. CLI should be self documenting. I don't think it makes a lot of sense to add extra documentation, unless that documentation is explaining how to accomplish X using a series of commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point, and I agree the CLI is pretty self documenting. But I have noticed from some users on Discord that sometimes it seems like they are not aware of the CLI commands we provide, so that's why I thought having something like this might help...

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we slim the docs down so if we make changes to the cli we don't have to update these docs as well (ie maintain docs in two places)?

I think it is fine to bring visibility to the CLI and explain how to obtain more information on how to use the CLI, but I'm sure an equal amount of individuals wouldn't realize there is more docs on the CLI outside of the self documentation obtainable via the --help command. I'd prefer to consolidate effort by making those commands have sufficient information

Copy link
Contributor Author

@crodriguezvega crodriguezvega Dec 8, 2022

Choose a reason for hiding this comment

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

All right, I trimmed down this file. I left explanation only for the send-tx and generate-packet-data commands because I think there's an interplay between those 2 that is not immediately obvious from the command line. Please have a look!

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.

4 participants