From 335e4ff8daa70121c05f47c965c39f9c6bb8e774 Mon Sep 17 00:00:00 2001 From: chandiniv1 <117723967+chandiniv1@users.noreply.github.com> Date: Thu, 21 Dec 2023 02:50:11 +0530 Subject: [PATCH] imp(statemachine)!: increase ICA `MaxMemoCharLength` (#5442) Co-authored-by: DimitrisJim Co-authored-by: Carlos Rodriguez --- modules/apps/27-interchain-accounts/types/packet.go | 2 +- modules/apps/27-interchain-accounts/types/packet_test.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/packet.go b/modules/apps/27-interchain-accounts/types/packet.go index 65f5800cbff..3200b5a162b 100644 --- a/modules/apps/27-interchain-accounts/types/packet.go +++ b/modules/apps/27-interchain-accounts/types/packet.go @@ -19,7 +19,7 @@ var ( ) // MaxMemoCharLength defines the maximum length for the InterchainAccountPacketData memo field -const MaxMemoCharLength = 256 +const MaxMemoCharLength = 32768 var ( // DefaultRelativePacketTimeoutHeight is the default packet timeout height (in blocks) relative diff --git a/modules/apps/27-interchain-accounts/types/packet_test.go b/modules/apps/27-interchain-accounts/types/packet_test.go index b8dd1043743..3f55c1f45a8 100644 --- a/modules/apps/27-interchain-accounts/types/packet_test.go +++ b/modules/apps/27-interchain-accounts/types/packet_test.go @@ -7,8 +7,6 @@ import ( ibctesting "github.com/cosmos/ibc-go/v8/testing" ) -var largeMemo = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum" - func (suite *TypesTestSuite) TestValidateBasic() { testCases := []struct { name string @@ -64,7 +62,7 @@ func (suite *TypesTestSuite) TestValidateBasic() { types.InterchainAccountPacketData{ Type: types.EXECUTE_TX, Data: []byte("data"), - Memo: largeMemo, + Memo: ibctesting.GenerateString(types.MaxMemoCharLength + 1), }, false, },