diff --git a/types/module/configurator.go b/types/module/configurator.go index 85ec0f8ad805..970f868b3697 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -119,10 +119,6 @@ func (c *configurator) RegisterMigration(moduleName string, fromVersion uint64, return nil } -func (c *configurator) RegisterFundsMigration(toModuleName, fromModuleName string) error { - return nil -} - // runModuleMigrations runs all in-place store migrations for one given module from a // version to another version. func (c *configurator) runModuleMigrations(ctx sdk.Context, moduleName string, fromVersion, toVersion uint64) error { diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index eaf421c27a0d..c8c09a715587 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -357,6 +357,8 @@ func (k Querier) DelegatorWithdrawAddress(ctx context.Context, req *types.QueryD return &types.QueryDelegatorWithdrawAddressResponse{WithdrawAddress: withdrawAddr.String()}, nil } +// NOTE: DO NOT USE +// This method uses deprecated query request. Use CommunityPool from x/pool module instead. // CommunityPool queries the community pool coins func (k Querier) CommunityPool(ctx context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error) { //nolint:staticcheck // we're using a deprecated call for compatibility helper := &baseapp.QueryServiceTestHelper{ diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index 9eeb28c53e2b..297b85a7e88a 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -45,10 +44,7 @@ func TestSetWithdrawAddr(t *testing.T) { bankKeeper.EXPECT().BlockedAddr(withdrawAddr).Return(false).AnyTimes() bankKeeper.EXPECT().BlockedAddr(distrAcc.GetAddress()).Return(true).AnyTimes() - // Create MsgServiceRouter, but don't populate it before creating the gov - // keeper. - msr := baseapp.NewMsgServiceRouter() - qsr := baseapp.NewGRPCQueryRouter() + baseApp := initBaseApp(testCtx, encCfg) distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -56,8 +52,8 @@ func TestSetWithdrawAddr(t *testing.T) { accountKeeper, bankKeeper, stakingKeeper, - msr, - qsr, + baseApp.MsgServiceRouter(), + baseApp.GRPCQueryRouter(), "fee_collector", authtypes.NewModuleAddress("gov").String(), ) @@ -103,10 +99,7 @@ func TestWithdrawValidatorCommission(t *testing.T) { sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(3).Quo(math.LegacyNewDec(2))), } - // Create MsgServiceRouter, but don't populate it before creating the gov - // keeper. - msr := baseapp.NewMsgServiceRouter() - qsr := baseapp.NewGRPCQueryRouter() + baseApp := initBaseApp(testCtx, encCfg) distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -114,8 +107,8 @@ func TestWithdrawValidatorCommission(t *testing.T) { accountKeeper, bankKeeper, stakingKeeper, - msr, - qsr, + baseApp.MsgServiceRouter(), + baseApp.GRPCQueryRouter(), "fee_collector", authtypes.NewModuleAddress("gov").String(), ) @@ -162,10 +155,7 @@ func TestGetTotalRewards(t *testing.T) { accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) - // Create MsgServiceRouter, but don't populate it before creating the gov - // keeper. - msr := baseapp.NewMsgServiceRouter() - qsr := baseapp.NewGRPCQueryRouter() + baseApp := initBaseApp(testCtx, encCfg) distrKeeper := keeper.NewKeeper( encCfg.Codec, @@ -173,8 +163,8 @@ func TestGetTotalRewards(t *testing.T) { accountKeeper, bankKeeper, stakingKeeper, - msr, - qsr, + baseApp.MsgServiceRouter(), + baseApp.GRPCQueryRouter(), "fee_collector", authtypes.NewModuleAddress("gov").String(), ) diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index 179406fabdbf..67646353cf5a 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -105,7 +105,7 @@ func (k msgServer) WithdrawValidatorCommission(ctx context.Context, msg *types.M } // NOTE: DO NOT USE -// This method uses deprecated messages. Use FundCommunityPool from x/pool module instead. +// This method uses deprecated message request. Use FundCommunityPool from x/pool module instead. func (k msgServer) FundCommunityPool(ctx context.Context, msg *types.MsgFundCommunityPool) (*types.MsgFundCommunityPoolResponse, error) { //nolint:staticcheck // we're using a deprecated call for compatibility sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -162,7 +162,7 @@ func (k msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) } // NOTE: DO NOT USE -// This method uses deprecated messages. Use CommunityPoolSpend from x/pool module instead. +// This method uses deprecated message request. Use CommunityPoolSpend from x/pool module instead. func (k msgServer) CommunityPoolSpend(ctx context.Context, msg *types.MsgCommunityPoolSpend) (*types.MsgCommunityPoolSpendResponse, error) { //nolint:staticcheck // we're using a deprecated call for compatibility sdkCtx := sdk.UnwrapSDKContext(ctx) diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 2a5d8d2a695f..1b0e44f493b9 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -180,6 +180,7 @@ require ( replace cosmossdk.io/api => ../../api +// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 replace (