-
Notifications
You must be signed in to change notification settings - Fork 586
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
Add counterpartyChannelID param to IBCModule.OnChanOpenAck() #1075
Comments
Thank you for opening this issue (and for opening already a PR for it as well!). So if i understand it correctly the issue you're facing is that the channel state (which includes the I am interested also in understanding better why you need the This changes the This change is also Go API breaking so we need to release this in a new major release. We're about to release v3 (next week) so we might be a bit short of time to include it in the release. Next planned major release (v4) will not come for at least another 2 or 3 months. How pressing is this change needed for your development? |
Yes you are correct
So in wasmd IBCHandler.OnChanOpenAck, they send a wasmvmtypes.IBCChannelConnectMsg to the smart contract with the corresponding portID, that wasmvmtypes.IBCChannelConnectMsg basically contains all the info related to the channel, including its counterparty, the contract can then use that info for its logic. An ibc contract for example, would want to use the counterpartyChannelID value to calculate the ibc denom of its token on the remote chain. Another usecase I can think of is creating address using hash(counterpartyChannelID, connectionID), a 2-way ica module for example, I'm not sure.
Yes If you think this make sense
Not so much, we're trying to upgrade wasmd to sdk0.46 and we just noticed ibc v3 not setting counterpartyChannelID before calling IBCModule.OnChanOpenAck will make some of the ibc contracts more inconvenient. |
This should be updated in the spec (and in the implementation). I think it makes sense to add this argument to the function arguments. We could adjust the order of setting the channel, but then it will disagree with the design of OnChanOpenInit and OnChanOpenTry (channel written last is necessary). The spec doesn't allow the counterparty channel ID to be accessible either since the
|
ibc v3 now set the counterpartyChannelID to channel store after calling IBCModule.OnChanOpenAck. This break any ibc modules that use counterpartyChannelID in their OnChanOpenAck logic since there's no way to fetch counterpartyChannelID value as the value is not yet set in store and is not passed into IBCModule.OnChanOpenAck. One example is wasmd ibc contracts
I think we should pass counterpartyChannelID to IBCModule.OnChanOpenAck
The text was updated successfully, but these errors were encountered: