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

chore: update module to gaia v11 #2515

Merged
merged 13 commits into from
May 26, 2023
Merged
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
26 changes: 11 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,41 +124,37 @@ jobs:
go.sum
- uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Install GaiaV9
go-version: 1.20.x
- name: Install GaiaV10
run: |
git checkout v9.1.0
git checkout v10.0.0
make build
cp ./build/gaiad ./build/gaiad9
cp ./build/gaiad ./build/gaiad10
go clean -modcache
if: env.GIT_DIFF
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Install GaiaV10
- name: Install GaiaV11
run: |
git checkout -
make build
cp ./build/gaiad ./build/gaiad10
cp ./build/gaiad ./build/gaiad11
if: env.GIT_DIFF
- name: Install Cosmovisor
run: |
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
if: env.GIT_DIFF
- name: Start GaiaV9
- name: Start GaiaV10
run: |
go env GOPATH
./contrib/scripts/run-gaia-v9.sh
./contrib/scripts/upgrade_test_scripts/v11/run_gaia_v10.sh
if: env.GIT_DIFF
- name: Submit Upgrade Commands
run: |
./contrib/scripts/run-upgrade-commands-v10.sh 15
./contrib/scripts/upgrade_test_scripts/v11/run_upgrade_commands_v11.sh 15
if: env.GIT_DIFF
- name: Check for successful upgrade
run: |
./contrib/scripts/test_upgrade.sh 20 5 16 localhost
./contrib/scripts/upgrade_test_scripts/test_upgrade.sh 20 5 16 localhost
if: env.GIT_DIFF
- name: Check for successful migration
run: |
./contrib/scripts/test_migration.sh localhost
if: env.GIT_DIFF
./contrib/scripts/upgrade_test_scripts/v11/test_migration_v11.sh localhost
2 changes: 1 addition & 1 deletion ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"

gaiafeeante "github.com/cosmos/gaia/v10/x/globalfee/ante"
gaiafeeante "github.com/cosmos/gaia/v11/x/globalfee/ante"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
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,10 +13,10 @@ import (
tmrand "github.com/tendermint/tendermint/libs/rand"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/cosmos/gaia/v10/ante"
gaiahelpers "github.com/cosmos/gaia/v10/app/helpers"
"github.com/cosmos/gaia/v11/ante"
gaiahelpers "github.com/cosmos/gaia/v11/app/helpers"

gaiaapp "github.com/cosmos/gaia/v10/app"
gaiaapp "github.com/cosmos/gaia/v11/app"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ import (
tmos "github.com/tendermint/tendermint/libs/os"
dbm "github.com/tendermint/tm-db"

gaiaante "github.com/cosmos/gaia/v10/ante"
"github.com/cosmos/gaia/v10/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v10/app/params"
"github.com/cosmos/gaia/v10/app/upgrades"
v10 "github.com/cosmos/gaia/v10/app/upgrades/v10"
"github.com/cosmos/gaia/v10/x/globalfee"
gaiaante "github.com/cosmos/gaia/v11/ante"
"github.com/cosmos/gaia/v11/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v11/app/upgrades"
v11 "github.com/cosmos/gaia/v11/app/upgrades/v11"
"github.com/cosmos/gaia/v11/x/globalfee"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand All @@ -53,7 +53,7 @@ var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string

Upgrades = []upgrades.Upgrade{v10.Upgrade}
Upgrades = []upgrades.Upgrade{v11.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 @@ -9,8 +9,8 @@ import (
"github.com/tendermint/tendermint/libs/log"
db "github.com/tendermint/tm-db"

gaia "github.com/cosmos/gaia/v10/app"
gaiahelpers "github.com/cosmos/gaia/v10/app/helpers"
gaia "github.com/cosmos/gaia/v11/app"
gaiahelpers "github.com/cosmos/gaia/v11/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/v10/app/params"
"github.com/cosmos/gaia/v11/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 (
tmtypes "github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tm-db"

gaiaapp "github.com/cosmos/gaia/v10/app"
gaiaapp "github.com/cosmos/gaia/v11/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 @@ -61,7 +61,7 @@ import (
routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v4/router/keeper"
routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"

"github.com/cosmos/gaia/v10/x/globalfee"
"github.com/cosmos/gaia/v11/x/globalfee"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand Down
4 changes: 2 additions & 2 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ import (
"github.com/strangelove-ventures/packet-forward-middleware/v4/router"
routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"

gaiaappparams "github.com/cosmos/gaia/v10/app/params"
"github.com/cosmos/gaia/v10/x/globalfee"
gaiaappparams "github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v11/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 @@ -11,7 +11,7 @@ import (
tmjson "github.com/tendermint/tendermint/libs/json"
tmtypes "github.com/tendermint/tendermint/types"

gaia "github.com/cosmos/gaia/v10/app"
gaia "github.com/cosmos/gaia/v11/app"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
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 @@ -8,7 +8,7 @@ import (
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

gaia "github.com/cosmos/gaia/v10/app"
gaia "github.com/cosmos/gaia/v11/app"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/simapp/helpers"
Expand Down
8 changes: 4 additions & 4 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

gaia "github.com/cosmos/gaia/v10/app"
"github.com/cosmos/gaia/v10/app/helpers"
"github.com/cosmos/gaia/v10/app/params"
"github.com/cosmos/gaia/v10/app/sim"
gaia "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/app/helpers"
"github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v11/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/v10/app/keepers"
"github.com/cosmos/gaia/v11/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/v10/app/upgrades"
"github.com/cosmos/gaia/v11/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/v10/app/keepers"
"github.com/cosmos/gaia/v11/app/keepers"
MSalopek marked this conversation as resolved.
Show resolved Hide resolved
)

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

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

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

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

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

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

"github.com/cosmos/gaia/v10/app/keepers"
"github.com/cosmos/gaia/v11/app/keepers"
MSalopek marked this conversation as resolved.
Show resolved Hide resolved
)

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

"github.com/cosmos/gaia/v10/app/keepers"
"github.com/cosmos/gaia/v11/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 @@ -4,7 +4,7 @@ import (
store "github.com/cosmos/cosmos-sdk/store/types"
ccvprovider "github.com/cosmos/interchain-security/x/ccv/provider/types"

"github.com/cosmos/gaia/v10/app/upgrades"
"github.com/cosmos/gaia/v11/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/v10/app/keepers"
"github.com/cosmos/gaia/v11/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 @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

addressutil "github.com/cosmos/gaia/v10/pkg/address"
addressutil "github.com/cosmos/gaia/v11/pkg/address"

"github.com/spf13/cobra"
)
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 @@ -30,8 +30,8 @@ import (
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

gaia "github.com/cosmos/gaia/v10/app"
"github.com/cosmos/gaia/v10/app/params"
gaia "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/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 @@ -6,8 +6,8 @@ import (
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/stretchr/testify/require"

app "github.com/cosmos/gaia/v10/app"
"github.com/cosmos/gaia/v10/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/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/v10/app"
"github.com/cosmos/gaia/v10/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v11/app"
"github.com/cosmos/gaia/v11/cmd/gaiad/cmd"
)

func main() {
Expand Down
1 change: 0 additions & 1 deletion contrib/scripts/run-gaia-v9.sh → ...s/upgrade_test_scripts/v10/run_gaia_v9.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ pwd
ls $NODE_HOME

$COSMOVISOR run start --home $NODE_HOME --x-crisis-skip-assert-invariants > v9.out 2>&1 &

Loading