Skip to content

Commit

Permalink
Merge branch 'main' into adam/fixsp
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki authored Nov 13, 2023
2 parents ee978dc + 7779fd6 commit 6399b83
Show file tree
Hide file tree
Showing 171 changed files with 1,641 additions and 1,353 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Vuln
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
with:
fetch-depth: 0
# lint only changed files
- uses: tj-actions/changed-files@v39
- uses: tj-actions/changed-files@v40
id: changed-files
with:
files: "**/*.md"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-umee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
cache: true

- name: Set Env
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV
run: echo "TM_VERSION=$(go list -m github.com/cometbft/cometbft | sed 's:.* ::')" >> $GITHUB_ENV

# useful to test builds. However will require to add "push" rule to the "on" section
- name: generate and update swagger docs
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ builds:
- -tags=badgerdb ledger netgo
- -trimpath
ldflags:
- -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }}
- -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Env.TM_VERSION }}
goos:
- linux
goarch:
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,46 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## Unreleased

### Improvements

- [2299](https://github.com/umee-network/umee/pull/2299) Upgrade Cosmos SDK to v0.47.
- [2301](https://github.com/umee-network/umee/pull/2301) use gov/v1 MinInitialDepositRatio and set it to 0.1.

## v6.1.0 - 2023-10-17

### Improvements

- [2285](https://github.com/umee-network/umee/pull/2285) Upgrade Cosmos SDK to v0.46.15.
- [2288](https://github.com/umee-network/umee/pull/2288) Change `consensus.block.max_size` to 6MB.

### 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.
- [2270](https://github.com/umee-network/umee/pull/2270) Increase free oracle tx limit to 200k gas.
- [2285](https://github.com/umee-network/umee/pull/2285) Leveraged liquidate works during low liquidity.

### Features

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation')
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
export VERSION := $(shell echo $(shell git describe --tags --always --match "v*") | sed 's/^v//')
export TMVERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::')
export TMVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
export COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true
BINDIR ?= $(GOPATH)/bin
Expand Down Expand Up @@ -68,7 +68,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=umee \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TMVERSION)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TMVERSION)

ifeq ($(ENABLE_ROCKSDB),true)
BUILD_TAGS += rocksdb
Expand Down Expand Up @@ -320,8 +320,8 @@ lint-fix:

DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.8.0

protoVer=v0.7
protoImageName=tendermintdev/sdk-proto-gen:$(protoVer)
protoVer=0.13.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer)
containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer)
containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ 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 |
| v6.2.x || v0.47.5+ | v7.2.x | --- | TODO | --- | TODO |

#### Price Feeder

Expand Down
72 changes: 5 additions & 67 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,79 +6,17 @@

Release Procedure is defined in the [CONTRIBUTING](CONTRIBUTING.md#release-procedure) document.

## 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.
- 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.

[CHANGELOG](CHANGELOG.md)

## v6.0.0
## v6.2.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:

- Control IBC Quota parameters (eg disable IBC)
- apply safe updates to oracle, leverage or incentive module parameters.

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.
- Umee chain upgrades to the latest stable Cosmos SDK v0.47
- The `gov` module in in Cosmos SDK v0.47 has been updated to support a minimum proposal deposit at submission time. It is determined by a new parameter called `MinInitialDepositRatio`. When multiplied by the existing `MinDeposit` parameter, it produces the necessary proportion of coins needed at the proposal submission time. The motivation for this change is to prevent proposal spamming.
We set `MinInitialDepositRatio` to 10%.`

### 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 Price Feeder: TODO

### Upgrade instructions

Expand Down
4 changes: 2 additions & 2 deletions ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
cosmosante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
"github.com/cosmos/cosmos-sdk/x/auth/types"
ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
)

type HandlerOptions struct {
Expand Down
8 changes: 4 additions & 4 deletions ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import (
"fmt"
"testing"

tmrand "github.com/cometbft/cometbft/libs/rand"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/tx"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
"github.com/stretchr/testify/suite"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

umeeapp "github.com/umee-network/umee/v6/app"
)
Expand All @@ -37,7 +37,7 @@ func (s *IntegrationTestSuite) SetupTest() {
s.app = app
s.ctx = ctx

encodingConfig := simapp.MakeTestEncodingConfig()
encodingConfig := testutil.MakeTestEncodingConfig()
encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil)
testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry)
s.clientCtx = client.Context{}.
Expand Down
Loading

0 comments on commit 6399b83

Please sign in to comment.