diff --git a/go.mod b/go.mod index b1082d0abe8..692c949614c 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,8 @@ require ( cosmossdk.io/tools/rosetta v0.2.0 github.com/armon/go-metrics v0.4.1 github.com/cosmos/cosmos-proto v1.0.0-beta.1 - github.com/cosmos/cosmos-sdk v0.47.0-rc1 - github.com/cosmos/gogoproto v1.4.3 + github.com/cosmos/cosmos-sdk v0.47.0-rc2 + github.com/cosmos/gogoproto v1.4.4 github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 @@ -23,7 +23,7 @@ require ( github.com/tendermint/tendermint v0.37.0-rc2 github.com/tendermint/tm-db v0.6.7 google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef - google.golang.org/grpc v1.52.1 + google.golang.org/grpc v1.52.3 google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 ) @@ -44,7 +44,7 @@ require ( github.com/aws/aws-sdk-go v1.40.45 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect - github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect @@ -56,7 +56,7 @@ require ( github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.4 // indirect + github.com/cosmos/iavl v0.19.5-rc.1 // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/cosmos/rosetta-sdk-go v0.9.0 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect @@ -138,8 +138,6 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tendermint/btcd v0.1.1 // indirect - github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.5.2 // indirect github.com/ulikunitz/xz v0.5.8 // indirect diff --git a/go.sum b/go.sum index 1954a406519..4760fb04ae0 100644 --- a/go.sum +++ b/go.sum @@ -112,8 +112,9 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= @@ -167,20 +168,20 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0= github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= -github.com/cosmos/cosmos-sdk v0.47.0-rc1 h1:ptoLIOAqFGoqnZeqgec9KvC2JIZ6CVIyMHHjti9p6dQ= -github.com/cosmos/cosmos-sdk v0.47.0-rc1/go.mod h1:yWd503ULBJ71Zuv7GD0/dYJuyeg4LGWAvjeI4wK/dfY= +github.com/cosmos/cosmos-sdk v0.47.0-rc2 h1:BwQC41zQXG/pN9DdLaWzYJrC911St5lYOQIoW4Hf5wQ= +github.com/cosmos/cosmos-sdk v0.47.0-rc2/go.mod h1:e0ZEpY/nhVoXAkijdHPdFOJNOXCddfvyFrFLp2QmCCY= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.3 h1:RP3yyVREh9snv/lsOvmsAPQt8f44LgL281X0IOIhhcI= -github.com/cosmos/gogoproto v1.4.3/go.mod h1:0hLIG5TR7IvV1fme1HCFKjfzW9X2x0Mo+RooWXCnOWU= +github.com/cosmos/gogoproto v1.4.4 h1:nVAsgLlAf5jeN0fV7hRlkZvf768zU+dy4pG+hxc2P34= +github.com/cosmos/gogoproto v1.4.4/go.mod h1:/yl6/nLwsZcZ2JY3OrqjRqvqCG9InUMcXRfRjQiF9DU= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= -github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/iavl v0.19.5-rc.1 h1:4PjF2PdScyPbN1WbXpiQU21YtyonnrMU31xN74g8Rkg= +github.com/cosmos/iavl v0.19.5-rc.1/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= @@ -749,10 +750,6 @@ github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8 github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.37.0-rc2 h1:2n1em+jfbhSv6QnBj8F6KHCpbIzZCB8KgcjidJUQNlY= @@ -1193,8 +1190,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.52.1 h1:2NpOPk5g5Xtb0qebIEs7hNIa++PdtZLo2AQUpc1YnSU= -google.golang.org/grpc v1.52.1/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 0f2ac129287..0abc06b5abe 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -44,7 +44,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) suite.Require().NoError(err) - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, "test proposal", suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "title", "Description", sdk.AccAddress(interchainAccountAddr)) + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(interchainAccountAddr)) suite.Require().NoError(err) suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) @@ -210,7 +210,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) suite.Require().NoError(err) - proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, "test proposal", suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "title", "description", sdk.AccAddress(interchainAccountAddr)) + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) suite.Require().NoError(err) suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) diff --git a/modules/apps/27-interchain-accounts/module.go b/modules/apps/27-interchain-accounts/module.go index 44a257e17fb..8befc9867c4 100644 --- a/modules/apps/27-interchain-accounts/module.go +++ b/modules/apps/27-interchain-accounts/module.go @@ -203,7 +203,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } @@ -213,7 +213,7 @@ func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.Weig } // RandomizedParams creates randomized ibc-transfer param changes for the simulator. -func (am AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (am AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { return simulation.ParamChanges(r, am.controllerKeeper, am.hostKeeper) } diff --git a/modules/apps/27-interchain-accounts/simulation/params.go b/modules/apps/27-interchain-accounts/simulation/params.go index 4b1fb019a33..13825a1f782 100644 --- a/modules/apps/27-interchain-accounts/simulation/params.go +++ b/modules/apps/27-interchain-accounts/simulation/params.go @@ -17,10 +17,10 @@ import ( // ParamChanges defines the parameters that can be modified by param change proposals // on the simulation -func ParamChanges(r *rand.Rand, controllerKeeper *controllerkeeper.Keeper, hostKeeper *hostkeeper.Keeper) []simtypes.ParamChange { - var paramChanges []simtypes.ParamChange +func ParamChanges(r *rand.Rand, controllerKeeper *controllerkeeper.Keeper, hostKeeper *hostkeeper.Keeper) []simtypes.LegacyParamChange { + var paramChanges []simtypes.LegacyParamChange if controllerKeeper != nil { - paramChanges = append(paramChanges, simulation.NewSimParamChange(controllertypes.SubModuleName, string(controllertypes.KeyControllerEnabled), + paramChanges = append(paramChanges, simulation.NewSimLegacyParamChange(controllertypes.SubModuleName, string(controllertypes.KeyControllerEnabled), func(r *rand.Rand) string { controllerEnabled := RandomEnabled(r) return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: controllerEnabled})) //nolint:gosimple @@ -29,7 +29,7 @@ func ParamChanges(r *rand.Rand, controllerKeeper *controllerkeeper.Keeper, hostK } if hostKeeper != nil { - paramChanges = append(paramChanges, simulation.NewSimParamChange(hosttypes.SubModuleName, string(hosttypes.KeyHostEnabled), + paramChanges = append(paramChanges, simulation.NewSimLegacyParamChange(hosttypes.SubModuleName, string(hosttypes.KeyHostEnabled), func(r *rand.Rand) string { receiveEnabled := RandomEnabled(r) return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) //nolint:gosimple diff --git a/modules/apps/29-fee/module.go b/modules/apps/29-fee/module.go index b1bdedf0581..58a8b3955df 100644 --- a/modules/apps/29-fee/module.go +++ b/modules/apps/29-fee/module.go @@ -134,12 +134,12 @@ func (AppModule) GenerateGenesisState(_ *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } // RandomizedParams creates randomized ibc-29-fee param changes for the simulator. -func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange { return nil } diff --git a/modules/apps/transfer/module.go b/modules/apps/transfer/module.go index 67c56515401..210ec5f152c 100644 --- a/modules/apps/transfer/module.go +++ b/modules/apps/transfer/module.go @@ -146,12 +146,12 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } // RandomizedParams creates randomized ibc-transfer param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { return simulation.ParamChanges(r) } diff --git a/modules/apps/transfer/simulation/params.go b/modules/apps/transfer/simulation/params.go index 500bd3ece6a..d3d864db0c1 100644 --- a/modules/apps/transfer/simulation/params.go +++ b/modules/apps/transfer/simulation/params.go @@ -13,15 +13,15 @@ import ( // ParamChanges defines the parameters that can be modified by param change proposals // on the simulation -func ParamChanges(r *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{ - simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled), +func ParamChanges(r *rand.Rand) []simtypes.LegacyParamChange { + return []simtypes.LegacyParamChange{ + simulation.NewSimLegacyParamChange(types.ModuleName, string(types.KeySendEnabled), func(r *rand.Rand) string { sendEnabled := RadomEnabled(r) return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) //nolint:gosimple }, ), - simulation.NewSimParamChange(types.ModuleName, string(types.KeyReceiveEnabled), + simulation.NewSimLegacyParamChange(types.ModuleName, string(types.KeyReceiveEnabled), func(r *rand.Rand) string { receiveEnabled := RadomEnabled(r) return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) //nolint:gosimple diff --git a/modules/core/module.go b/modules/core/module.go index ee0799f64c2..872b61e0c3a 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -171,12 +171,12 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } // RandomizedParams returns nil since IBC doesn't register parameter changes. -func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange { return nil } diff --git a/testing/simapp/utils.go b/testing/simapp/utils.go index 92fda85a524..313d334408a 100644 --- a/testing/simapp/utils.go +++ b/testing/simapp/utils.go @@ -65,7 +65,8 @@ func SimulationOperations(app App, cdc codec.JSONCodec, config simtypes.Config) } } - simState.Contents = app.SimulationManager().GetProposalContents(simState) + //nolint: staticcheck // SA1019: app.SimulationManager().GetProposalContents is deprecated: Use GetProposalMsgs instead. GetProposalContents returns each module's proposal content generator function with their default operation weight and key. + simState.LegacyProposalContents = app.SimulationManager().GetProposalContents(simState) return app.SimulationManager().WeightedOperations(simState) }