Skip to content

Commit 3ae95a3

Browse files
0xLaurenzodamiannolan
authored andcommitted
remove port prefix requirement (#2590)
* remove port prefix requirement * chore: remove depcrated test and fix lint * add changelog entry * Update CHANGELOG.md Co-authored-by: Damian Nolan <[email protected]> Co-authored-by: Damian Nolan <[email protected]> (cherry picked from commit 5f9966b)
1 parent 4b0b5af commit 3ae95a3

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
5454

5555
### State Machine Breaking
5656

57+
* (27-interchain-accounts) [\#2580](https://github.com/cosmos/ibc-go/issues/2580) Removing port prefix requirement from the ICA host channel handshake
5758
* (transfer) [\#2377](https://github.com/cosmos/ibc-go/pull/2377) Adding `sequence` to `MsgTransferResponse`.
5859

5960
### Improvements

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

Lines changed: 0 additions & 5 deletions
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

Lines changed: 0 additions & 7 deletions
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)