Skip to content

Commit

Permalink
chore: update main to v14 (cosmos#2749)
Browse files Browse the repository at this point in the history
* replace v13 with v14

* update test.yml

* add v14 upgrade handler
  • Loading branch information
mpoke authored Sep 27, 2023
1 parent eb2f5e1 commit 8beddea
Show file tree
Hide file tree
Showing 55 changed files with 124 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
# the old gaiad binary version is hardcoded, need to be updated each major release.
- name: Install Old Gaiad
run: |
git checkout v12.0.0
git checkout v13.0.0
make build
cp ./build/gaiad ./build/gaiadold
go clean -modcache
Expand Down
4 changes: 2 additions & 2 deletions ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"

gaiaerrors "github.com/cosmos/gaia/v13/types/errors"
gaiafeeante "github.com/cosmos/gaia/v13/x/globalfee/ante"
gaiaerrors "github.com/cosmos/gaia/v14/types/errors"
gaiafeeante "github.com/cosmos/gaia/v14/x/globalfee/ante"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
2 changes: 1 addition & 1 deletion ante/gov_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

gaiaerrors "github.com/cosmos/gaia/v13/types/errors"
gaiaerrors "github.com/cosmos/gaia/v14/types/errors"
)

// initial deposit must be greater than or equal to 10% of the minimum deposit
Expand Down
6 changes: 3 additions & 3 deletions ante/gov_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/cosmos/gaia/v13/ante"
gaiaapp "github.com/cosmos/gaia/v13/app"
gaiahelpers "github.com/cosmos/gaia/v13/app/helpers"
"github.com/cosmos/gaia/v14/ante"
gaiaapp "github.com/cosmos/gaia/v14/app"
gaiahelpers "github.com/cosmos/gaia/v14/app/helpers"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

gaiaante "github.com/cosmos/gaia/v13/ante"
"github.com/cosmos/gaia/v13/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v13/app/params"
"github.com/cosmos/gaia/v13/app/upgrades"
v13 "github.com/cosmos/gaia/v13/app/upgrades/v13"
"github.com/cosmos/gaia/v13/x/globalfee"
gaiaante "github.com/cosmos/gaia/v14/ante"
"github.com/cosmos/gaia/v14/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v14/app/params"
"github.com/cosmos/gaia/v14/app/upgrades"
v14 "github.com/cosmos/gaia/v14/app/upgrades/v14"
"github.com/cosmos/gaia/v14/x/globalfee"
)

var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string

Upgrades = []upgrades.Upgrade{v13.Upgrade}
Upgrades = []upgrades.Upgrade{v14.Upgrade}
)

var (
Expand Down
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

gaia "github.com/cosmos/gaia/v13/app"
gaiahelpers "github.com/cosmos/gaia/v13/app/helpers"
gaia "github.com/cosmos/gaia/v14/app"
gaiahelpers "github.com/cosmos/gaia/v14/app/helpers"
)

type EmptyAppOptions struct{}
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gaia
import (
"github.com/cosmos/cosmos-sdk/std"

"github.com/cosmos/gaia/v13/app/params"
"github.com/cosmos/gaia/v14/app/params"
)

// MakeTestEncodingConfig creates an EncodingConfig for testing. This function
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaiaapp "github.com/cosmos/gaia/v13/app"
gaiaapp "github.com/cosmos/gaia/v14/app"
)

// SimAppChainID hardcoded chainID for simulation
Expand Down
2 changes: 1 addition & 1 deletion app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/x/globalfee"
"github.com/cosmos/gaia/v14/x/globalfee"
)

type AppKeepers struct {
Expand Down
4 changes: 2 additions & 2 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

gaiaappparams "github.com/cosmos/gaia/v13/app/params"
"github.com/cosmos/gaia/v13/x/globalfee"
gaiaappparams "github.com/cosmos/gaia/v14/app/params"
"github.com/cosmos/gaia/v14/x/globalfee"
)

var maccPerms = map[string][]string{
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaia "github.com/cosmos/gaia/v13/app"
gaia "github.com/cosmos/gaia/v14/app"
)

// AppStateFn returns the initial application state using a genesis or the simulation parameters.
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

gaia "github.com/cosmos/gaia/v13/app"
gaia "github.com/cosmos/gaia/v14/app"
)

// SetupSimulation creates the config, db (levelDB), temporary directory and logger for
Expand Down
8 changes: 4 additions & 4 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
simulation2 "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"

gaia "github.com/cosmos/gaia/v13/app"
"github.com/cosmos/gaia/v13/app/helpers"
"github.com/cosmos/gaia/v13/app/params"
"github.com/cosmos/gaia/v13/app/sim"
gaia "github.com/cosmos/gaia/v14/app"
"github.com/cosmos/gaia/v14/app/helpers"
"github.com/cosmos/gaia/v14/app/params"
"github.com/cosmos/gaia/v14/app/sim"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v10/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v10

import (
"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v10/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v11/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v11

import (
"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v11/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v12/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v12
import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v12/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v13/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v13

import (
"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v13/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
15 changes: 15 additions & 0 deletions app/upgrades/v14/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v14

import (
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v14"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
}
27 changes: 27 additions & 0 deletions app/upgrades/v14/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package v14

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("Starting module migrations...")

vm, err := mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return vm, err
}

ctx.Logger().Info("Upgrade complete")
return vm, err
}
}
2 changes: 1 addition & 1 deletion app/upgrades/v7/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v7/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v8/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package v8
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v13/x/globalfee"
"github.com/cosmos/gaia/v14/app/upgrades"
"github.com/cosmos/gaia/v14/x/globalfee"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v8/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func FixBankMetadata(ctx sdk.Context, keepers *keepers.AppKeepers) error {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v9/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v13/app/upgrades"
"github.com/cosmos/gaia/v14/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v9/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v13/app/keepers"
"github.com/cosmos/gaia/v14/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaiad/cmd/bech32_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/spf13/cobra"

addressutil "github.com/cosmos/gaia/v13/pkg/address"
addressutil "github.com/cosmos/gaia/v14/pkg/address"
)

var flagBech32Prefix = "prefix"
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/crisis"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"

gaia "github.com/cosmos/gaia/v13/app"
"github.com/cosmos/gaia/v13/app/params"
gaia "github.com/cosmos/gaia/v14/app"
"github.com/cosmos/gaia/v14/app/params"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/gaia/v13/app"
"github.com/cosmos/gaia/v13/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v14/app"
"github.com/cosmos/gaia/v14/cmd/gaiad/cmd"
)

func TestRootCmdConfig(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/gaia/v13/app"
"github.com/cosmos/gaia/v13/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v14/app"
"github.com/cosmos/gaia/v14/cmd/gaiad/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/cosmos/gaia/v13
module github.com/cosmos/gaia/v14

go 1.20

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaia "github.com/cosmos/gaia/v13/app"
"github.com/cosmos/gaia/v13/app/params"
gaia "github.com/cosmos/gaia/v14/app"
"github.com/cosmos/gaia/v14/app/params"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_vesting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/gaia/v13/x/globalfee/ante"
"github.com/cosmos/gaia/v14/x/globalfee/ante"
)

const (
Expand Down
Loading

0 comments on commit 8beddea

Please sign in to comment.