Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: updated wasmd to v0.42.0 #NTRN-122 #321

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1176,10 +1176,10 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) {
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)

paramsKeeper.Subspace(authtypes.ModuleName).WithKeyTable(authtypes.ParamKeyTable())
paramsKeeper.Subspace(banktypes.ModuleName).WithKeyTable(banktypes.ParamKeyTable())
paramsKeeper.Subspace(slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName).WithKeyTable(crisistypes.ParamKeyTable())
paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable())
Expand All @@ -1192,7 +1192,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ccvconsumertypes.ModuleName).WithKeyTable(ccvconsumertypes.ParamKeyTable())

// MOTE: legacy subspaces for migration sdk47 only
paramsKeeper.Subspace(wasmtypes.ModuleName).WithKeyTable(wasmtypes.ParamKeyTable())
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(crontypes.StoreKey).WithKeyTable(crontypes.ParamKeyTable())
paramsKeeper.Subspace(feeburnertypes.StoreKey).WithKeyTable(feeburnertypes.ParamKeyTable())
paramsKeeper.Subspace(feetypes.StoreKey).WithKeyTable(feetypes.ParamKeyTable())
Expand Down
20 changes: 4 additions & 16 deletions app/upgrades/nextupgrade/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ func CreateUpgradeHandler(
}

ctx.Logger().Info("Migrating globalminfees module parameters...")
err = migrateGlobalFees(ctx, keepers)
if err != nil {
ctx.Logger().Error("failed to migrate GlobalFees", "err", err)
return vm, err
}
migrateGlobalFees(ctx, keepers)

ctx.Logger().Info("Updating ccv reward denoms...")
err = migrateRewardDenoms(ctx, keepers)
Expand All @@ -108,11 +104,7 @@ func CreateUpgradeHandler(
return vm, err
}

err = migrateAdminModule(ctx, keepers)
if err != nil {
ctx.Logger().Error("failed to migrate admin module", "err", err)
return vm, err
}
migrateAdminModule(ctx, keepers)

ctx.Logger().Info("Upgrade complete")
return vm, nil
Expand Down Expand Up @@ -236,7 +228,7 @@ func setInterchainTxsParams(ctx sdk.Context, paramsKeepers paramskeeper.Keeper,
return nil
}

func migrateGlobalFees(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) error {
func migrateGlobalFees(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) {
ctx.Logger().Info("Implementing GlobalFee Params...")

// global fee is empty set, set global fee to equal to 0.05 USD (for 200k of gas) in appropriate coin
Expand Down Expand Up @@ -265,8 +257,6 @@ func migrateGlobalFees(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) error
keepers.GlobalFeeSubspace.Set(ctx, types.ParamStoreKeyMaxTotalBypassMinFeeMsgGasUsage, &types.DefaultmaxTotalBypassMinFeeMsgGasUsage)

ctx.Logger().Info("Max total bypass min fee msg gas usage set successfully")

return nil
}

func migrateRewardDenoms(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) error {
Expand All @@ -290,12 +280,10 @@ func migrateRewardDenoms(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) erro
return nil
}

func migrateAdminModule(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) error {
func migrateAdminModule(ctx sdk.Context, keepers *upgrades.UpgradeKeepers) {
ctx.Logger().Info("Migrating admin module...")

keepers.AdminModule.SetProposalID(ctx, 1)

ctx.Logger().Info("Finished migrating admin module")

return nil
}
2 changes: 1 addition & 1 deletion app/upgrades/nextupgrade/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (suite *UpgradeTestSuite) TestAdminModuleUpgrade() {
ctx = suite.ChainA.GetContext()
)

//emulate lack of ProposalIDKey like on a real mainnet
// emulate lack of ProposalIDKey like on a real mainnet
store := ctx.KVStore(app.GetKey(adminmoduletypes.StoreKey))
store.Delete(adminmoduletypes.ProposalIDKey)

Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ go 1.20
require (
cosmossdk.io/core v0.5.1
cosmossdk.io/errors v1.0.0
cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca
cosmossdk.io/math v1.0.1
github.com/CosmWasm/wasmd v0.41.0
github.com/CosmWasm/wasmvm v1.3.0
cosmossdk.io/log v1.2.1
cosmossdk.io/math v1.1.2
github.com/CosmWasm/wasmd v0.42.0
github.com/CosmWasm/wasmvm v1.4.0
github.com/armon/go-metrics v0.4.1
github.com/cometbft/cometbft v0.37.2
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/admin-module v0.0.0-20220204080909-475a98e03f31
github.com/cosmos/cosmos-proto v1.0.0-beta.2
github.com/cosmos/cosmos-sdk v0.47.4
github.com/cosmos/cosmos-sdk v0.47.5
github.com/cosmos/gaia/v11 v11.0.0-00010101000000-000000000000
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0-20230803181732-7c8f814d3b79
github.com/cosmos/ibc-go/v7 v7.2.0
github.com/cosmos/ibc-go/v7 v7.3.0
github.com/cosmos/ics23/go v0.10.0
github.com/cosmos/interchain-security/v3 v3.1.0
github.com/gogo/protobuf v1.3.3
Expand All @@ -28,7 +28,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/rs/zerolog v1.29.1
github.com/rs/zerolog v1.30.0
github.com/skip-mev/pob v1.0.3
github.com/spf13/cast v1.5.1
github.com/spf13/cobra v1.7.0
Expand All @@ -47,7 +47,7 @@ require (
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/api v0.3.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.3 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand All @@ -72,7 +72,7 @@ require (
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v0.20.0 // indirect
github.com/cosmos/iavl v0.20.1 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/creachadair/taskgroup v0.4.2 // indirect
Expand All @@ -88,7 +88,7 @@ require (
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.21.0 // indirect
github.com/getsentry/sentry-go v0.23.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
Expand Down Expand Up @@ -152,7 +152,7 @@ require (
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rakyll/statik v0.1.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
Expand All @@ -167,12 +167,12 @@ require (
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand All @@ -189,7 +189,7 @@ require (
replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/ChainSafe/go-schnorrkel => github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d
github.com/CosmWasm/wasmd => github.com/neutron-org/wasmd v0.40.0-rc.0.0.20230808084410-6083b888424e
github.com/CosmWasm/wasmd => github.com/neutron-org/wasmd v0.41.1-0.20230927143507-5c6517ef64de
github.com/cosmos/admin-module => github.com/neutron-org/admin-module v0.0.0-20230906150724-9ccb75c61fc5
github.com/cosmos/cosmos-sdk => github.com/neutron-org/cosmos-sdk v0.47.5-0.20230921074823-5d5ff8b93265
github.com/cosmos/gaia/v11 => github.com/cosmos/gaia/v11 v11.0.0-20230724152830-861ba391c3b4
Expand Down
Loading
Loading