Skip to content

Commit

Permalink
gaia v6.0.0-rc2 (#979)
Browse files Browse the repository at this point in the history
* go version to 1.17

* Update go.mod

* dependency: bump ibc-go from v1.2.0 to v1.2.1

* cherry-pick: d76c62d, adding router module

* fix: add router module to upgrade handler

* fix: testnet cli command update genesis supply

* refactor!: drop support for command 'gaiad migrate'

* Update go.mod

* dependency: bump ibc-go from v1.2.0 to v1.2.1

* cherry-pick: d76c62d, adding router module

* fix: add router module to upgrade handler

* fix: testnet cli command update genesis supply

* refactor!: drop support for command 'gaiad migrate'

* fix: lint

* chore: bump sdk, run lint

* fix: panic on export zero-height because validator addr length parsing (#1015)

* update packet-forward-middleware

* chore: bump sdk

* build: bump liquidity from v1.4.0 to 1.4.1

* go mod tidy

* fix: golangci-lint version

* packet-forward-middleware version bump: v1.0.0

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: dongsam <dongsamb@gmail.com>
  • Loading branch information
4 people authored Nov 4, 2021
1 parent 0dc6e1b commit f5ee472
Show file tree
Hide file tree
Showing 9 changed files with 391 additions and 410 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v2.5.2
version: v1.42.1
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: "env.GIT_DIFF != ''"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

* (gaia) Bump [Liquidity](https://github.com/Gravity-Devs/liquidity) module to [v1.4.1](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.4.1). See the [CHANGELOG.md](https://github.com/Gravity-Devs/liquidity/blob/v1.4.1/CHANGELOG.md#v141---20211025) for details.

## [v6.0.0] - 2021-09-17

Expand Down
20 changes: 17 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ import (
dbm "github.com/tendermint/tm-db"

gaiaappparams "github.com/cosmos/gaia/v6/app/params"
"github.com/strangelove-ventures/packet-forward-middleware/router"
routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/router/keeper"
routertypes "github.com/strangelove-ventures/packet-forward-middleware/router/types"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
)
Expand Down Expand Up @@ -140,6 +144,7 @@ var (
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
liquidity.AppModuleBasic{},
router.AppModuleBasic{},
)

// module account permissions
Expand Down Expand Up @@ -194,6 +199,7 @@ type GaiaApp struct { // nolint: golint
FeeGrantKeeper feegrantkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
LiquidityKeeper liquiditykeeper.Keeper
RouterKeeper routerkeeper.Keeper

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
Expand Down Expand Up @@ -243,7 +249,7 @@ func NewGaiaApp(
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, liquiditytypes.StoreKey, ibctransfertypes.StoreKey,
capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey,
capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey, routertypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
Expand Down Expand Up @@ -402,9 +408,12 @@ func NewGaiaApp(
)
transferModule := transfer.NewAppModule(app.TransferKeeper)

app.RouterKeeper = routerkeeper.NewKeeper(appCodec, keys[routertypes.StoreKey], app.GetSubspace(routertypes.ModuleName), app.TransferKeeper, app.DistrKeeper)

routerModule := router.NewAppModule(app.RouterKeeper, transferModule)
// create static IBC router, add transfer route, then set and seal it
ibcRouter := porttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, routerModule)
app.IBCKeeper.SetRouter(ibcRouter)

// create evidence keeper with router
Expand Down Expand Up @@ -446,6 +455,7 @@ func NewGaiaApp(
params.NewAppModule(app.ParamsKeeper),
liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper),
transferModule,
routerModule,
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand All @@ -462,6 +472,7 @@ func NewGaiaApp(
stakingtypes.ModuleName,
liquiditytypes.ModuleName,
ibchost.ModuleName,
routertypes.ModuleName,
)
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName,
Expand Down Expand Up @@ -494,6 +505,7 @@ func NewGaiaApp(
ibctransfertypes.ModuleName,
feegrant.ModuleName,
authz.ModuleName,
routertypes.ModuleName,
)

app.mm.RegisterInvariants(&app.CrisisKeeper)
Expand Down Expand Up @@ -564,6 +576,7 @@ func NewGaiaApp(
// override versions for _new_ modules as to not skip InitGenesis
fromVM[authz.ModuleName] = 0
fromVM[feegrant.ModuleName] = 0
fromVM[routertypes.ModuleName] = 0

return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
Expand All @@ -576,7 +589,7 @@ func NewGaiaApp(

if upgradeInfo.Name == upgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := store.StoreUpgrades{
Added: []string{authz.ModuleName, feegrant.ModuleName},
Added: []string{authz.ModuleName, feegrant.ModuleName, routertypes.ModuleName},
}

// configure store loader that checks if version == upgradeHeight and applies store upgrades
Expand Down Expand Up @@ -757,6 +770,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(liquiditytypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(routertypes.ModuleName).WithKeyTable(routertypes.ParamKeyTable())

return paramsKeeper
}
236 changes: 0 additions & 236 deletions app/migrate.go

This file was deleted.

Loading

0 comments on commit f5ee472

Please sign in to comment.