Skip to content

Commit

Permalink
chore: prepare v6.1 release (#2286)
Browse files Browse the repository at this point in the history
* chore: prepare v6.1 release

* add cosmos-sdk update

* lint

* lint
  • Loading branch information
robert-zaremba authored Oct 17, 2023
1 parent 1201d97 commit 39e19f6
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 65 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,33 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## v6.1.0 - 2023-10-17

### Improvements

- [2285](https://github.com/umee-network/umee/pull/2285) Upgrade Cosmos SDK to v0.46.15.

### Bug Fixes

- [2276](https://github.com/umee-network/umee/pull/2276) e2e test reliability.
- [2278](https://github.com/umee-network/umee/pull/2278) Fix the store upgrade for metoken.

## v6.1.0-beta1 - 2023-09-29

### Features

- [2264](https://github.com/umee-network/umee/pull/2264) Emitting event when IBC Quota is reset.
- [2254](https://github.com/umee-network/umee/pull/2254) Oracle: added timestamp to prices, added `QueryExgRatesWithTimestamp` method.
- [2246](https://github.com/umee-network/umee/pull/2246) Emergency Group: support metoken index updates.

### API-Breaking

- [2267](https://github.com/umee-network/umee/pull/2267) `BorrowLimit` field in QueryAccountSummaryResponse can be nil on missing borrow price (behavior now matches `LiquidationThreshold` field)
- [2267](https://github.com/umee-network/umee/pull/2267) `BorrowLimit` field in QueryAccountSummaryResponse can be nil on missing borrow price (behavior now matches `LiquidationThreshold` field).
- [2254](https://github.com/umee-network/umee/pull/2254) Oracle: `DenomExchangeRate` is renamed to `ExchangeRate`.

### Improvements

- [2256](https://github.com/umee-network/umee/pull/2256) unify and refactore `client` package.
- [2261](https://github.com/umee-network/umee/pull/2261) Use go 1.21
- [2267](https://github.com/umee-network/umee/pull/2267) Leverage transactions accept spot prices up to 3 minutes old, and leverage queries use most recent spot price when required.
- [2263](https://github.com/umee-network/umee/pull/2263) Add spot price fields to account summary.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ See [Release procedure](CONTRIBUTING.md#release-procedure) for more information
| v5.1.x || v0.46.13+ | v6.2.x | --- | umee/v2.1.6+ | umee/v4 v1.5.3-umee-10 | v1.2.4 |
| v5.2.x || v0.46.13+ | v6.2.x | --- | umee/v2.1.6+ | umee/v4 v1.5.3-umee-10 | v1.2.4 |
| v6.0.x || v0.46.14+ | v6.2.x | --- | umee/v2.1.6-1+ | --- | v1.3.0 |
| v6.1.x || v0.46.15+ | v6.2.x | --- | umee/v2.1.7+ | --- | v1.3.0 |

#### Price Feeder

Expand Down
61 changes: 4 additions & 57 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,16 @@ Release Procedure is defined in the [CONTRIBUTING](CONTRIBUTING.md#release-proce

## v6.1.0

- Enable [meToken module](https://github.com/umee-network/umee/blob/main/x/metoken/README.md): allows to create an
index composed of a list of assets and realize operations such as swap and redeem between the assets and the
index token.
Highlights:

- [meToken](https://github.com/umee-network/umee/blob/main/x/metoken/README.md) module: allows to create an index composed of a list of assets and realize operations such as swap and redeem between the assets and the index token.
- Bump go version to 1.21.
- Add spot price fields to account summary, and ensure all other fields use leverage logic prices.
- Fix avg params storage for x/oracle.

## v6.0.2

This fixes a crash shortly after the 6.0.1 upgrade. The crash occurred at height `8427849` but this binary works even if you switch to it immediately after the gov upgrade. Patch must be applied **as soon as possible**.

## v6.0.1

This is a bug fix release for the `leverage.MsgGovUpdateSpecialAssets` handler.
We also added `umeed q ugov emergency-group` CLI query. Users were able to query the Emergency Group address using REST.
- Emergency Groups are able to do security adjustments in x/metoken.

[CHANGELOG](CHANGELOG.md)

## v6.0.0

Highlights:

- We introduce [Special Assets](https://github.com/umee-network/umee/blob/v6.0.0-beta2/x/leverage/README.md#special-asset-pairs): a new primitive to optimize positions in x/leverage.
- New [inflation mechanism](./docs/design_docs/012-umee-inflation-v2.md).
- [Emergency Groups](#emergency-groups).
- Full Gravity Bridge removal. We don't include GB module any more in Umee.
- New `MsgLeveragedLiquidate.MaxRepay` which allows to limit the liquidation size using the leveraged liquidation mechanism.
- Renamed ugov `EventMinTxFees` to `EventMinGasPrice`.

### New Inflation Mechanism

The Upgrade Handler sets the following values to the Umee `x/ugov` Inflation Cycle parameters:

- `max_supply = 21e18uumee` (21 billions UMEE)
- `inflation_cycle = time.Hour * 24 * 365 * 2` (2 years)
- `inflation_reduction_rate = 2500 basis points` (25%)

The new Inflation Cycle will start on 2023-10-15 15:00 UTC. This will mark the first inflation reduction from the current rates:

- `inflation_min` 7% → 5.25%
- `inflation_max` 14% → 10.5%

The x/staking Bonded Goal stays the same: 33.00%.

### Emergency Groups

Currently, any parameter update requires going through a standard governance process, which takes 4 days. In a critical situation we need to act immediately:
Expand All @@ -61,25 +27,6 @@ Currently, any parameter update requires going through a standard governance pro

Emergency Group can trigger safe parameter updates at any time as a standard transaction. The Emergency Group address is controlled by the Umee Chain governance (`x/gov`) and can be disabled at any time.

### Validators

#### libwasmvm update

Our dependencies have been updated. Now the binary requires `libwasmvm v1.3.0`. When you build the binary from source on the server machine you probably don't need any change. However when you download a binary from GitHub, or from other source, make sure you update the `/usr/lib/libwasmvm.<cpu_arch>.so`. For example:

- copy from `$GOPATH/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/libwasmvm.$(uname -m).so`
- or download from github `wget https://raw.githubusercontent.com/CosmWasm/wasmvm/v1.3.0/internal/api/libwasmvm.$(uname -m).so -O /lib/libwasmvm.$(uname -m).so`

You don't need to do anything if you are using our Docker image.

#### Min Gas Prices

Since v4.2 release we request all validators set a `minimum-gas-prices` setting (in app `config/app.toml` file, general settings). We recommend `0.1uumee` which is equal the current Keplr _average_ setting:

```
minimum-gas-prices = "0.1uumee"
```

### Upgrade instructions

- Download latest binary or build from source.
Expand Down
16 changes: 11 additions & 5 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"
ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"
"github.com/tendermint/tendermint/libs/log"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -64,16 +65,14 @@ func (app UmeeApp) RegisterUpgradeHandlers() {
func (app *UmeeApp) registerUpgrade6_1(planName string, upgradeInfo upgradetypes.Plan) {
app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("-----------------------------\n-----------------------------")
ctx.Logger().Info("Upgrade handler execution", "name", planName)
ctx.Logger().Info("Run v6.1 migration")
printPlanName(planName, ctx.Logger())
err := app.OracleKeeper.SetHistoricAvgCounterParams(ctx, oracletypes.DefaultAvgCounterParams())
if err != nil {
return fromVM, err
}

oracleUpgrader := oraclemigrator.NewMigrator(&app.OracleKeeper)
oracleUpgrader.MigrateOldExgRatesToExgRatesWithTimestamp(ctx)
oracleUpgrader.ExgRatesWithTimestamp(ctx)

return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
Expand All @@ -92,7 +91,7 @@ func (app *UmeeApp) registerUpgrade6(upgradeInfo upgradetypes.Plan) {

app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("-----------------------------\n---------------")
printPlanName(planName, ctx.Logger())
if err := app.LeverageKeeper.SetParams(ctx, leveragetypes.DefaultParams()); err != nil {
return fromVM, err
}
Expand Down Expand Up @@ -309,6 +308,8 @@ func (app *UmeeApp) registerUpgrade3_0(upgradeInfo upgradetypes.Plan) {

func onlyModuleMigrations(app *UmeeApp, planName string) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
printPlanName(planName, ctx.Logger())
ctx.Logger().Info("-----------------------------\n-----------------------------")
ctx.Logger().Info("Upgrade handler execution", "name", planName)
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
}
Expand All @@ -334,3 +335,8 @@ func (app *UmeeApp) registerUpgrade(planName string, upgradeInfo upgradetypes.Pl
})
}
}

func printPlanName(planName string, logger log.Logger) {
logger.Info("-----------------------------\n-----------------------------")
logger.Info("Upgrade handler execution", "name", planName)
}
4 changes: 2 additions & 2 deletions x/oracle/migrations/exg_rates_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// MigrateOldExgRatesToExgRatesWithTimestamp will migrate old exchnage rate of denoms into new exchange rate format with
// ExgRatesWithTimestamp will migrate old exchnage rate of denoms into new exchange rate format with
// timestamp into store.
func (m Migrator) MigrateOldExgRatesToExgRatesWithTimestamp(ctx sdk.Context) {
func (m Migrator) ExgRatesWithTimestamp(ctx sdk.Context) {
m.keeper.IterateOldExchangeRates(ctx, func(s string, d sdk.Dec) bool {
ctx.Logger().Info("Migrating old exchange rate to new exchange rate format", "denom", s)
m.keeper.SetExchangeRateWithTimestamp(ctx, s, d, ctx.BlockTime())
Expand Down

0 comments on commit 39e19f6

Please sign in to comment.