Skip to content

Commit

Permalink
Alliance & SDK version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
codehans committed Mar 14, 2023
1 parent 2c1ee82 commit 408d9d8
Show file tree
Hide file tree
Showing 3 changed files with 407 additions and 62 deletions.
21 changes: 1 addition & 20 deletions app/app.go
Expand Up @@ -447,34 +447,15 @@ func New(
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

app.UpgradeKeeper.SetUpgradeHandler("v0.8.3",
app.UpgradeKeeper.SetUpgradeHandler("v0.8.4",
func(
ctx sdk.Context,
plan upgradetypes.Plan,
fromVM module.VersionMap,
) (module.VersionMap, error) {
// We're moving the alliance module storage to a new key,
// so the version stored under alliancemoduletypes.ModuleName is incorrect
if _, ok := fromVM[alliancemoduletypes.ModuleName]; ok {
delete(fromVM, alliancemoduletypes.ModuleName)
}

return app.mm.RunMigrations(ctx, cfg, fromVM)
})

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Errorf("Failed to read upgrade info from disk: %w", err))
}

if !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := &storetypes.StoreUpgrades{
Added: []string{AllianceStoreKey},
}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades))

}

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper = *stakingKeeper.SetHooks(
Expand Down
27 changes: 14 additions & 13 deletions go.mod
Expand Up @@ -6,8 +6,8 @@ require (
github.com/CosmWasm/wasmd v0.30.0
github.com/CosmWasm/wasmvm v1.2.0
github.com/armon/go-metrics v0.4.1
github.com/cosmos/cosmos-proto v1.0.0-alpha8
github.com/cosmos/cosmos-sdk v0.46.9
github.com/cosmos/cosmos-proto v1.0.0-beta.3
github.com/cosmos/cosmos-sdk v0.46.11
github.com/cosmos/ibc-go/v6 v6.1.0
github.com/cosmos/interchain-accounts v0.4.3
github.com/gogo/protobuf v1.3.3
Expand All @@ -19,10 +19,10 @@ require (
github.com/pkg/errors v0.9.1
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.1
github.com/tendermint/tendermint v0.34.26
github.com/stretchr/testify v1.8.2
github.com/tendermint/tendermint v0.34.27
github.com/tendermint/tm-db v0.6.7
github.com/terra-money/alliance v0.1.0-beta1
github.com/terra-money/alliance v0.1.0
google.golang.org/genproto v0.0.0-20230223222841-637eb2293923
google.golang.org/grpc v1.53.0
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -40,7 +40,7 @@ require (
github.com/99designs/keyring v1.2.1 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/Workiva/go-datastructures v1.0.53 // indirect
github.com/aws/aws-sdk-go v1.40.45 // indirect
github.com/aws/aws-sdk-go v1.44.122 // 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.1-0.20220910012023-760eaf8b6816 // indirect
Expand All @@ -51,10 +51,11 @@ require (
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect
github.com/cometbft/cometbft-db v0.7.0 // indirect
github.com/confio/ics23/go v0.9.0 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogoproto v1.4.4 // indirect
github.com/cosmos/gogoproto v1.4.6 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/iavl v0.19.5 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
Expand Down Expand Up @@ -92,7 +93,7 @@ require (
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.6.1 // indirect
github.com/hashicorp/go-getter v1.7.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
Expand All @@ -115,7 +116,7 @@ require (
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand All @@ -138,15 +139,16 @@ require (
github.com/spf13/viper v1.15.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.5.0 // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/exp v0.0.0-20221212164502-fae10dda9338 // indirect
golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.5.0 // indirect
Expand Down Expand Up @@ -174,6 +176,5 @@ replace (
// latest grpc doesn't work with with our modified proto compiler, so we need to enforce
// the following version across all dependencies.
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26

github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27
)

0 comments on commit 408d9d8

Please sign in to comment.