Skip to content

Commit

Permalink
Merge pull request #889 from comdex-official/v14upgrade
Browse files Browse the repository at this point in the history
TxSizeCostPerByte to be increased via prop
  • Loading branch information
dheerajkd30 authored Jun 19, 2024
2 parents 7e0ad1e + 54180fc commit 973e1bf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ func (a *App) ModuleAccountsPermissions() map[string][]string {
func (a *App) registerUpgradeHandlers() {
a.UpgradeKeeper.SetUpgradeHandler(
tv14.UpgradeName,
tv14.CreateUpgradeHandlerV14(a.mm, a.configurator, a.AuctionKeeperSkip, a.LendKeeper, a.WasmKeeper, *a.StakingKeeper, a.MintKeeper, a.SlashingKeeper, a.BandoracleKeeper, a.AccountKeeper),
tv14.CreateUpgradeHandlerV14(a.mm, a.configurator, a.AuctionKeeperSkip, a.LendKeeper, a.WasmKeeper, *a.StakingKeeper, a.MintKeeper, a.SlashingKeeper, a.BandoracleKeeper),
)
// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
Expand Down
3 changes: 0 additions & 3 deletions app/upgrades/testnet/v14/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ func postUpgradeChecks(s *UpgradeTestSuite) {
wp := s.App.WasmKeeper.GetParams(s.Ctx)
s.Require().Equal(wp.CodeUploadAccess, wasmtypes.AllowNobody)

// ensure auth params are updated
ap := s.App.AccountKeeper.GetParams(s.Ctx)
s.Require().Equal(ap.TxSizeCostPerByte, uint64(20))
}
10 changes: 0 additions & 10 deletions app/upgrades/testnet/v14/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
lendkeeper "github.com/comdex-official/comdex/x/lend/keeper"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
Expand All @@ -29,7 +28,6 @@ func CreateUpgradeHandlerV14(
MintKeeper mintkeeper.Keeper,
SlashingKeeper slashingkeeper.Keeper,
bandoracleKeeper bandoraclemodulekeeper.Keeper,
accountKeeper authkeeper.AccountKeeper,

) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
Expand Down Expand Up @@ -77,14 +75,6 @@ func CreateUpgradeHandlerV14(
logger.Info(fmt.Sprintf("updated bandData to %v", bandData))
}

// update tx size cost per byte
authParams := accountKeeper.GetParams(ctx)
authParams.TxSizeCostPerByte = authParams.TxSizeCostPerByte * 2
if err = accountKeeper.SetParams(ctx, authParams); err != nil {
return nil, err
}
logger.Info(fmt.Sprintf("updated auth params to %v", accountKeeper.GetParams(ctx)))

//TODO: uncomment this before mainnet upgrade
//UpdateLendParams(ctx, lendKeeper)
return vm, err
Expand Down

0 comments on commit 973e1bf

Please sign in to comment.