Skip to content

Commit

Permalink
chore: Post release maintenance (#432)
Browse files Browse the repository at this point in the history
* adding "latest" upgrade handler

* updating chain upgrade test for v4 release

* Update CHANGELOG.md
  • Loading branch information
spoo-bar authored Aug 25, 2023
1 parent 0f74dfb commit 1c06230
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ Contains bug fixes.
Contains all the PRs that improved the code without changing the behaviours.
-->

## [Unreleased]

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Improvements

## [v4.0.0]

### Added
Expand Down
3 changes: 3 additions & 0 deletions app/app_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
upgrade2_0_0 "github.com/archway-network/archway/app/upgrades/2_0_0"
upgrade3_0_0 "github.com/archway-network/archway/app/upgrades/3_0_0"
upgrade4_0_0 "github.com/archway-network/archway/app/upgrades/4_0_0"
upgradelatest "github.com/archway-network/archway/app/upgrades/latest"
)

// UPGRADES
Expand All @@ -21,6 +22,8 @@ var Upgrades = []upgrades.Upgrade{
upgrade2_0_0.Upgrade, // v2.0.0
upgrade3_0_0.Upgrade, // v3.0.0
upgrade4_0_0.Upgrade, // v4.0.0

upgradelatest.Upgrade, // latest - This upgrade handler is used for all the current changes to the protocol
}

func (app *ArchwayApp) setupUpgrades() {
Expand Down
24 changes: 24 additions & 0 deletions app/upgrades/latest/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package upgradelatest

import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
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/archway-network/archway/app/upgrades"
)

// This upgrade handler is used for all the current changes to the protocol

const Name = "latest"

var Upgrade = upgrades.Upgrade{
UpgradeName: Name,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
},
StoreUpgrades: storetypes.StoreUpgrades{},
}
4 changes: 2 additions & 2 deletions interchaintest/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
)

const (
initialVersion = "v3.0.0" // The last release of the chain. The one the mainnet is running on
upgradeName = "v4.0.0" // The next upgrade name. Should match the upgrade handler.
initialVersion = "v4.0.0" // The last release of the chain. The one the mainnet is running on
upgradeName = "latest" // The next upgrade name. Should match the upgrade handler.
chainName = "archway"
)

Expand Down

0 comments on commit 1c06230

Please sign in to comment.