Skip to content

Commit

Permalink
chore: update main to v16 (#2947)
Browse files Browse the repository at this point in the history
* gaia/v15 -> gaia/v16

* update test.yml

* add v16 upgrade handler

* make format

* fix upgrade-test

* bump go version in test.yml

* gaiad genesis add-genesis-account

* fix testing scripts

* fix upgrade test in gh workflow

* fix upgrade test in gh workflow 2

* debug store upgrade

* bump version for metaprotocols

---------

Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: MSalopek <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent ab87a22 commit be6e8cd
Show file tree
Hide file tree
Showing 68 changed files with 153 additions and 110 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ jobs:
go.sum
- uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
# the old gaiad binary version is hardcoded, need to be updated each major release.
- name: Install Old Gaiad
run: |
git checkout v14.0.0
git checkout v15.0.0-rc1
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 (
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

gaiaerrors "github.com/cosmos/gaia/v15/types/errors"
gaiafeeante "github.com/cosmos/gaia/v15/x/globalfee/ante"
gaiaerrors "github.com/cosmos/gaia/v16/types/errors"
gaiafeeante "github.com/cosmos/gaia/v16/x/globalfee/ante"
)

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

gaiaerrors "github.com/cosmos/gaia/v15/types/errors"
gaiaerrors "github.com/cosmos/gaia/v16/types/errors"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions ante/gov_vote_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/cosmos/gaia/v15/ante"
"github.com/cosmos/gaia/v15/app/helpers"
"github.com/cosmos/gaia/v16/ante"
"github.com/cosmos/gaia/v16/app/helpers"
)

// Test that the GovVoteDecorator rejects v1beta1 vote messages from accounts with less than 1 atom staked
Expand Down
14 changes: 7 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

gaiaante "github.com/cosmos/gaia/v15/ante"
"github.com/cosmos/gaia/v15/app/keepers"
"github.com/cosmos/gaia/v15/app/params"
"github.com/cosmos/gaia/v15/app/upgrades"
v15 "github.com/cosmos/gaia/v15/app/upgrades/v15"
"github.com/cosmos/gaia/v15/x/globalfee"
gaiaante "github.com/cosmos/gaia/v16/ante"
"github.com/cosmos/gaia/v16/app/keepers"
"github.com/cosmos/gaia/v16/app/params"
"github.com/cosmos/gaia/v16/app/upgrades"
v16 "github.com/cosmos/gaia/v16/app/upgrades/v16"
"github.com/cosmos/gaia/v16/x/globalfee"
)

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

Upgrades = []upgrades.Upgrade{v15.Upgrade}
Upgrades = []upgrades.Upgrade{v16.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 @@ -11,8 +11,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/v15/app"
gaiahelpers "github.com/cosmos/gaia/v15/app/helpers"
gaia "github.com/cosmos/gaia/v16/app"
gaiahelpers "github.com/cosmos/gaia/v16/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/v15/app/params"
"github.com/cosmos/gaia/v16/app/params"
)

func RegisterEncodingConfig() params.EncodingConfig {
Expand Down
2 changes: 1 addition & 1 deletion app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gaia
import (
"encoding/json"

"github.com/cosmos/gaia/v15/app/params"
"github.com/cosmos/gaia/v16/app/params"
)

// The genesis state of the blockchain is represented here as a map of raw json
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 @@ -24,7 +24,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/v15/app"
gaiaapp "github.com/cosmos/gaia/v16/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 @@ -68,7 +68,7 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/gaia/v15/x/globalfee"
"github.com/cosmos/gaia/v16/x/globalfee"
)

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

gaiaappparams "github.com/cosmos/gaia/v15/app/params"
"github.com/cosmos/gaia/v15/x/globalfee"
"github.com/cosmos/gaia/v15/x/metaprotocols"
metaprotocolstypes "github.com/cosmos/gaia/v15/x/metaprotocols/types"
gaiaappparams "github.com/cosmos/gaia/v16/app/params"
"github.com/cosmos/gaia/v16/x/globalfee"
"github.com/cosmos/gaia/v16/x/metaprotocols"
metaprotocolstypes "github.com/cosmos/gaia/v16/x/metaprotocols/types"
)

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

gaia "github.com/cosmos/gaia/v15/app"
"github.com/cosmos/gaia/v15/app/params"
gaia "github.com/cosmos/gaia/v16/app"
"github.com/cosmos/gaia/v16/app/params"
)

// Simulation parameter constants
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 @@ -12,7 +12,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

gaia "github.com/cosmos/gaia/v15/app"
gaia "github.com/cosmos/gaia/v16/app"
)

// SimulationOperations retrieves the simulation params from the provided file path
Expand Down
4 changes: 2 additions & 2 deletions app/sim_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"

gaia "github.com/cosmos/gaia/v15/app"
"github.com/cosmos/gaia/v15/app/sim"
gaia "github.com/cosmos/gaia/v16/app"
"github.com/cosmos/gaia/v16/app/sim"
)

// Profile with:
Expand Down
6 changes: 3 additions & 3 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"

"github.com/cosmos/gaia/v15/ante"
gaia "github.com/cosmos/gaia/v15/app"
"github.com/cosmos/gaia/v16/ante"
gaia "github.com/cosmos/gaia/v16/app"
// "github.com/cosmos/gaia/v11/app/helpers"
// "github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v15/app/sim"
"github.com/cosmos/gaia/v16/app/sim"
)

// AppChainID hardcoded chainID for simulation
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/v15/app/keepers"
"github.com/cosmos/gaia/v16/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/v15/app/upgrades"
"github.com/cosmos/gaia/v16/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/v15/app/keepers"
"github.com/cosmos/gaia/v16/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/v15/app/upgrades"
"github.com/cosmos/gaia/v16/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/v15/app/keepers"
"github.com/cosmos/gaia/v16/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/v15/app/upgrades"
"github.com/cosmos/gaia/v16/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/v15/app/keepers"
"github.com/cosmos/gaia/v16/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/v15/app/upgrades"
"github.com/cosmos/gaia/v16/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/v15/app/keepers"
"github.com/cosmos/gaia/v16/app/keepers"
)

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

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

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v14/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/v15/app/keepers"
"github.com/cosmos/gaia/v16/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v15/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"

"github.com/cosmos/gaia/v15/app/upgrades"
"github.com/cosmos/gaia/v16/app/upgrades"
)

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

"github.com/cosmos/gaia/v15/app/keepers"
"github.com/cosmos/gaia/v16/app/keepers"
)

// CreateUpgradeHandler returns a upgrade handler for Gaia v15
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v15/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/cosmos/gaia/v15/app/helpers"
v15 "github.com/cosmos/gaia/v15/app/upgrades/v15"
"github.com/cosmos/gaia/v16/app/helpers"
v15 "github.com/cosmos/gaia/v16/app/upgrades/v15"
)

func TestUpgradeSigningInfos(t *testing.T) {
Expand Down
15 changes: 15 additions & 0 deletions app/upgrades/v16/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v16

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

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

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

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/v16/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 @@ -6,7 +6,7 @@ import (
store "github.com/cosmos/cosmos-sdk/store/types"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"

"github.com/cosmos/gaia/v15/app/upgrades"
"github.com/cosmos/gaia/v16/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 @@ -11,7 +11,7 @@ import (
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"

"github.com/cosmos/gaia/v15/app/keepers"
"github.com/cosmos/gaia/v16/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 @@ -5,8 +5,8 @@ package v8
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/cosmos/gaia/v15/app/upgrades"
"github.com/cosmos/gaia/v15/x/globalfee"
"github.com/cosmos/gaia/v16/app/upgrades"
"github.com/cosmos/gaia/v16/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 @@ -15,7 +15,7 @@ import (
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"
ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"

"github.com/cosmos/gaia/v15/app/keepers"
"github.com/cosmos/gaia/v16/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 @@ -8,7 +8,7 @@ import (

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

"github.com/cosmos/gaia/v15/app/upgrades"
"github.com/cosmos/gaia/v16/app/upgrades"
)

const (
Expand Down
Loading

0 comments on commit be6e8cd

Please sign in to comment.