Skip to content

Commit

Permalink
modify maxmemocharlength (backport #5442) (#5500)
Browse files Browse the repository at this point in the history
* imp(statemachine)!: increase ICA `MaxMemoCharLength` (#5442)

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
(cherry picked from commit 335e4ff)

* add changelog

---------

Co-authored-by: chandiniv1 <117723967+chandiniv1@users.noreply.github.com>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
  • Loading branch information
3 people committed Jan 2, 2024
1 parent 7ebb9a8 commit e87daa9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

### State Machine Breaking

* (apps/27-interchain-accounts) [\#5442](https://github.com/cosmos/ibc-go/pull/5442) Increase the maximum allowed length for the memo field of `InterchainAccountPacketData`.

### Improvements

### Features
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/27-interchain-accounts/types/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions modules/apps/27-interchain-accounts/types/packet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
},
Expand Down

0 comments on commit e87daa9

Please sign in to comment.