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

Set interchain account address on controller chain during init: tracking issue #378

Closed
2 of 6 tasks
seantking opened this issue Sep 6, 2021 · 1 comment
Closed
2 of 6 tasks

Comments

@seantking
Copy link
Contributor

seantking commented Sep 6, 2021

Summary

In the ics27 specification, the following function is defined:

// This helper function is required for the controller chain to get the address of a newly registered interchain account on a host chain.
// Because the registration of an interchain account happens during the channel creation handshake, there is no way for the controller chain to know what the address of the interchain account is on the host chain in advance. 
// This function sends an IBC packet to the host chain, on the owner port + active channel with the sole intention of eventually parsing the interchain account address from the Acknowledgement packet on the controller chain side.
// The OnAcknowledgePacket function on the controller chain will handle the parsing + setting the interchain account address in state.
// The controller chain builds the messages (before sending via IBC in the TrySendTx fn) that the host side will eventually execute. Therefore, the interchain account address must be known by the controller chain.
function GetInterchainAccountAddressFromAck(connectionId: string, counterPartyConnectionId: string, ownerAddress: string) returns (nil){
    // Sends a generic IBC packet to the host chain with the intention of parsing the interchain account address associated with this port/connection/channel from the Acknowledgement packet.
}

This step is required for the controller chain to know the address of the interchain account on the host side.

The problem with this approach is twofold:

  1. Poor UX: This is an unnecessary extra step
  2. Cost: As this is an additional IBC transaction it will cost extra tokens

As suggested here: cosmos/ibc#597 we can use the version string during the channel creation handshake to pass the address of the interchain account back to the host chain.

In order for this to be possible, a relayer will need to query the host chain for an updated version string prior to calling the OnChanOpenAck endpoint. At present this query does not exist. There is an issue here describing the work that needs to be done on ibc-go: #136

Work that needs to be done to achieve this:


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@seantking seantking added this to the Interchain Accounts milestone Sep 6, 2021
@seantking
Copy link
Contributor Author

@adizere

@crodriguezvega crodriguezvega moved this to Done in ibc-go Dec 30, 2021
faddat pushed a commit to notional-labs/ibc-go that referenced this issue Mar 1, 2022
* migrate messages from pathEnd.go to msgs.go

* removed todo from pathEnd.go

* Remove signer as a passed in parameter and replaced it's usage with c.MustGetAddress()

* Ordered messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants