Skip to content

Commit 5f9966b

Browse files
remove port prefix requirement (cosmos#2590)
* remove port prefix requirement * chore: remove depcrated test and fix lint * add changelog entry * Update CHANGELOG.md Co-authored-by: Damian Nolan <damiannolan@gmail.com> Co-authored-by: Damian Nolan <damiannolan@gmail.com>
1 parent 17a061c commit 5f9966b

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
7070

7171
### State Machine Breaking
7272

73+
* (27-interchain-accounts) [\#2580](https://github.com/cosmos/ibc-go/issues/2580) Removing port prefix requirement from the ICA host channel handshake
7374
* (transfer) [\#2377](https://github.com/cosmos/ibc-go/pull/2377) Adding `sequence` to `MsgTransferResponse`.
7475
* (light-clients/07-tendermint) [\#2554](https://github.com/cosmos/ibc-go/pull/2554) Forbid negative values for `TrustingPeriod`, `UnbondingPeriod` and `MaxClockDrift` (as specified in ICS-07).
7576

modules/apps/27-interchain-accounts/host/keeper/handshake.go

-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package keeper
22

33
import (
44
"fmt"
5-
"strings"
65

76
sdk "github.com/cosmos/cosmos-sdk/types"
87
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
@@ -35,10 +34,6 @@ func (k Keeper) OnChanOpenTry(
3534
return "", sdkerrors.Wrapf(icatypes.ErrInvalidHostPort, "expected %s, got %s", icatypes.HostPortID, portID)
3635
}
3736

38-
if !strings.HasPrefix(counterparty.PortId, icatypes.ControllerPortPrefix) {
39-
return "", sdkerrors.Wrapf(icatypes.ErrInvalidControllerPort, "expected %s{owner-account-address}, got %s", icatypes.ControllerPortPrefix, counterparty.PortId)
40-
}
41-
4237
var metadata icatypes.Metadata
4338
if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(counterpartyVersion), &metadata); err != nil {
4439
return "", sdkerrors.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata")

modules/apps/27-interchain-accounts/host/keeper/handshake_test.go

-7
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,6 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() {
171171
},
172172
false,
173173
},
174-
{
175-
"invalid counterparty port ID",
176-
func() {
177-
channel.Counterparty.PortId = "invalid-port-id"
178-
},
179-
false,
180-
},
181174
{
182175
"connection not found",
183176
func() {

0 commit comments

Comments
 (0)