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

ICS4: Channel Upgradability Spec #677

Merged
merged 13 commits into from
Mar 23, 2022
Merged

ICS4: Channel Upgradability Spec #677

merged 13 commits into from
Mar 23, 2022

Conversation

AdityaSripal
Copy link
Member

No description provided.

@AdityaSripal AdityaSripal marked this pull request as ready for review March 14, 2022 17:49
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
Comment on lines +379 to +383
if !IsCompatible(counterpartyChannel, proposedUpgradeChannel) {
restoreChannel()
return
}

Copy link
Contributor

Choose a reason for hiding this comment

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

this seems like leftover code from crossing hellos case handled above?

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed. counterpartyChannel is not defined.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry my mistake. Needed to define and prove counterpartyChannel earlier. counterpartyChannel is the channel that initiator upgraded to.

proposedUpgradeChannel is the channel that TRY is going to upgrade to.

Similar to the connection upgrade channel there needs to be some check on compatibility that will not be specified here since it is upgrade-specific.

spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
AdityaSripal and others added 2 commits March 22, 2022 14:27
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
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 good. ACK the protocol. See my comments below.

spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved

// call modules onChanUpgradeAck callback
module = lookupModule(portIdentifier)
err = module.onChanUpgradeAck(
Copy link
Contributor

Choose a reason for hiding this comment

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

In #686, onChanUpgradeAck returns no error.

spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md Outdated Show resolved Hide resolved
@AdityaSripal AdityaSripal requested a review from mpoke March 23, 2022 16:30
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.

Great work. Just one minor comment.

@AdityaSripal AdityaSripal merged commit 32663b6 into master Mar 23, 2022
@AdityaSripal AdityaSripal deleted the aditya/chan-upgrade branch March 23, 2022 17:29
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.

4 participants