-
Notifications
You must be signed in to change notification settings - Fork 102
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
Support IBC version negotiation in contracts #269
Comments
Are there more detailed docs / specs on how this works? There is version negotiation already implicit in the Channel Handshake, but they put the onus on the relayer to do so. I would love to see a high level explanation of how this works now. Nevermind, I will ask the ibc team directly. |
It is not super clear at all |
From Carlos at Interchain GmbH:
That does explain the call stack some. I assume for a first version, we can just stub this function that it always returns the proposed version, and the contracts will work the same as ibc v1. I would consider adding an optional entry point to allow a contract to negotiate, but that is definitely an "after the upgrade" issue. For now, let's just have all contracts working the same in 0.44 as in 0.42. Later add backwards-compatible enhancements |
BTW, this seems to be a separate query: https://github.com/cosmos/ibc-go/blob/7a0fedddf6a038fdda8b6911a345b7c6ab8a564e/modules/core/05-port/keeper/grpc_query.go#L17-L45 I actually disapprove of this design. |
Here is the flow in
BUT the version has never been committed to yet. A better version, IMO would be to pass in The communication back to the initiator is only done by the channel objects which is stored in state and committed to. Which contains the desired version. The benefits here are:
|
BTW, discussing this with Chris ages ago: CosmWasm/cosmwasm#147 (comment) Really wish the IBC team consulted me... CosmWasm/cosmwasm#147 (comment) Just like this bug which was dismissed until Informal mentioned it in an audit. Sigh |
To give some more context, reposting some of my Discord comments: Init - chain A accepts version Try - chain B receives counterparty version, chooses what version it supports (may be the same, may be nothing compatible) Ack - A sees what B committed to, if they is unacceptable, can abort Confirm - we are all good. Both sides know once Ack/Confirm passes the channel is solid What I said above is how I understood version negotiation and what I was asking summer 2020 when integrating in cosmwasm |
Also, what are versions??? I figured it would be like A: ics20-2 A: ics27:bank,staking,gov Is that currently what they are? Protocol versions? |
It looks to me like this is no longer needed: https://github.com/cosmos/ibc-go/blob/10175b91b6b8c2c3ecdcb22d6d844748f9fcc516/docs/docs/05-migrations/04-v2-to-v3.md?plain=1#L148 |
We need to support the protocol version negotiation. An implementation example from ICS20:
See https://github.com/cosmos/ibc-go/blob/v2.0.1/modules/apps/transfer/module.go#L439
The text was updated successfully, but these errors were encountered: