From 93a2e7f1f8b85800b88b1fc9e76d2782198da495 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 1 Aug 2022 14:39:34 +0200 Subject: [PATCH] ICS4: Prefix Upgrade Keys (#807) * upgrade keys should prefix channel path to standardize key construction * changelog --- CHANGELOG.md | 1 + .../core/ics-004-channel-and-packet-semantics/UPGRADES.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60589addf..dab9892e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,3 +47,4 @@ Ref: https://keepachangelog.com/en/1.0.0/ - [\#803](https://github.com/cosmos/ibc/pull/803) Changed UpgradeState enums to match the opening handshake enum style. - [\#802](https://github.com/cosmos/ibc/pull/802) Move `ClientState` to the `provableStore` and add `ClientState` validation in `connOpenTry` and `connOpenAck` +- [\#807](https://github.com/cosmos/ibc/pull/807) Upgrade keys will now prefix the channel path to align with the rest of ICS4 keys diff --git a/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md b/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md index 52ddfc170..88cbb907f 100644 --- a/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md +++ b/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md @@ -101,7 +101,7 @@ The upgrade sequence path is a public path that stores the current sequence of t ```typescript function channelUpgradeSequencePath(portIdentifier: Identifier, channelIdentifier: Identifier) Path { - return "channelUpgrades/ports/{portIdentifier}/channels/{channelIdentifier}/upgradeSequence" + return "channelUpgrades/upgradeSequence/ports/{portIdentifier}/channels/{channelIdentifier}" } ``` @@ -129,7 +129,7 @@ The chain must store the previous channel end so that it may restore it if the u ```typescript function channelRestorePath(portIdentifier: Identifier, channelIdentifier: Identifier): Path { - return "channelUpgrades/ports/{portIdentifier}/channels/{channelIdentifier}/restore" + return "channelUpgrades/restore/ports/{portIdentifier}/channels/{channelIdentifier}" } ``` @@ -139,7 +139,7 @@ The upgrade error path is a public path that can signal an error of the upgrade ```typescript function channelUpgradeErrorPath(portIdentifier: Identifier, channelIdentifier: Identifier): Path { - return "channelUpgrades/ports/{portIdentifier}/channels/{channelIdentifier}/upgradeError" + return "channelUpgrades/upgradeError/ports/{portIdentifier}/channels/{channelIdentifier}" } ``` @@ -182,7 +182,7 @@ The upgrade timeout path is a public path set by the upgrade initiator to determ ```typescript function channelUpgradeTimeoutPath(portIdentifier: Identifier, channelIdentifier: Identifier) Path { - return "channelUpgrades/ports/{portIdentifier}/channels/{channelIdentifier}/upgradeTimeout" + return "channelUpgrades/upgradeTimeout/ports/{portIdentifier}/channels/{channelIdentifier}" } ```