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

Metadata Negotiation in ICS27 #642

Merged
merged 13 commits into from
Feb 9, 2022
Merged

Metadata Negotiation in ICS27 #642

merged 13 commits into from
Feb 9, 2022

Conversation

AdityaSripal
Copy link
Member

Pull Metadata negotiation logic out of #638

Base automatically changed from aditya/port-changes to master January 20, 2022 16:01
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Looks great! General ACK, but see comments

spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
@@ -162,7 +162,7 @@ This port will be used to create channels between the controller & host chain fo
2. The controller chain emits an event signaling to open a new channel on this port given a connection.
3. A relayer listening for `ChannelOpenInit` events will continue the channel creation handshake.
4. During the `OnChanOpenTry` callback on the host chain an interchain account will be registered and a mapping of the interchain account address to the owner account address will be stored in state (this is used for authenticating transactions on the host chain at execution time).
5. During the `OnChanOpenAck` callback on the controller chain a record of the interchain account address registered on the host chain during `OnChanOpenTry` is set in state with a mapping from portID -> interchain account address. See [version negotiation](#Version-negotiation) section below for how to implement this.
5. During the `OnChanOpenAck` callback on the controller chain a record of the interchain account address registered on the host chain during `OnChanOpenTry` is set in state with a mapping from portID -> interchain account address. See [metadata negotiation](#Metadata-negotiation) section below for how to implement this.
Copy link
Contributor

Choose a reason for hiding this comment

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

@colin-axner Did we say that we needed to update this mapping to include connection seq?

Copy link
Contributor

Choose a reason for hiding this comment

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

The portID is unique from the perspective of the controller chain, so no the connection seq is not needed

Copy link
Contributor

@seantking seantking left a comment

Choose a reason for hiding this comment

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

Great improvements 🤝

Would it be worth adding this check in this PR as well? I can also do a small follow-up.

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Where do we plan to specify what the TxType values mean. For example, in ibc-go if we specify the tx type as sdk.Msg, where can we put this in the spec?

spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mpoke mpoke left a comment

Choose a reason for hiding this comment

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

Looks great. I left some comments bellow.

spec/core/ics-004-channel-and-packet-semantics/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
@@ -317,21 +381,37 @@ function onChanOpenTry(
channelIdentifier: Identifier,
counterpartyPortIdentifier: Identifier,
counterpartyChannelIdentifier: Identifier,
version: string,
counterpartyVersion: string) {
counterpartyVersion: string) (version: string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not consistent with the definition of onChanOpenTry in ICS-26. However, it is consistent with the ibc-go implementation. Could you also modify ICS-26 in this PR or should we open an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we should create a new issue to update ICS26

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it was modified by #629. I was looking at an older branch. We really need to add some release tags to the IBC specs and separate IBC apps from IBC core. It will become very difficult to keep track of all these changes to IBC core (some of them quite relevant) while writing spec for apps.

spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
spec/app/ics-027-interchain-accounts/README.md Outdated Show resolved Hide resolved
AdityaSripal and others added 2 commits February 9, 2022 11:16
Co-authored-by: Marius Poke <marius.poke@posteo.de>
@AdityaSripal AdityaSripal merged commit eee6ae1 into master Feb 9, 2022
@AdityaSripal AdityaSripal deleted the aditya/metadata-changes branch February 9, 2022 11:00
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.

5 participants