Skip to content

Commit

Permalink
chore(upgrade): Prepare v16.0.0-rc5 (#2226)
Browse files Browse the repository at this point in the history
* reduce upgrade handler for rc5

* adjust upgrade name

* adjust changelog

* add logic specifically for rc5

* Revert "adjust upgrade name"

This reverts commit 6a11af4.

* Revert "reduce upgrade handler for rc5"

This reverts commit 9ce1876.

* adjust upgrade info
  • Loading branch information
MalteHerrmann committed Jan 3, 2024
1 parent ffd1074 commit 8b0cbb0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## Unreleased
## [v16.0.0-rc5] - 2024-01-03

### State Machine Breaking

- (incentives) [#2221](https://github.com/evmos/evmos/pull/2221) Burn the usage incentives pool balance during v16 upgrade.

### Bug Fixes
- (osmosis-outpost) [#2192](https://github.com/evmos/evmos/pull/2192) Fix Osmosis XCS contract address for testnet.
Expand Down Expand Up @@ -82,7 +86,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
- (incentives) [#2070](https://github.com/evmos/evmos/pull/2070) Remove `x/incentives` module and burn incentives pool balance (burning reverted in [#2131](https://github.com/evmos/evmos/pull/2131)).
- (evm) [#2084](https://github.com/evmos/evmos/pull/2084) Remove `x/claims` params and migrate the `EVMChannels` param to the `x/evm` module params.
- (post) [#2128](https://github.com/evmos/evmos/pull/2128) Add `BurnDecorator` to `PostHandler` to burn cosmos transaction fees.
- (incentives) [#2221](https://github.com/evmos/evmos/pull/2221) Burn the usage incentives pool balance during v16 upgrade.

### API Breaking

Expand Down
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,12 @@ func (app *Evmos) setupUpgradeHandlers() {
v16.CreateUpgradeHandlerRC4(app.mm, app.configurator, app.AccountKeeper),
)

// v16-rc5 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v16.UpgradeNameTestnetRC5,
v16.CreateUpgradeHandlerRC5(app.mm, app.configurator, app.BankKeeper, app.GovKeeper),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
Expand Down
4 changes: 3 additions & 1 deletion app/upgrades/v16/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const (
UpgradeNameTestnetRC4 = "v16.0.0-rc4"
// TestnetUpgradeHeight defines the Evmos testnet block height on which the rc3 upgrade will take place
TestnetUpgradeHeight = 19465900
// UpgradeNameTestnetRC5 is the shared upgrade plan name for testnet rc5 upgrade
UpgradeNameTestnetRC5 = "v16.0.0-rc5"
// UpgradeInfo defines the binaries that will be used for the upgrade
UpgradeInfo = `'{"binaries":{"darwin/amd64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc4/evmos_16.0.0-rc4_Darwin_arm64.tar.gz","darwin/x86_64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc4/evmos_16.0.0-rc4_Darwin_x86_64.tar.gz","linux/arm64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc4/evmos_16.0.0-rc4_Linux_arm64.tar.gz","linux/amd64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc4/evmos_16.0.0-rc4_Linux_amd64.tar.gz","windows/x86_64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc4/evmos_16.0.0-rc4_Windows_x86_64.zip"}}'`
UpgradeInfo = `'{"binaries":{"darwin/amd64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc5/evmos_16.0.0-rc5_Darwin_arm64.tar.gz","darwin/x86_64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc5/evmos_16.0.0-rc5_Darwin_x86_64.tar.gz","linux/arm64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc5/evmos_16.0.0-rc5_Linux_arm64.tar.gz","linux/amd64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc5/evmos_16.0.0-rc5_Linux_amd64.tar.gz","windows/x86_64":"https://github.com/evmos/evmos/releases/download/v16.0.0-rc5/evmos_16.0.0-rc5_Windows_x86_64.zip"}}'`
)
24 changes: 24 additions & 0 deletions app/upgrades/v16/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,27 @@ func CreateUpgradeHandlerRC4(
return mm.RunMigrations(ctx, configurator, vm)
}
}

// CreateUpgradeHandlerRC5 creates an SDK upgrade handler for v16.0.0-rc5
func CreateUpgradeHandlerRC5(
mm *module.Manager,
configurator module.Configurator,
bk bankkeeper.Keeper,
gk govkeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger().With("upgrade", UpgradeName)

if err := BurnUsageIncentivesPool(ctx, bk); err != nil {
logger.Error("failed to burn inflation pool", "error", err.Error())
}

// Remove the deprecated governance proposals from store
logger.Debug("deleting deprecated incentives module proposals...")
DeleteIncentivesProposals(ctx, gk, logger)

// Leave modules are as-is to avoid running InitGenesis.
logger.Debug("running module migrations ...")
return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit 8b0cbb0

Please sign in to comment.