From a2b0acaa2528bbf7cb2bf0d579807175e055ef76 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Tue, 23 May 2023 13:33:38 +0300 Subject: [PATCH 01/11] feat(connection): migrate connection params --- docs/migrations/v7-to-v8.md | 3 +- .../core/03-connection/connection_test.go | 39 +- e2e/tests/transfer/base_test.go | 4 +- e2e/testvalues/values.go | 2 +- modules/core/03-connection/genesis.go | 5 + modules/core/03-connection/keeper/keeper.go | 42 +- .../core/03-connection/keeper/keeper_test.go | 50 +++ .../core/03-connection/keeper/migrations.go | 15 + .../03-connection/keeper/migrations_test.go | 43 ++ modules/core/03-connection/keeper/params.go | 24 -- .../core/03-connection/keeper/params_test.go | 17 - modules/core/03-connection/keeper/verify.go | 2 +- modules/core/03-connection/types/codec.go | 1 + modules/core/03-connection/types/keys.go | 3 + modules/core/03-connection/types/msgs.go | 26 ++ modules/core/03-connection/types/msgs_test.go | 35 ++ modules/core/03-connection/types/params.go | 25 -- .../core/03-connection/types/params_legacy.go | 36 ++ modules/core/03-connection/types/tx.pb.go | 388 ++++++++++++++++++ modules/core/keeper/keeper.go | 10 +- modules/core/keeper/msg_server.go | 12 + modules/core/keeper/msg_server_test.go | 52 +++ modules/core/module.go | 8 +- proto/ibc/core/connection/v1/tx.proto | 21 + 24 files changed, 755 insertions(+), 108 deletions(-) create mode 100644 modules/core/03-connection/keeper/migrations_test.go delete mode 100644 modules/core/03-connection/keeper/params.go delete mode 100644 modules/core/03-connection/keeper/params_test.go create mode 100644 modules/core/03-connection/types/params_legacy.go diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index f6b15ff4eed..8059c6cc7eb 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -47,13 +47,12 @@ TODO: https://github.com/cosmos/ibc-go/pull/3505 (extra parameter added to trans ) ``` -- You should pass the `authority` to the IBC keeper. ([#3640](https://github.com/cosmos/ibc-go/pull/3640)) See [diff](https://github.com/cosmos/ibc-go/pull/3640/files#diff-d18972debee5e64f16e40807b2ae112ddbe609504a93ea5e1c80a5d489c3a08a). +- You should pass the `authority` to the IBC keeper. ([#3640](https://github.com/cosmos/ibc-go/pull/3640) and [#3650](https://github.com/cosmos/ibc-go/pull/3650)) See [diff](https://github.com/cosmos/ibc-go/pull/3640/files#diff-d18972debee5e64f16e40807b2ae112ddbe609504a93ea5e1c80a5d489c3a08a). ```diff // app.go // IBC Keepers - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibcexported.StoreKey], app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, + appCodec, keys[ibcexported.StoreKey], app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index 0898f99a8af..89081ce15d8 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -3,11 +3,10 @@ package connection import ( "context" "fmt" - "strconv" - "strings" "testing" "time" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" @@ -30,19 +29,11 @@ type ConnectionTestSuite struct { // QueryMaxExpectedTimePerBlockParam queries the on-chain max expected time per block param for 03-connection func (s *ConnectionTestSuite) QueryMaxExpectedTimePerBlockParam(ctx context.Context, chain ibc.Chain) uint64 { - queryClient := s.GetChainGRCPClients(chain).ParamsQueryClient - res, err := queryClient.Params(ctx, ¶msproposaltypes.QueryParamsRequest{ - Subspace: ibcexported.ModuleName, - Key: string(connectiontypes.KeyMaxExpectedTimePerBlock), - }) - s.Require().NoError(err) - - // removing additional strings that are used for amino - delay := strings.ReplaceAll(res.Param.Value, "\"", "") - time, err := strconv.ParseUint(delay, 10, 64) + queryClient := s.GetChainGRCPClients(chain).ConnectionQueryClient + res, err := queryClient.ConnectionParams(ctx, &connectiontypes.QueryConnectionParamsRequest{}) s.Require().NoError(err) - return time + return res.Params.MaxExpectedTimePerBlock } // TestMaxExpectedTimePerBlockParam tests changing the MaxExpectedTimePerBlock param using a governance proposal @@ -52,6 +43,7 @@ func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() { relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, s.TransferChannelOptions()) chainA, chainB := s.GetChains() + chainAVersion := chainA.Config().Images[0].Version chainBDenom := chainB.Config().Denom chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) @@ -71,13 +63,22 @@ func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() { }) t.Run("change the delay to 60 seconds", func(t *testing.T) { - delay := fmt.Sprintf(`"%d"`, 1*time.Minute) - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(ibcexported.ModuleName, string(connectiontypes.KeyMaxExpectedTimePerBlock), delay), - } + delay := uint64(1 * time.Minute) + if testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) { + authority, err := s.QueryModuleAccountAddress(ctx, govtypes.ModuleName, chainA) + s.Require().NoError(err) + s.Require().NotNil(authority) + + msg := connectiontypes.NewMsgUpdateConnectionParams(authority.String(), connectiontypes.NewParams(delay)) + s.ExecuteGovProposalV1(ctx, msg, chainA, chainAWallet, 1) + } else { + changes := []paramsproposaltypes.ParamChange{ + paramsproposaltypes.NewParamChange(ibcexported.ModuleName, string(connectiontypes.KeyMaxExpectedTimePerBlock), fmt.Sprintf(`"%d"`, delay)), + } - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteGovProposal(ctx, chainA, chainAWallet, proposal) + proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) + s.ExecuteGovProposal(ctx, chainA, chainAWallet, proposal) + } }) t.Run("validate the param was successfully changed", func(t *testing.T) { diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index 901c5e9b1a8..a8d4b2215c2 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -245,7 +245,7 @@ func (s *TransferTestSuite) TestSendEnabledParam() { chainBAddress := chainBWallet.FormattedAddress() chainAVersion := chainA.Config().Images[0].Version - isSelfManagingParams := testvalues.TransferSelfParamsFeatureReleases.IsSupported(chainAVersion) + isSelfManagingParams := testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) govModuleAddress, err := s.QueryModuleAccountAddress(ctx, govtypes.ModuleName, chainA) s.Require().NoError(err) @@ -308,7 +308,7 @@ func (s *TransferTestSuite) TestReceiveEnabledParam() { ) chainAVersion := chainA.Config().Images[0].Version - isSelfManagingParams := testvalues.TransferSelfParamsFeatureReleases.IsSupported(chainAVersion) + isSelfManagingParams := testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) govModuleAddress, err := s.QueryModuleAccountAddress(ctx, govtypes.ModuleName, chainA) s.Require().NoError(err) diff --git a/e2e/testvalues/values.go b/e2e/testvalues/values.go index fa033787ce5..9c0695746e3 100644 --- a/e2e/testvalues/values.go +++ b/e2e/testvalues/values.go @@ -67,7 +67,7 @@ var IcadNewGenesisCommandsFeatureReleases = semverutil.FeatureReleases{ } // TransferSelfParamsFeatureReleases represents the releases the transfer module started managing its own params. -var TransferSelfParamsFeatureReleases = semverutil.FeatureReleases{ +var SelfParamsFeatureReleases = semverutil.FeatureReleases{ MajorVersion: "v8", } diff --git a/modules/core/03-connection/genesis.go b/modules/core/03-connection/genesis.go index df8fb28945e..3a8cdf5d154 100644 --- a/modules/core/03-connection/genesis.go +++ b/modules/core/03-connection/genesis.go @@ -1,6 +1,8 @@ package connection import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/core/03-connection/keeper" @@ -18,6 +20,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { k.SetClientConnectionPaths(ctx, connPaths.ClientId, connPaths.Paths) } k.SetNextConnectionSequence(ctx, gs.NextConnectionSequence) + if err := gs.Params.Validate(); err != nil { + panic(fmt.Sprintf("invalid ibc connection genesis state parameters: %v", err)) + } k.SetParams(ctx, gs.Params) k.CreateSentinelLocalhostConnection(ctx) diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index 4e763c3302b..7469a7b26c2 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -20,24 +20,24 @@ type Keeper struct { // implements gRPC QueryServer interface types.QueryServer - storeKey storetypes.StoreKey - paramSpace paramtypes.Subspace - cdc codec.BinaryCodec - clientKeeper types.ClientKeeper + storeKey storetypes.StoreKey + legacySubspace paramtypes.Subspace + cdc codec.BinaryCodec + clientKeeper types.ClientKeeper } // NewKeeper creates a new IBC connection Keeper instance -func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ck types.ClientKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, ck types.ClientKeeper) Keeper { // set KeyTable if it has not already been set - if !paramSpace.HasKeyTable() { - paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) + if !legacySubspace.HasKeyTable() { + legacySubspace = legacySubspace.WithKeyTable(types.ParamKeyTable()) } return Keeper{ - storeKey: key, - cdc: cdc, - paramSpace: paramSpace, - clientKeeper: ck, + storeKey: key, + cdc: cdc, + legacySubspace: legacySubspace, + clientKeeper: ck, } } @@ -221,3 +221,23 @@ func (k Keeper) addConnectionToClient(ctx sdk.Context, clientID, connectionID st k.SetClientConnectionPaths(ctx, clientID, conns) return nil } + +// GetParams returns the total set of ibc-connection parameters. +func (k Keeper) GetParams(ctx sdk.Context) types.Params { + store := ctx.KVStore(k.storeKey) + bz := store.Get([]byte(types.ParamsKey)) + if len(bz) == 0 { + return types.Params{} + } + + var params types.Params + k.cdc.MustUnmarshal(bz, ¶ms) + return params +} + +// SetParams sets the total set of ibc-connection parameters. +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(¶ms) + store.Set([]byte(types.ParamsKey), bz) +} diff --git a/modules/core/03-connection/keeper/keeper_test.go b/modules/core/03-connection/keeper/keeper_test.go index dbae331d690..2961c2ad474 100644 --- a/modules/core/03-connection/keeper/keeper_test.go +++ b/modules/core/03-connection/keeper/keeper_test.go @@ -176,3 +176,53 @@ func (suite *KeeperTestSuite) TestLocalhostConnectionEndCreation() { expectedCounterParty := types.NewCounterparty(exported.LocalhostClientID, exported.LocalhostConnectionID, commitmenttypes.NewMerklePrefix(connectionKeeper.GetCommitmentPrefix().Bytes())) suite.Require().Equal(expectedCounterParty, connectionEnd.Counterparty) } + +// TestDefaultSetParams tests the default params set are what is expected +func (suite *KeeperTestSuite) TestDefaultSetParams() { + expParams := types.DefaultParams() + + params := suite.chainA.App.GetIBCKeeper().ConnectionKeeper.GetParams(suite.chainA.GetContext()) + suite.Require().Equal(expParams, params) +} + +// TestParams tests that param setting and retrieval works properly +func (suite *KeeperTestSuite) TestParams() { + testCases := []struct { + name string + input types.Params + expPass bool + }{ + {"success: set default params", types.DefaultParams(), true}, + {"success: valid value for MaxExpectedTimePerBlock", types.NewParams(10), true}, + {"failure: invalid value for MaxExpectedTimePerBlock", types.NewParams(0), false}, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + suite.SetupTest() // reset + ctx := suite.chainA.GetContext() + err := tc.input.Validate() + suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.SetParams(ctx, tc.input) + if tc.expPass { + suite.Require().NoError(err) + expected := tc.input + p := suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx) + suite.Require().Equal(expected, p) + } else { + suite.Require().Error(err) + } + }) + } +} + +// TestUnsetParams tests that trying to get params that are not set panics. +func (suite *KeeperTestSuite) TestUnsetParams() { + suite.SetupTest() + ctx := suite.chainA.GetContext() + store := ctx.KVStore(suite.chainA.GetSimApp().GetKey(exported.StoreKey)) + store.Delete([]byte(types.ParamsKey)) + + suite.Require().Equal(suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx), types.Params{}) +} diff --git a/modules/core/03-connection/keeper/migrations.go b/modules/core/03-connection/keeper/migrations.go index 9965eab28ca..49eb5ff41a6 100644 --- a/modules/core/03-connection/keeper/migrations.go +++ b/modules/core/03-connection/keeper/migrations.go @@ -4,6 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" connectionv7 "github.com/cosmos/ibc-go/v7/modules/core/03-connection/migrations/v7" + "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" ) // Migrator is a struct for handling in-place store migrations. @@ -22,3 +23,17 @@ func (m Migrator) Migrate3to4(ctx sdk.Context) error { connectionv7.MigrateLocalhostConnection(ctx, m.keeper) return nil } + +// MigrateParams migrates from consensus version 4 to 5. +// This migration takes the parameters that are currently stored and managed by x/params +// and stores them directly in the ibc module's state. +func (m Migrator) MigrateParams(ctx sdk.Context) error { + var params types.Params + m.keeper.legacySubspace.GetParamSet(ctx, ¶ms) + + if err := params.Validate(); err != nil { + return err + } + m.keeper.SetParams(ctx, params) + return nil +} diff --git a/modules/core/03-connection/keeper/migrations_test.go b/modules/core/03-connection/keeper/migrations_test.go new file mode 100644 index 00000000000..d3d87361668 --- /dev/null +++ b/modules/core/03-connection/keeper/migrations_test.go @@ -0,0 +1,43 @@ +package keeper_test + +import ( + "github.com/cosmos/ibc-go/v7/modules/core/03-connection/keeper" + "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +// TestMigrateParams tests that the params for the connection are properly migrated +func (suite *KeeperTestSuite) TestMigrateParams() { + testCases := []struct { + name string + malleate func() + expectedParams types.Params + }{ + { + "success: default params", + func() { + params := types.DefaultParams() + subspace := suite.chainA.GetSimApp().GetSubspace(ibcexported.ModuleName) + subspace.SetParamSet(suite.chainA.GetContext(), ¶ms) // set params + }, + types.DefaultParams(), + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + suite.SetupTest() // reset + + tc.malleate() + + ctx := suite.chainA.GetContext() + migrator := keeper.NewMigrator(suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper) + err := migrator.MigrateParams(ctx) + suite.Require().NoError(err) + + params := suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx) + suite.Require().Equal(tc.expectedParams, params) + }) + } +} diff --git a/modules/core/03-connection/keeper/params.go b/modules/core/03-connection/keeper/params.go deleted file mode 100644 index 8723d5d7246..00000000000 --- a/modules/core/03-connection/keeper/params.go +++ /dev/null @@ -1,24 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" -) - -// GetMaxExpectedTimePerBlock retrieves the maximum expected time per block from the paramstore -func (k Keeper) GetMaxExpectedTimePerBlock(ctx sdk.Context) uint64 { - var res uint64 - k.paramSpace.Get(ctx, types.KeyMaxExpectedTimePerBlock, &res) - return res -} - -// GetParams returns the total set of ibc-connection parameters. -func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams(k.GetMaxExpectedTimePerBlock(ctx)) -} - -// SetParams sets the total set of ibc-connection parameters. -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramSpace.SetParamSet(ctx, ¶ms) -} diff --git a/modules/core/03-connection/keeper/params_test.go b/modules/core/03-connection/keeper/params_test.go deleted file mode 100644 index 30450beb528..00000000000 --- a/modules/core/03-connection/keeper/params_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package keeper_test - -import ( - "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" -) - -func (suite *KeeperTestSuite) TestParams() { - expParams := types.DefaultParams() - - params := suite.chainA.App.GetIBCKeeper().ConnectionKeeper.GetParams(suite.chainA.GetContext()) - suite.Require().Equal(expParams, params) - - expParams.MaxExpectedTimePerBlock = 10 - suite.chainA.App.GetIBCKeeper().ConnectionKeeper.SetParams(suite.chainA.GetContext(), expParams) - _ = suite.chainA.App.GetIBCKeeper().ConnectionKeeper.GetParams(suite.chainA.GetContext()) - suite.Require().Equal(uint64(10), expParams.MaxExpectedTimePerBlock) -} diff --git a/modules/core/03-connection/keeper/verify.go b/modules/core/03-connection/keeper/verify.go index 735347e80a5..c1316fb9ea2 100644 --- a/modules/core/03-connection/keeper/verify.go +++ b/modules/core/03-connection/keeper/verify.go @@ -369,7 +369,7 @@ func (k Keeper) VerifyNextSequenceRecv( func (k Keeper) getBlockDelay(ctx sdk.Context, connection exported.ConnectionI) uint64 { // expectedTimePerBlock should never be zero, however if it is then return a 0 blcok delay for safety // as the expectedTimePerBlock parameter was not set. - expectedTimePerBlock := k.GetMaxExpectedTimePerBlock(ctx) + expectedTimePerBlock := k.GetParams(ctx).MaxExpectedTimePerBlock if expectedTimePerBlock == 0 { return 0 } diff --git a/modules/core/03-connection/types/codec.go b/modules/core/03-connection/types/codec.go index 8f6ad752fbf..70b326ab1f8 100644 --- a/modules/core/03-connection/types/codec.go +++ b/modules/core/03-connection/types/codec.go @@ -33,6 +33,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgConnectionOpenTry{}, &MsgConnectionOpenAck{}, &MsgConnectionOpenConfirm{}, + &MsgUpdateConnectionParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/modules/core/03-connection/types/keys.go b/modules/core/03-connection/types/keys.go index 1b0b5132d90..cad76caf4ad 100644 --- a/modules/core/03-connection/types/keys.go +++ b/modules/core/03-connection/types/keys.go @@ -28,6 +28,9 @@ const ( // ConnectionPrefix is the prefix used when creating a connection identifier ConnectionPrefix = "connection-" + + // ParamsKey is the store key for the IBC connection parameters + ParamsKey = "connectionParams" ) // FormatConnectionIdentifier returns the connection identifier with the sequence appended. diff --git a/modules/core/03-connection/types/msgs.go b/modules/core/03-connection/types/msgs.go index 0ea08c2a565..2fea697f6ee 100644 --- a/modules/core/03-connection/types/msgs.go +++ b/modules/core/03-connection/types/msgs.go @@ -17,6 +17,7 @@ var ( _ sdk.Msg = (*MsgConnectionOpenConfirm)(nil) _ sdk.Msg = (*MsgConnectionOpenAck)(nil) _ sdk.Msg = (*MsgConnectionOpenTry)(nil) + _ sdk.Msg = (*MsgUpdateConnectionParams)(nil) _ codectypes.UnpackInterfacesMessage = (*MsgConnectionOpenTry)(nil) _ codectypes.UnpackInterfacesMessage = (*MsgConnectionOpenAck)(nil) @@ -289,3 +290,28 @@ func (msg MsgConnectionOpenConfirm) GetSigners() []sdk.AccAddress { } return []sdk.AccAddress{accAddr} } + +// NewMsgUpdateConnectionParams creates a new MsgUpdateConnectionParams instance +func NewMsgUpdateConnectionParams(authority string, params Params) *MsgUpdateConnectionParams { + return &MsgUpdateConnectionParams{ + Authority: authority, + Params: params, + } +} + +// GetSigners returns the expected signers for a MsgUpdateConnectionParams message. +func (msg *MsgUpdateConnectionParams) GetSigners() []sdk.AccAddress { + accAddr, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} +} + +// ValidateBasic performs basic checks on a MsgUpdateConnectionParams. +func (msg *MsgUpdateConnectionParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } + return msg.Params.Validate() +} diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index 61041342bd4..e1f2f85204a 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -231,3 +231,38 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { } } } + +// TestMsgUpdateConnectionParams_ValidateBasic tests ValidateBasic for MsgUpdateConnectionParams +func (suite *MsgTestSuite) TestMsgUpdateConnectionParams_ValidateBasic() { + authority := suite.chainA.App.GetIBCKeeper().GetAuthority() + testCases := []struct { + name string + msg *types.MsgUpdateConnectionParams + expPass bool + }{ + { + "success: valid authority and params", + types.NewMsgUpdateConnectionParams(authority, types.DefaultParams()), + true, + }, + { + "failure: invalid authority address", + types.NewMsgUpdateConnectionParams("invalid", types.DefaultParams()), + false, + }, + { + "failure: invalid time per block", + types.NewMsgUpdateConnectionParams(authority, types.NewParams(0)), + false, + }, + } + + for _, tc := range testCases { + err := tc.msg.ValidateBasic() + if tc.expPass { + suite.Require().NoError(err, "valid case %s failed", tc.name) + } else { + suite.Require().Error(err, "invalid case %s passed", tc.name) + } + } +} diff --git a/modules/core/03-connection/types/params.go b/modules/core/03-connection/types/params.go index 35677062fdb..bca180757d9 100644 --- a/modules/core/03-connection/types/params.go +++ b/modules/core/03-connection/types/params.go @@ -3,21 +3,11 @@ package types import ( "fmt" "time" - - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) // DefaultTimePerBlock is the default value for maximum expected time per block (in nanoseconds). const DefaultTimePerBlock = 30 * time.Second -// KeyMaxExpectedTimePerBlock is store's key for MaxExpectedTimePerBlock parameter -var KeyMaxExpectedTimePerBlock = []byte("MaxExpectedTimePerBlock") - -// ParamKeyTable type declaration for parameters -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - // NewParams creates a new parameter configuration for the ibc connection module func NewParams(timePerBlock uint64) Params { return Params{ @@ -37,18 +27,3 @@ func (p Params) Validate() error { } return nil } - -// ParamSetPairs implements params.ParamSet -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(KeyMaxExpectedTimePerBlock, p.MaxExpectedTimePerBlock, validateParams), - } -} - -func validateParams(i interface{}) error { - _, ok := i.(uint64) - if !ok { - return fmt.Errorf("invalid parameter. expected %T, got type: %T", uint64(1), i) - } - return nil -} diff --git a/modules/core/03-connection/types/params_legacy.go b/modules/core/03-connection/types/params_legacy.go new file mode 100644 index 00000000000..c57c3e359e5 --- /dev/null +++ b/modules/core/03-connection/types/params_legacy.go @@ -0,0 +1,36 @@ +/* +NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov +controlled execution of MsgUpdateParams messages. These types remains solely +for migration purposes and will be removed in a future release. +[#3621](https://github.com/cosmos/ibc-go/issues/3621) +*/ +package types + +import ( + fmt "fmt" + + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// KeyMaxExpectedTimePerBlock is store's key for MaxExpectedTimePerBlock parameter +var KeyMaxExpectedTimePerBlock = []byte("MaxExpectedTimePerBlock") + +// ParamKeyTable type declaration for parameters +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// ParamSetPairs implements params.ParamSet +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyMaxExpectedTimePerBlock, &p.MaxExpectedTimePerBlock, validateParams), + } +} + +func validateParams(i interface{}) error { + _, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter. expected %T, got type: %T", uint64(1), i) + } + return nil +} diff --git a/modules/core/03-connection/types/tx.pb.go b/modules/core/03-connection/types/tx.pb.go index e1cbf6903b7..e3a4ff369dc 100644 --- a/modules/core/03-connection/types/tx.pb.go +++ b/modules/core/03-connection/types/tx.pb.go @@ -378,6 +378,100 @@ func (m *MsgConnectionOpenConfirmResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConnectionOpenConfirmResponse proto.InternalMessageInfo +// MsgUpdateConnectionParams defines the sdk.Msg type to update the connection parameters. +type MsgUpdateConnectionParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the connection parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateConnectionParams) Reset() { *m = MsgUpdateConnectionParams{} } +func (m *MsgUpdateConnectionParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateConnectionParams) ProtoMessage() {} +func (*MsgUpdateConnectionParams) Descriptor() ([]byte, []int) { + return fileDescriptor_5d00fde5fc97399e, []int{8} +} +func (m *MsgUpdateConnectionParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateConnectionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateConnectionParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateConnectionParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateConnectionParams.Merge(m, src) +} +func (m *MsgUpdateConnectionParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateConnectionParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateConnectionParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateConnectionParams proto.InternalMessageInfo + +func (m *MsgUpdateConnectionParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateConnectionParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateConnectionParamsResponse defines the MsgUpdateConnectionParams response type. +type MsgUpdateConnectionParamsResponse struct { +} + +func (m *MsgUpdateConnectionParamsResponse) Reset() { *m = MsgUpdateConnectionParamsResponse{} } +func (m *MsgUpdateConnectionParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateConnectionParamsResponse) ProtoMessage() {} +func (*MsgUpdateConnectionParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5d00fde5fc97399e, []int{9} +} +func (m *MsgUpdateConnectionParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateConnectionParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateConnectionParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateConnectionParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateConnectionParamsResponse.Merge(m, src) +} +func (m *MsgUpdateConnectionParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateConnectionParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateConnectionParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateConnectionParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgConnectionOpenInit)(nil), "ibc.core.connection.v1.MsgConnectionOpenInit") proto.RegisterType((*MsgConnectionOpenInitResponse)(nil), "ibc.core.connection.v1.MsgConnectionOpenInitResponse") @@ -387,6 +481,8 @@ func init() { proto.RegisterType((*MsgConnectionOpenAckResponse)(nil), "ibc.core.connection.v1.MsgConnectionOpenAckResponse") proto.RegisterType((*MsgConnectionOpenConfirm)(nil), "ibc.core.connection.v1.MsgConnectionOpenConfirm") proto.RegisterType((*MsgConnectionOpenConfirmResponse)(nil), "ibc.core.connection.v1.MsgConnectionOpenConfirmResponse") + proto.RegisterType((*MsgUpdateConnectionParams)(nil), "ibc.core.connection.v1.MsgUpdateConnectionParams") + proto.RegisterType((*MsgUpdateConnectionParamsResponse)(nil), "ibc.core.connection.v1.MsgUpdateConnectionParamsResponse") } func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } @@ -470,6 +566,9 @@ type MsgClient interface { // ConnectionOpenConfirm defines a rpc handler method for // MsgConnectionOpenConfirm. ConnectionOpenConfirm(ctx context.Context, in *MsgConnectionOpenConfirm, opts ...grpc.CallOption) (*MsgConnectionOpenConfirmResponse, error) + // UpdateConnectionParams defines a rpc handler method for + // MsgUpdateConnectionParams. + UpdateConnectionParams(ctx context.Context, in *MsgUpdateConnectionParams, opts ...grpc.CallOption) (*MsgUpdateConnectionParamsResponse, error) } type msgClient struct { @@ -516,6 +615,15 @@ func (c *msgClient) ConnectionOpenConfirm(ctx context.Context, in *MsgConnection return out, nil } +func (c *msgClient) UpdateConnectionParams(ctx context.Context, in *MsgUpdateConnectionParams, opts ...grpc.CallOption) (*MsgUpdateConnectionParamsResponse, error) { + out := new(MsgUpdateConnectionParamsResponse) + err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Msg/UpdateConnectionParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. @@ -527,6 +635,9 @@ type MsgServer interface { // ConnectionOpenConfirm defines a rpc handler method for // MsgConnectionOpenConfirm. ConnectionOpenConfirm(context.Context, *MsgConnectionOpenConfirm) (*MsgConnectionOpenConfirmResponse, error) + // UpdateConnectionParams defines a rpc handler method for + // MsgUpdateConnectionParams. + UpdateConnectionParams(context.Context, *MsgUpdateConnectionParams) (*MsgUpdateConnectionParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -545,6 +656,9 @@ func (*UnimplementedMsgServer) ConnectionOpenAck(ctx context.Context, req *MsgCo func (*UnimplementedMsgServer) ConnectionOpenConfirm(ctx context.Context, req *MsgConnectionOpenConfirm) (*MsgConnectionOpenConfirmResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConnectionOpenConfirm not implemented") } +func (*UnimplementedMsgServer) UpdateConnectionParams(ctx context.Context, req *MsgUpdateConnectionParams) (*MsgUpdateConnectionParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateConnectionParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -622,6 +736,24 @@ func _Msg_ConnectionOpenConfirm_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_UpdateConnectionParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateConnectionParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateConnectionParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.connection.v1.Msg/UpdateConnectionParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateConnectionParams(ctx, req.(*MsgUpdateConnectionParams)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "ibc.core.connection.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -642,6 +774,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ConnectionOpenConfirm", Handler: _Msg_ConnectionOpenConfirm_Handler, }, + { + MethodName: "UpdateConnectionParams", + Handler: _Msg_UpdateConnectionParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ibc/core/connection/v1/tx.proto", @@ -1106,6 +1242,69 @@ func (m *MsgConnectionOpenConfirmResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *MsgUpdateConnectionParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateConnectionParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateConnectionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateConnectionParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateConnectionParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateConnectionParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1307,6 +1506,30 @@ func (m *MsgConnectionOpenConfirmResponse) Size() (n int) { return n } +func (m *MsgUpdateConnectionParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateConnectionParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2786,6 +3009,171 @@ func (m *MsgConnectionOpenConfirmResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateConnectionParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateConnectionParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateConnectionParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateConnectionParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateConnectionParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateConnectionParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/keeper/keeper.go b/modules/core/keeper/keeper.go index 1eefcdc2b3d..8f659038016 100644 --- a/modules/core/keeper/keeper.go +++ b/modules/core/keeper/keeper.go @@ -95,11 +95,6 @@ func (k *Keeper) SetRouter(rtr *porttypes.Router) { k.Router.Seal() } -// GetAuthority returns the client submodule's authority. -func (k Keeper) GetAuthority() string { - return k.authority -} - // isEmpty checks if the interface is an empty struct or a pointer pointing // to an empty struct func isEmpty(keeper interface{}) bool { @@ -115,3 +110,8 @@ func isEmpty(keeper interface{}) bool { } return false } + +// GetAuthority returns the ibc module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index c6544fd0cd7..9d35faea002 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -706,3 +706,15 @@ func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUp return &clienttypes.MsgUpdateParamsResponse{}, nil } + +// UpdateConnectionParams defines a rpc handler method for MsgUpdateConnectionParams. +func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateConnectionParams) (*connectiontypes.MsgUpdateConnectionParamsResponse, error) { + if k.GetAuthority() != msg.Authority { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + k.ConnectionKeeper.SetParams(ctx, msg.Params) + + return &connectiontypes.MsgUpdateConnectionParamsResponse{}, nil +} diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index 2dde4db00fb..c54f33cc536 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -5,6 +5,7 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" @@ -825,3 +826,54 @@ func (suite *KeeperTestSuite) TestUpdateClientParams() { }) } } + +// TestUpdateConnectionParams tests the UpdateConnectionParams rpc handler +func (suite *KeeperTestSuite) TestUpdateConnectionParams() { + validAuthority := suite.chainA.App.GetIBCKeeper().GetAuthority() + testCases := []struct { + name string + msg *connectiontypes.MsgUpdateConnectionParams + expPass bool + }{ + { + "success: valid authority and default params", + connectiontypes.NewMsgUpdateConnectionParams(validAuthority, connectiontypes.DefaultParams()), + true, + }, + { + "failure: malformed authority address", + connectiontypes.NewMsgUpdateConnectionParams(ibctesting.InvalidID, connectiontypes.DefaultParams()), + false, + }, + { + "failure: empty authority address", + connectiontypes.NewMsgUpdateConnectionParams("", connectiontypes.DefaultParams()), + false, + }, + { + "failure: whitespace authority address", + connectiontypes.NewMsgUpdateConnectionParams(" ", connectiontypes.DefaultParams()), + false, + }, + { + "failure: unauthorized authority address", + connectiontypes.NewMsgUpdateConnectionParams(ibctesting.TestAccAddress, connectiontypes.DefaultParams()), + false, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + suite.SetupTest() + _, err := keeper.Keeper.UpdateConnectionParams(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), tc.msg) + if tc.expPass { + suite.Require().NoError(err) + p := suite.chainA.App.GetIBCKeeper().ConnectionKeeper.GetParams(suite.chainA.GetContext()) + suite.Require().Equal(tc.msg.Params, p) + } else { + suite.Require().Error(err) + } + }) + } +} diff --git a/modules/core/module.go b/modules/core/module.go index 1abee13facd..08bec4991fb 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -138,7 +138,13 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { panic(err) } - if err := cfg.RegisterMigration(exported.ModuleName, 4, clientMigrator.MigrateParams); err != nil { + if err := cfg.RegisterMigration(exported.ModuleName, 4, func(ctx sdk.Context) error { + if err := clientMigrator.MigrateParams(ctx); err != nil { + return err + } + + return connectionMigrator.MigrateParams(ctx) + }); err != nil { panic(err) } } diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 5125da1ef99..251c57d029c 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -4,6 +4,7 @@ package ibc.core.connection.v1; option go_package = "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types"; +import "cosmos/msg/v1/msg.proto"; import "gogoproto/gogo.proto"; import "cosmos/msg/v1/msg.proto"; import "google/protobuf/any.proto"; @@ -26,6 +27,10 @@ service Msg { // ConnectionOpenConfirm defines a rpc handler method for // MsgConnectionOpenConfirm. rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); + + // UpdateConnectionParams defines a rpc handler method for + // MsgUpdateConnectionParams. + rpc UpdateConnectionParams(MsgUpdateConnectionParams) returns (MsgUpdateConnectionParamsResponse); } // MsgConnectionOpenInit defines the msg sent by an account on Chain A to @@ -126,3 +131,19 @@ message MsgConnectionOpenConfirm { // MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm // response type. message MsgConnectionOpenConfirmResponse {} + +// MsgUpdateConnectionParams defines the sdk.Msg type to update the connection parameters. +message MsgUpdateConnectionParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1; + + // params defines the connection parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateConnectionParamsResponse defines the MsgUpdateConnectionParams response type. +message MsgUpdateConnectionParamsResponse {} \ No newline at end of file From ebd282c7cc145276cc28ff7f83e3e6e140ce1954 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 31 May 2023 11:27:47 +0300 Subject: [PATCH 02/11] Rename messages to match other modules. --- .../core/03-connection/connection_test.go | 2 +- modules/core/03-connection/keeper/keeper.go | 4 +- .../core/03-connection/keeper/keeper_test.go | 4 +- modules/core/03-connection/types/codec.go | 2 +- modules/core/03-connection/types/msgs.go | 16 +- modules/core/03-connection/types/msgs_test.go | 12 +- modules/core/03-connection/types/tx.pb.go | 229 +++++++++--------- modules/core/keeper/msg_server.go | 6 +- modules/core/keeper/msg_server_test.go | 12 +- proto/ibc/core/connection/v1/tx.proto | 12 +- 10 files changed, 153 insertions(+), 146 deletions(-) diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index 89081ce15d8..a771b8008ee 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -69,7 +69,7 @@ func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() { s.Require().NoError(err) s.Require().NotNil(authority) - msg := connectiontypes.NewMsgUpdateConnectionParams(authority.String(), connectiontypes.NewParams(delay)) + msg := connectiontypes.NewMsgUpdateParams(authority.String(), connectiontypes.NewParams(delay)) s.ExecuteGovProposalV1(ctx, msg, chainA, chainAWallet, 1) } else { changes := []paramsproposaltypes.ParamChange{ diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index 7469a7b26c2..923554ca0ff 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -226,8 +226,8 @@ func (k Keeper) addConnectionToClient(ctx sdk.Context, clientID, connectionID st func (k Keeper) GetParams(ctx sdk.Context) types.Params { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.ParamsKey)) - if len(bz) == 0 { - return types.Params{} + if bz == nil { // only panic on unset params and not on empty params + panic("controller params are not set in store") } var params types.Params diff --git a/modules/core/03-connection/keeper/keeper_test.go b/modules/core/03-connection/keeper/keeper_test.go index 2961c2ad474..254d8e82365 100644 --- a/modules/core/03-connection/keeper/keeper_test.go +++ b/modules/core/03-connection/keeper/keeper_test.go @@ -224,5 +224,7 @@ func (suite *KeeperTestSuite) TestUnsetParams() { store := ctx.KVStore(suite.chainA.GetSimApp().GetKey(exported.StoreKey)) store.Delete([]byte(types.ParamsKey)) - suite.Require().Equal(suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx), types.Params{}) + suite.Require().Panics(func() { + suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx) + }) } diff --git a/modules/core/03-connection/types/codec.go b/modules/core/03-connection/types/codec.go index 70b326ab1f8..d6c1c1b2693 100644 --- a/modules/core/03-connection/types/codec.go +++ b/modules/core/03-connection/types/codec.go @@ -33,7 +33,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgConnectionOpenTry{}, &MsgConnectionOpenAck{}, &MsgConnectionOpenConfirm{}, - &MsgUpdateConnectionParams{}, + &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/modules/core/03-connection/types/msgs.go b/modules/core/03-connection/types/msgs.go index 2fea697f6ee..bacfe83c9e9 100644 --- a/modules/core/03-connection/types/msgs.go +++ b/modules/core/03-connection/types/msgs.go @@ -17,7 +17,7 @@ var ( _ sdk.Msg = (*MsgConnectionOpenConfirm)(nil) _ sdk.Msg = (*MsgConnectionOpenAck)(nil) _ sdk.Msg = (*MsgConnectionOpenTry)(nil) - _ sdk.Msg = (*MsgUpdateConnectionParams)(nil) + _ sdk.Msg = (*MsgUpdateParams)(nil) _ codectypes.UnpackInterfacesMessage = (*MsgConnectionOpenTry)(nil) _ codectypes.UnpackInterfacesMessage = (*MsgConnectionOpenAck)(nil) @@ -291,16 +291,16 @@ func (msg MsgConnectionOpenConfirm) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{accAddr} } -// NewMsgUpdateConnectionParams creates a new MsgUpdateConnectionParams instance -func NewMsgUpdateConnectionParams(authority string, params Params) *MsgUpdateConnectionParams { - return &MsgUpdateConnectionParams{ +// NewMsgUpdateParams creates a new MsgUpdateParams instance +func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { + return &MsgUpdateParams{ Authority: authority, Params: params, } } -// GetSigners returns the expected signers for a MsgUpdateConnectionParams message. -func (msg *MsgUpdateConnectionParams) GetSigners() []sdk.AccAddress { +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { accAddr, err := sdk.AccAddressFromBech32(msg.Authority) if err != nil { panic(err) @@ -308,8 +308,8 @@ func (msg *MsgUpdateConnectionParams) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{accAddr} } -// ValidateBasic performs basic checks on a MsgUpdateConnectionParams. -func (msg *MsgUpdateConnectionParams) ValidateBasic() error { +// ValidateBasic performs basic checks on a MsgUpdateParams. +func (msg *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index e1f2f85204a..df19129a6c9 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -232,27 +232,27 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { } } -// TestMsgUpdateConnectionParams_ValidateBasic tests ValidateBasic for MsgUpdateConnectionParams -func (suite *MsgTestSuite) TestMsgUpdateConnectionParams_ValidateBasic() { +// TestMsgUpdateParams_ValidateBasic tests ValidateBasic for MsgUpdateParams +func (suite *MsgTestSuite) TestMsgUpdateParams_ValidateBasic() { authority := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { name string - msg *types.MsgUpdateConnectionParams + msg *types.MsgUpdateParams expPass bool }{ { "success: valid authority and params", - types.NewMsgUpdateConnectionParams(authority, types.DefaultParams()), + types.NewMsgUpdateParams(authority, types.DefaultParams()), true, }, { "failure: invalid authority address", - types.NewMsgUpdateConnectionParams("invalid", types.DefaultParams()), + types.NewMsgUpdateParams("invalid", types.DefaultParams()), false, }, { "failure: invalid time per block", - types.NewMsgUpdateConnectionParams(authority, types.NewParams(0)), + types.NewMsgUpdateParams(authority, types.NewParams(0)), false, }, } diff --git a/modules/core/03-connection/types/tx.pb.go b/modules/core/03-connection/types/tx.pb.go index e3a4ff369dc..41e31addeab 100644 --- a/modules/core/03-connection/types/tx.pb.go +++ b/modules/core/03-connection/types/tx.pb.go @@ -378,8 +378,8 @@ func (m *MsgConnectionOpenConfirmResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConnectionOpenConfirmResponse proto.InternalMessageInfo -// MsgUpdateConnectionParams defines the sdk.Msg type to update the connection parameters. -type MsgUpdateConnectionParams struct { +// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. +type MsgUpdateParams struct { // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the connection parameters to update. @@ -388,18 +388,18 @@ type MsgUpdateConnectionParams struct { Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } -func (m *MsgUpdateConnectionParams) Reset() { *m = MsgUpdateConnectionParams{} } -func (m *MsgUpdateConnectionParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateConnectionParams) ProtoMessage() {} -func (*MsgUpdateConnectionParams) Descriptor() ([]byte, []int) { +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return fileDescriptor_5d00fde5fc97399e, []int{8} } -func (m *MsgUpdateConnectionParams) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateConnectionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateConnectionParams.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -409,48 +409,48 @@ func (m *MsgUpdateConnectionParams) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgUpdateConnectionParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateConnectionParams.Merge(m, src) +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) } -func (m *MsgUpdateConnectionParams) XXX_Size() int { +func (m *MsgUpdateParams) XXX_Size() int { return m.Size() } -func (m *MsgUpdateConnectionParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateConnectionParams.DiscardUnknown(m) +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateConnectionParams proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo -func (m *MsgUpdateConnectionParams) GetAuthority() string { +func (m *MsgUpdateParams) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgUpdateConnectionParams) GetParams() Params { +func (m *MsgUpdateParams) GetParams() Params { if m != nil { return m.Params } return Params{} } -// MsgUpdateConnectionParamsResponse defines the MsgUpdateConnectionParams response type. -type MsgUpdateConnectionParamsResponse struct { +// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +type MsgUpdateParamsResponse struct { } -func (m *MsgUpdateConnectionParamsResponse) Reset() { *m = MsgUpdateConnectionParamsResponse{} } -func (m *MsgUpdateConnectionParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateConnectionParamsResponse) ProtoMessage() {} -func (*MsgUpdateConnectionParamsResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5d00fde5fc97399e, []int{9} } -func (m *MsgUpdateConnectionParamsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateConnectionParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateConnectionParamsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -460,17 +460,17 @@ func (m *MsgUpdateConnectionParamsResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgUpdateConnectionParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateConnectionParamsResponse.Merge(m, src) +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) } -func (m *MsgUpdateConnectionParamsResponse) XXX_Size() int { +func (m *MsgUpdateParamsResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateConnectionParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateConnectionParamsResponse.DiscardUnknown(m) +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateConnectionParamsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgConnectionOpenInit)(nil), "ibc.core.connection.v1.MsgConnectionOpenInit") @@ -481,68 +481,73 @@ func init() { proto.RegisterType((*MsgConnectionOpenAckResponse)(nil), "ibc.core.connection.v1.MsgConnectionOpenAckResponse") proto.RegisterType((*MsgConnectionOpenConfirm)(nil), "ibc.core.connection.v1.MsgConnectionOpenConfirm") proto.RegisterType((*MsgConnectionOpenConfirmResponse)(nil), "ibc.core.connection.v1.MsgConnectionOpenConfirmResponse") - proto.RegisterType((*MsgUpdateConnectionParams)(nil), "ibc.core.connection.v1.MsgUpdateConnectionParams") - proto.RegisterType((*MsgUpdateConnectionParamsResponse)(nil), "ibc.core.connection.v1.MsgUpdateConnectionParamsResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "ibc.core.connection.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "ibc.core.connection.v1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 864 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6e, 0xeb, 0x44, - 0x14, 0xc6, 0xe3, 0xc6, 0x49, 0x93, 0x49, 0x2e, 0x17, 0x86, 0xb4, 0x35, 0x2e, 0x4d, 0xd2, 0x80, - 0xd4, 0xa8, 0xa2, 0x76, 0xff, 0x80, 0x5a, 0xa0, 0x9b, 0x34, 0x1b, 0x2a, 0x54, 0xa8, 0x4c, 0xd5, - 0x05, 0x9b, 0x28, 0x71, 0xa6, 0xce, 0x28, 0x89, 0xc7, 0xf2, 0x38, 0x01, 0xb3, 0xaa, 0x60, 0xc3, - 0x0e, 0x1e, 0xa1, 0x8f, 0xd0, 0xc7, 0xe8, 0x0a, 0x55, 0x2c, 0x10, 0x2b, 0x84, 0xda, 0x45, 0x79, - 0x0c, 0xe4, 0x19, 0x3b, 0x71, 0x12, 0x07, 0x9c, 0xf6, 0xee, 0x92, 0xe3, 0xef, 0x9c, 0xf9, 0xe6, - 0x9c, 0xdf, 0x78, 0x0c, 0x4a, 0xb8, 0xa5, 0xab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 0xff, 0xf6, 0xdb, 0x3d, 0xd8, 0x09, 0x7d, 0xfe, 0x39, 0xae, 0x85, 0x68, 0x2b, 0xcd, 0xde, - 0x77, 0x07, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xad, 0x10, 0xac, 0xa8, 0xc6, 0x0a, 0x00, 0x00, + // 935 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xc7, 0xbd, 0x89, 0xe3, 0xd8, 0x8f, 0xdd, 0xe6, 0xf7, 0x1b, 0x39, 0xc9, 0x76, 0xdb, 0xda, + 0xae, 0x41, 0x4a, 0x84, 0xc8, 0x6e, 0xd3, 0x82, 0x5a, 0x4a, 0x2e, 0x89, 0x2f, 0x44, 0x28, 0x50, + 0x2d, 0xa1, 0x07, 0x2e, 0x96, 0xbd, 0x9e, 0xac, 0x47, 0x89, 0x77, 0x56, 0x3b, 0x63, 0xc3, 0x22, + 0x71, 0x01, 0x0e, 0x1c, 0x79, 0x09, 0x7d, 0x09, 0xbc, 0x07, 0x0e, 0x54, 0xe2, 0xd2, 0x23, 0x27, + 0x84, 0x92, 0x03, 0x5c, 0x78, 0x0f, 0x68, 0x67, 0x66, 0xff, 0xc4, 0x7f, 0xaa, 0x75, 0x73, 0x5b, + 0x3f, 0xfe, 0x3e, 0xdf, 0xf9, 0xce, 0x33, 0x9f, 0xfd, 0x03, 0x4d, 0xd2, 0x77, 0x2c, 0x87, 0x06, + 0xd8, 0x72, 0xa8, 0xe7, 0x61, 0x87, 0x13, 0xea, 0x59, 0x93, 0x7d, 0x8b, 0x7f, 0x63, 0xfa, 0x01, + 0xe5, 0x14, 0x6d, 0x91, 0xbe, 0x63, 0x46, 0x02, 0x33, 0x15, 0x98, 0x93, 0x7d, 0x63, 0xdb, 0xa1, + 0x6c, 0x44, 0x99, 0x35, 0x62, 0x6e, 0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55, 0xa3, 0xf0, 0xd5, 0x81, 0x4b, + 0xf8, 0x70, 0xdc, 0x37, 0x1d, 0x3a, 0xb2, 0xd4, 0xc7, 0x32, 0xe9, 0x3b, 0x7b, 0x2e, 0xb5, 0x26, + 0x4f, 0xac, 0x11, 0x1d, 0x8c, 0x2f, 0x30, 0x93, 0x9f, 0xb5, 0x0f, 0x1f, 0xef, 0x65, 0xbe, 0x6c, + 0x79, 0xe8, 0x63, 0xd6, 0x2f, 0x89, 0x07, 0xfc, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x08, + 0x4a, 0x3a, 0x23, 0xa1, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -567,8 +572,8 @@ type MsgClient interface { // MsgConnectionOpenConfirm. ConnectionOpenConfirm(ctx context.Context, in *MsgConnectionOpenConfirm, opts ...grpc.CallOption) (*MsgConnectionOpenConfirmResponse, error) // UpdateConnectionParams defines a rpc handler method for - // MsgUpdateConnectionParams. - UpdateConnectionParams(ctx context.Context, in *MsgUpdateConnectionParams, opts ...grpc.CallOption) (*MsgUpdateConnectionParamsResponse, error) + // MsgUpdateParams. + UpdateConnectionParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -615,8 +620,8 @@ func (c *msgClient) ConnectionOpenConfirm(ctx context.Context, in *MsgConnection return out, nil } -func (c *msgClient) UpdateConnectionParams(ctx context.Context, in *MsgUpdateConnectionParams, opts ...grpc.CallOption) (*MsgUpdateConnectionParamsResponse, error) { - out := new(MsgUpdateConnectionParamsResponse) +func (c *msgClient) UpdateConnectionParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Msg/UpdateConnectionParams", in, out, opts...) if err != nil { return nil, err @@ -636,8 +641,8 @@ type MsgServer interface { // MsgConnectionOpenConfirm. ConnectionOpenConfirm(context.Context, *MsgConnectionOpenConfirm) (*MsgConnectionOpenConfirmResponse, error) // UpdateConnectionParams defines a rpc handler method for - // MsgUpdateConnectionParams. - UpdateConnectionParams(context.Context, *MsgUpdateConnectionParams) (*MsgUpdateConnectionParamsResponse, error) + // MsgUpdateParams. + UpdateConnectionParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -656,7 +661,7 @@ func (*UnimplementedMsgServer) ConnectionOpenAck(ctx context.Context, req *MsgCo func (*UnimplementedMsgServer) ConnectionOpenConfirm(ctx context.Context, req *MsgConnectionOpenConfirm) (*MsgConnectionOpenConfirmResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConnectionOpenConfirm not implemented") } -func (*UnimplementedMsgServer) UpdateConnectionParams(ctx context.Context, req *MsgUpdateConnectionParams) (*MsgUpdateConnectionParamsResponse, error) { +func (*UnimplementedMsgServer) UpdateConnectionParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConnectionParams not implemented") } @@ -737,7 +742,7 @@ func _Msg_ConnectionOpenConfirm_Handler(srv interface{}, ctx context.Context, de } func _Msg_UpdateConnectionParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateConnectionParams) + in := new(MsgUpdateParams) if err := dec(in); err != nil { return nil, err } @@ -749,7 +754,7 @@ func _Msg_UpdateConnectionParams_Handler(srv interface{}, ctx context.Context, d FullMethod: "/ibc.core.connection.v1.Msg/UpdateConnectionParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateConnectionParams(ctx, req.(*MsgUpdateConnectionParams)) + return srv.(MsgServer).UpdateConnectionParams(ctx, req.(*MsgUpdateParams)) } return interceptor(ctx, in, info, handler) } @@ -1242,7 +1247,7 @@ func (m *MsgConnectionOpenConfirmResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *MsgUpdateConnectionParams) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1252,12 +1257,12 @@ func (m *MsgUpdateConnectionParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateConnectionParams) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateConnectionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1282,7 +1287,7 @@ func (m *MsgUpdateConnectionParams) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgUpdateConnectionParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1292,12 +1297,12 @@ func (m *MsgUpdateConnectionParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateConnectionParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateConnectionParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1506,7 +1511,7 @@ func (m *MsgConnectionOpenConfirmResponse) Size() (n int) { return n } -func (m *MsgUpdateConnectionParams) Size() (n int) { +func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 } @@ -1521,7 +1526,7 @@ func (m *MsgUpdateConnectionParams) Size() (n int) { return n } -func (m *MsgUpdateConnectionParamsResponse) Size() (n int) { +func (m *MsgUpdateParamsResponse) Size() (n int) { if m == nil { return 0 } @@ -3009,7 +3014,7 @@ func (m *MsgConnectionOpenConfirmResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateConnectionParams) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3032,10 +3037,10 @@ func (m *MsgUpdateConnectionParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateConnectionParams: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateConnectionParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3124,7 +3129,7 @@ func (m *MsgUpdateConnectionParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateConnectionParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3147,10 +3152,10 @@ func (m *MsgUpdateConnectionParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateConnectionParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateConnectionParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index 9d35faea002..e7cf1d7a6d3 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -707,8 +707,8 @@ func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUp return &clienttypes.MsgUpdateParamsResponse{}, nil } -// UpdateConnectionParams defines a rpc handler method for MsgUpdateConnectionParams. -func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateConnectionParams) (*connectiontypes.MsgUpdateConnectionParamsResponse, error) { +// UpdateConnectionParams defines a rpc handler method for MsgUpdateParams for the connection submodule. +func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateParams) (*connectiontypes.MsgUpdateParamsResponse, error) { if k.GetAuthority() != msg.Authority { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) } @@ -716,5 +716,5 @@ func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontyp ctx := sdk.UnwrapSDKContext(goCtx) k.ConnectionKeeper.SetParams(ctx, msg.Params) - return &connectiontypes.MsgUpdateConnectionParamsResponse{}, nil + return &connectiontypes.MsgUpdateParamsResponse{}, nil } diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index c54f33cc536..e1acbe74f1f 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -832,32 +832,32 @@ func (suite *KeeperTestSuite) TestUpdateConnectionParams() { validAuthority := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { name string - msg *connectiontypes.MsgUpdateConnectionParams + msg *connectiontypes.MsgUpdateParams expPass bool }{ { "success: valid authority and default params", - connectiontypes.NewMsgUpdateConnectionParams(validAuthority, connectiontypes.DefaultParams()), + connectiontypes.NewMsgUpdateParams(validAuthority, connectiontypes.DefaultParams()), true, }, { "failure: malformed authority address", - connectiontypes.NewMsgUpdateConnectionParams(ibctesting.InvalidID, connectiontypes.DefaultParams()), + connectiontypes.NewMsgUpdateParams(ibctesting.InvalidID, connectiontypes.DefaultParams()), false, }, { "failure: empty authority address", - connectiontypes.NewMsgUpdateConnectionParams("", connectiontypes.DefaultParams()), + connectiontypes.NewMsgUpdateParams("", connectiontypes.DefaultParams()), false, }, { "failure: whitespace authority address", - connectiontypes.NewMsgUpdateConnectionParams(" ", connectiontypes.DefaultParams()), + connectiontypes.NewMsgUpdateParams(" ", connectiontypes.DefaultParams()), false, }, { "failure: unauthorized authority address", - connectiontypes.NewMsgUpdateConnectionParams(ibctesting.TestAccAddress, connectiontypes.DefaultParams()), + connectiontypes.NewMsgUpdateParams(ibctesting.TestAccAddress, connectiontypes.DefaultParams()), false, }, } diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 251c57d029c..4de6f55bd2b 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -29,8 +29,8 @@ service Msg { rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); // UpdateConnectionParams defines a rpc handler method for - // MsgUpdateConnectionParams. - rpc UpdateConnectionParams(MsgUpdateConnectionParams) returns (MsgUpdateConnectionParamsResponse); + // MsgUpdateParams. + rpc UpdateConnectionParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } // MsgConnectionOpenInit defines the msg sent by an account on Chain A to @@ -132,8 +132,8 @@ message MsgConnectionOpenConfirm { // response type. message MsgConnectionOpenConfirmResponse {} -// MsgUpdateConnectionParams defines the sdk.Msg type to update the connection parameters. -message MsgUpdateConnectionParams { +// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. +message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. @@ -145,5 +145,5 @@ message MsgUpdateConnectionParams { Params params = 2 [(gogoproto.nullable) = false]; } -// MsgUpdateConnectionParamsResponse defines the MsgUpdateConnectionParams response type. -message MsgUpdateConnectionParamsResponse {} \ No newline at end of file +// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +message MsgUpdateParamsResponse {} \ No newline at end of file From 0264478bcc70d6d6f1b81ab88598259cb831dccf Mon Sep 17 00:00:00 2001 From: Jim Fasarakis-Hilliard Date: Wed, 31 May 2023 12:14:12 +0300 Subject: [PATCH 03/11] Update proto/ibc/core/connection/v1/tx.proto Co-authored-by: Damian Nolan --- proto/ibc/core/connection/v1/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 4de6f55bd2b..737f0a9ba24 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -136,7 +136,7 @@ message MsgConnectionOpenConfirmResponse {} message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - // authority is the address of the governance account. + // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1; // params defines the connection parameters to update. From 4544b0032eab1bfbaf2c889a32899b668e0f9476 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 31 May 2023 12:50:10 +0300 Subject: [PATCH 04/11] Address review comments. --- .../core/03-connection/connection_test.go | 23 ++++++++++++++++--- modules/core/keeper/keeper.go | 10 ++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index a771b8008ee..fcc86de3957 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -3,6 +3,8 @@ package connection import ( "context" "fmt" + "strconv" + "strings" "testing" "time" @@ -29,11 +31,26 @@ type ConnectionTestSuite struct { // QueryMaxExpectedTimePerBlockParam queries the on-chain max expected time per block param for 03-connection func (s *ConnectionTestSuite) QueryMaxExpectedTimePerBlockParam(ctx context.Context, chain ibc.Chain) uint64 { - queryClient := s.GetChainGRCPClients(chain).ConnectionQueryClient - res, err := queryClient.ConnectionParams(ctx, &connectiontypes.QueryConnectionParamsRequest{}) + if testvalues.SelfParamsFeatureReleases.IsSupported(chain.Config().Images[0].Version) { + queryClient := s.GetChainGRCPClients(chain).ConnectionQueryClient + res, err := queryClient.ConnectionParams(ctx, &connectiontypes.QueryConnectionParamsRequest{}) + s.Require().NoError(err) + + return res.Params.MaxExpectedTimePerBlock + } + queryClient := s.GetChainGRCPClients(chain).ParamsQueryClient + res, err := queryClient.Params(ctx, ¶msproposaltypes.QueryParamsRequest{ + Subspace: ibcexported.ModuleName, + Key: string(connectiontypes.KeyMaxExpectedTimePerBlock), + }) + s.Require().NoError(err) + + // removing additional strings that are used for amino + delay := strings.ReplaceAll(res.Param.Value, "\"", "") + time, err := strconv.ParseUint(delay, 10, 64) s.Require().NoError(err) - return res.Params.MaxExpectedTimePerBlock + return time } // TestMaxExpectedTimePerBlockParam tests changing the MaxExpectedTimePerBlock param using a governance proposal diff --git a/modules/core/keeper/keeper.go b/modules/core/keeper/keeper.go index 8f659038016..fb2583a72c4 100644 --- a/modules/core/keeper/keeper.go +++ b/modules/core/keeper/keeper.go @@ -95,6 +95,11 @@ func (k *Keeper) SetRouter(rtr *porttypes.Router) { k.Router.Seal() } +// GetAuthority returns the ibc module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + // isEmpty checks if the interface is an empty struct or a pointer pointing // to an empty struct func isEmpty(keeper interface{}) bool { @@ -110,8 +115,3 @@ func isEmpty(keeper interface{}) bool { } return false } - -// GetAuthority returns the ibc module's authority. -func (k Keeper) GetAuthority() string { - return k.authority -} From c155e2a2f1ef8f95b02332ddae9df102f10ea4d8 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 31 May 2023 14:08:56 +0300 Subject: [PATCH 05/11] Use define const for default delay. --- e2e/tests/core/03-connection/connection_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index fcc86de3957..991b44d6d1d 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -74,9 +74,8 @@ func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() { s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") t.Run("ensure delay is set to the default of 30 seconds", func(t *testing.T) { - expectedDelay := uint64(30 * time.Second) delay := s.QueryMaxExpectedTimePerBlockParam(ctx, chainA) - s.Require().Equal(expectedDelay, delay) + s.Require().Equal(uint64(connectiontypes.DefaultTimePerBlock), delay) }) t.Run("change the delay to 60 seconds", func(t *testing.T) { From ae4ae1e3207ab0994f3c46ae53bc0f337240d6b9 Mon Sep 17 00:00:00 2001 From: Jim Fasarakis-Hilliard Date: Thu, 1 Jun 2023 16:39:58 +0300 Subject: [PATCH 06/11] Update modules/core/keeper/msg_server.go Co-authored-by: Damian Nolan --- modules/core/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index e7cf1d7a6d3..c75f11b8d87 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -707,7 +707,7 @@ func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUp return &clienttypes.MsgUpdateParamsResponse{}, nil } -// UpdateConnectionParams defines a rpc handler method for MsgUpdateParams for the connection submodule. +// UpdateConnectionParams defines a rpc handler method for MsgUpdateParams for the 03-connection submodule. func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateParams) (*connectiontypes.MsgUpdateParamsResponse, error) { if k.GetAuthority() != msg.Authority { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) From 5b5d425184a26ad0374720a305afaa5600864662 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 1 Jun 2023 19:20:57 +0300 Subject: [PATCH 07/11] Regenerate tx files. --- modules/core/03-connection/types/tx.pb.go | 122 +++++++++++----------- proto/ibc/core/connection/v1/tx.proto | 1 - 2 files changed, 61 insertions(+), 62 deletions(-) diff --git a/modules/core/03-connection/types/tx.pb.go b/modules/core/03-connection/types/tx.pb.go index 41e31addeab..3eeb4ea686f 100644 --- a/modules/core/03-connection/types/tx.pb.go +++ b/modules/core/03-connection/types/tx.pb.go @@ -380,7 +380,7 @@ var xxx_messageInfo_MsgConnectionOpenConfirmResponse proto.InternalMessageInfo // MsgUpdateParams defines the sdk.Msg type to update the connection parameters. type MsgUpdateParams struct { - // authority is the address of the governance account. + // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the connection parameters to update. // @@ -488,66 +488,66 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 935 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xc7, 0xbd, 0x89, 0xe3, 0xd8, 0x8f, 0xdd, 0xe6, 0xf7, 0x1b, 0x39, 0xc9, 0x76, 0xdb, 0xda, - 0xae, 0x41, 0x4a, 0x84, 0xc8, 0x6e, 0xd3, 0x82, 0x5a, 0x4a, 0x2e, 0x89, 0x2f, 0x44, 0x28, 0x50, - 0x2d, 0xa1, 0x07, 0x2e, 0x96, 0xbd, 0x9e, 0xac, 0x47, 0x89, 0x77, 0x56, 0x3b, 0x63, 0xc3, 0x22, - 0x71, 0x01, 0x0e, 0x1c, 0x79, 0x09, 0x7d, 0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, 0x83, 0x65, - 0xd4, 0x8b, 0x17, 0x8e, 0xb0, 0xc9, 0xbf, 0xf0, 0xa1, 0x73, 0xbe, 0xc4, 0xc2, 0x19, 0xf2, 0xd1, - 0x0f, 0x1a, 0x6c, 0xce, 0xc7, 0xfe, 0x61, 0x6e, 0x3f, 0xd5, 0x61, 0x3c, 0x5d, 0xb6, 0x23, 0x49, - 0x11, 0xc0, 0x96, 0x64, 0x22, 0x95, 0x29, 0x38, 0x77, 0xde, 0xe0, 0x99, 0xc5, 0xc8, 0xb0, 0x72, - 0x0a, 0xe3, 0x35, 0x8f, 0x5e, 0xbc, 0xba, 0x6c, 0x68, 0xaf, 0x2f, 0x1b, 0xda, 0x5f, 0x97, 0x0d, - 0xed, 0xe7, 0xab, 0x46, 0xe1, 0xf5, 0x55, 0xa3, 0xf0, 0xc7, 0x55, 0xa3, 0xf0, 0xd5, 0x81, 0x4b, - 0xf8, 0x70, 0xdc, 0x37, 0x1d, 0x3a, 0xb2, 0xd4, 0xc7, 0x32, 0xe9, 0x3b, 0x7b, 0x2e, 0xb5, 0x26, - 0x4f, 0xac, 0x11, 0x1d, 0x8c, 0x2f, 0x30, 0x93, 0x9f, 0xb5, 0x0f, 0x1f, 0xef, 0x65, 0xbe, 0x6c, - 0x79, 0xe8, 0x63, 0xd6, 0x2f, 0x89, 0x07, 0xfc, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x08, - 0x4a, 0x3a, 0x23, 0xa1, 0x0b, 0x00, 0x00, + // 940 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xbd, 0x89, 0xe3, 0xc4, 0xcf, 0x6e, 0x03, 0x83, 0x93, 0x6c, 0xdd, 0xd6, 0x76, 0x0d, + 0x52, 0x22, 0x44, 0x76, 0x9b, 0x16, 0xd4, 0x52, 0x72,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0xff, 0x14, 0x61, + 0xf9, 0x98, 0x39, 0xe8, 0x1b, 0x40, 0x19, 0x77, 0x86, 0xdd, 0x79, 0x69, 0x33, 0xbf, 0xa8, 0xf5, + 0x0f, 0x16, 0x92, 0x47, 0x35, 0xa0, 0xaf, 0xe0, 0xcd, 0xd9, 0x8f, 0xef, 0x7b, 0xb9, 0x63, 0x9d, + 0xf8, 0x41, 0xfd, 0xfd, 0x45, 0xd4, 0xf3, 0x13, 0x87, 0x04, 0xe5, 0x4f, 0x7c, 0x60, 0x9f, 0x2d, + 0x90, 0x38, 0xb5, 0x04, 0xe8, 0x7b, 0x0d, 0x36, 0xb2, 0x37, 0xe0, 0x7e, 0xee, 0x78, 0xca, 0xa3, + 0xfe, 0x78, 0x51, 0x8f, 0xb8, 0x0a, 0x1f, 0x36, 0x25, 0x13, 0x89, 0x4c, 0xc1, 0xb9, 0xfd, 0x8a, + 0x98, 0x69, 0x8c, 0xea, 0x66, 0x4e, 0x61, 0x94, 0xf3, 0xf0, 0xd9, 0x8b, 0x8b, 0x86, 0xf6, 0xf2, + 0xa2, 0xa1, 0xfd, 0x79, 0xd1, 0xd0, 0x7e, 0xba, 0x6c, 0x14, 0x5e, 0x5e, 0x36, 0x0a, 0xbf, 0x5f, + 0x36, 0x0a, 0x5f, 0xee, 0x3b, 0x84, 0x0f, 0xc7, 0x7d, 0xc3, 0xa6, 0x23, 0x53, 0xdd, 0x6e, 0x49, + 0xdf, 0xde, 0x75, 0xa8, 0x39, 0x79, 0x64, 0x8e, 0xe8, 0x60, 0x7c, 0x8e, 0x99, 0xbc, 0x1b, 0xdf, + 0x7f, 0xb8, 0x9b, 0xba, 0x1e, 0xf3, 0xc0, 0xc3, 0xac, 0x5f, 0x12, 0xaf, 0xfd, 0x87, 0xff, 0x06, + 0x00, 0x00, 0xff, 0xff, 0x77, 0x11, 0xf6, 0x23, 0xcd, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 737f0a9ba24..f1aaeea7b67 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -4,7 +4,6 @@ package ibc.core.connection.v1; option go_package = "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types"; -import "cosmos/msg/v1/msg.proto"; import "gogoproto/gogo.proto"; import "cosmos/msg/v1/msg.proto"; import "google/protobuf/any.proto"; From 1aaf340802c44e6a2c184ea454e7fd9bd79e783a Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Fri, 2 Jun 2023 11:44:20 +0200 Subject: [PATCH 08/11] fixed typo --- modules/core/03-connection/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index 923554ca0ff..ee37f913ef0 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -227,7 +227,7 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.ParamsKey)) if bz == nil { // only panic on unset params and not on empty params - panic("controller params are not set in store") + panic("connection params are not set in store") } var params types.Params From 10be7db3346013e04d1a8e42df51b11166bb8beb Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Fri, 2 Jun 2023 11:53:01 +0200 Subject: [PATCH 09/11] rename test --- modules/core/03-connection/keeper/keeper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/03-connection/keeper/keeper_test.go b/modules/core/03-connection/keeper/keeper_test.go index 254d8e82365..5f4e5b3f244 100644 --- a/modules/core/03-connection/keeper/keeper_test.go +++ b/modules/core/03-connection/keeper/keeper_test.go @@ -186,7 +186,7 @@ func (suite *KeeperTestSuite) TestDefaultSetParams() { } // TestParams tests that param setting and retrieval works properly -func (suite *KeeperTestSuite) TestParams() { +func (suite *KeeperTestSuite) TestSetAndGetParams() { testCases := []struct { name string input types.Params From 1925102219d8df4c7c5d92f6451e4c7b3dad39f7 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Fri, 2 Jun 2023 13:16:38 +0300 Subject: [PATCH 10/11] Rebase, regenerate. --- modules/core/03-connection/types/tx.pb.go | 121 +++++++++++----------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/modules/core/03-connection/types/tx.pb.go b/modules/core/03-connection/types/tx.pb.go index 3eeb4ea686f..be7cf0c1e24 100644 --- a/modules/core/03-connection/types/tx.pb.go +++ b/modules/core/03-connection/types/tx.pb.go @@ -488,66 +488,67 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 940 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x89, 0xe3, 0xc4, 0xcf, 0x6e, 0x03, 0x83, 0x93, 0x6c, 0xdd, 0xd6, 0x76, 0x0d, - 0x52, 0x22, 0x44, 0x76, 0x9b, 0x16, 0xd4, 0x52, 0x72, 0x49, 0x7c, 0x21, 0x42, 0x81, 0x6a, 0x09, - 0x3d, 0x70, 0xb1, 0xec, 0xf5, 0x64, 0x3d, 0x4a, 0xbc, 0xb3, 0xda, 0x19, 0x1b, 0x16, 0x89, 0x0b, - 0x5c, 0xb8, 0xc1, 0x9f, 0xd0, 0x3f, 0x81, 0x3f, 0xa3, 0x27, 0x54, 0x71, 0x40, 0x9c, 0x10, 0x4a, - 0x0e, 0x70, 0xe1, 0x7f, 0x40, 0x3b, 0x33, 0xfb, 0x23, 0xf6, 0xba, 0xac, 0x1b, 0x6e, 0xf6, 0xdb, - 0xef, 0xfb, 0x31, 0xef, 0x7d, 0xde, 0xee, 0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7e, 0xee, 0x78, 0xca, 0xa3, - 0xfe, 0x78, 0x51, 0x8f, 0xb8, 0x0a, 0x1f, 0x36, 0x25, 0x13, 0x89, 0x4c, 0xc1, 0xb9, 0xfd, 0x8a, - 0x98, 0x69, 0x8c, 0xea, 0x66, 0x4e, 0x61, 0x94, 0xf3, 0xf0, 0xd9, 0x8b, 0x8b, 0x86, 0xf6, 0xf2, - 0xa2, 0xa1, 0xfd, 0x79, 0xd1, 0xd0, 0x7e, 0xba, 0x6c, 0x14, 0x5e, 0x5e, 0x36, 0x0a, 0xbf, 0x5f, - 0x36, 0x0a, 0x5f, 0xee, 0x3b, 0x84, 0x0f, 0xc7, 0x7d, 0xc3, 0xa6, 0x23, 0x53, 0xdd, 0x6e, 0x49, - 0xdf, 0xde, 0x75, 0xa8, 0x39, 0x79, 0x64, 0x8e, 0xe8, 0x60, 0x7c, 0x8e, 0x99, 0xbc, 0x1b, 0xdf, - 0x7f, 0xb8, 0x9b, 0xba, 0x1e, 0xf3, 0xc0, 0xc3, 0xac, 0x5f, 0x12, 0xaf, 0xfd, 0x87, 0xff, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x77, 0x11, 0xf6, 0x23, 0xcd, 0x0b, 0x00, 0x00, + // 948 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xc7, 0xbd, 0x89, 0xed, 0xc4, 0x8f, 0xdd, 0x06, 0x06, 0x27, 0xd9, 0x6e, 0x5b, 0xdb, 0x35, + 0x48, 0x89, 0x2a, 0xb2, 0xdb, 0xb4, 0xa0, 0x96, 0x92, 0x4b, 0xe2, 0x0b, 0x11, 0x0a, 0x54, 0x4b, + 0xe8, 0x81, 0x8b, 0x65, 0xaf, 0x37, 0xeb, 0x51, 0xe2, 0x9d, 0xd5, 0xce, 0xd8, 0xb0, 0x48, 0x48, + 0x08, 0x2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0xd7, 0xf0, 0xf6, 0xec, 0xe1, 0xfb, 0x7e, 0xee, 0x58, + 0xc7, 0x7e, 0xa0, 0x7d, 0xb0, 0x88, 0x7a, 0xfe, 0xc2, 0x21, 0x41, 0xf9, 0x17, 0xde, 0xb7, 0x4e, + 0x17, 0x58, 0x38, 0xb5, 0x09, 0xd0, 0x8f, 0x0a, 0xac, 0x67, 0xef, 0x80, 0x7b, 0xb9, 0xe3, 0x49, + 0x0f, 0xed, 0xd1, 0xa2, 0x1e, 0x71, 0x16, 0x3e, 0x6c, 0x08, 0x26, 0x12, 0x99, 0x84, 0x73, 0xeb, + 0x35, 0x31, 0xd3, 0x18, 0x69, 0x46, 0x4e, 0x61, 0xb4, 0xa6, 0x56, 0xfa, 0xfe, 0xd5, 0xf3, 0xbb, + 0xca, 0xc1, 0xd3, 0x17, 0xe7, 0x0d, 0xe5, 0xe5, 0x79, 0x43, 0xf9, 0xeb, 0xbc, 0xa1, 0xfc, 0x72, + 0xd1, 0x28, 0xbc, 0xbc, 0x68, 0x14, 0xfe, 0xb8, 0x68, 0x14, 0xbe, 0xda, 0x73, 0x30, 0x1b, 0x8e, + 0xfb, 0xba, 0x45, 0x46, 0x86, 0xbc, 0x49, 0xe3, 0xbe, 0xb5, 0xe3, 0x10, 0x63, 0xf2, 0xd0, 0x18, + 0x91, 0xc1, 0xf8, 0xcc, 0xa6, 0xe2, 0x26, 0x7c, 0xef, 0xc1, 0x4e, 0xea, 0x32, 0xcc, 0x02, 0xcf, + 0xa6, 0xfd, 0x32, 0xff, 0xfb, 0x3f, 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x09, 0xa7, 0xf6, + 0xd4, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 6c0a635f048655b4cffc96a8a1d7f1899d5b4c0d Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Fri, 2 Jun 2023 14:14:17 +0300 Subject: [PATCH 11/11] remove redundant param validation in initgenesis. --- modules/core/03-connection/genesis.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/core/03-connection/genesis.go b/modules/core/03-connection/genesis.go index 3a8cdf5d154..df8fb28945e 100644 --- a/modules/core/03-connection/genesis.go +++ b/modules/core/03-connection/genesis.go @@ -1,8 +1,6 @@ package connection import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/core/03-connection/keeper" @@ -20,9 +18,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { k.SetClientConnectionPaths(ctx, connPaths.ClientId, connPaths.Paths) } k.SetNextConnectionSequence(ctx, gs.NextConnectionSequence) - if err := gs.Params.Validate(); err != nil { - panic(fmt.Sprintf("invalid ibc connection genesis state parameters: %v", err)) - } k.SetParams(ctx, gs.Params) k.CreateSentinelLocalhostConnection(ctx)