cosmos / ibc

Interchain Standards (ICS) for the Cosmos network & interchain ecosystem.
Other
908 stars 386 forks source link

Add diagram to channel upgradability spec #1072

Closed adiraviraj closed 6 months ago

adiraviraj commented 6 months ago

this PR adds a diagram to the UPGRADES.md file in ics-004-channel-and-packet-semantics to depict the happy path of a channel upgrade.

adiraviraj commented 6 months ago

one thing I'd note is that ChanUpgradeOpen step could be done on both chains (guess conditionally based on if UpgradeConfirm moved one end to OPEN).

@DimitrisJim yea i was going by the case where B is already in OPEN post ChanUpgradeConfirm. but i can edit the diagram if needed to show ChanUpgradeOpen on both ends.

DimitrisJim commented 6 months ago

whatever the spec gang requests :muscle:

crodriguezvega commented 6 months ago

Thank you, @adiraviraj. For clarification, I think we could add some text (either above or below the diagram) explaining that this is a possible upgrade flow and that in this particular sample on step 7 after ChanUpgradeConfirm the channel end opens with the new parameters. You could also mention that where several channel states are listed it means that those are possible channel states after executing that step of the handshake.

adiraviraj commented 6 months ago

@crodriguezvega i've added the the text you requested to give additional context on the diagram.

AdityaSripal commented 6 months ago

Thanks @adiraviraj ! There is no onChanUpgradeConfirm callback, so to correctly depict the situation I would call onChanUpgradeOpen to chainB's app on ChanUpgradeConfirm

adiraviraj commented 6 months ago

thank you @AdityaSripal. i've made the requested change to the diagram.