Skip to content

Commit

Permalink
Merge commit 'd12ec9ecf0c06ce33217c5bce74b425aea4dcdef' into no-gb
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Jun 2, 2023
2 parents 95c3d32 + d12ec9e commit c58df58
Show file tree
Hide file tree
Showing 11 changed files with 181 additions and 153 deletions.
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,35 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

- [1952](https://github.com/umee-network/umee/pull/1952) Add `x/incentive` module
- [1952](https://github.com/umee-network/umee/pull/1952) Add `x/incentive` module.
- [2015](https://github.com/umee-network/umee/pull/2015), [2050](https://github.com/umee-network/umee/pull/2050) Add `x/ugov` module.

## [v5.0.0](https://github.com/umee-network/umee/releases/tag/v5.0.0-rc1) - 2023-05-31

### Features

- [1888](https://github.com/umee-network/umee/pull/1888) Created `/sdkclient` and `/client` (umee client) packages to easy the E2E tests and external tools. Essentially, you can import that client and broadcast transactions easily.
- [1993](https://github.com/umee-network/umee/pull/1993) Updated our Cosmos SDK fork to 0.46.12 and included an option to disable colored logs.
- [2071](https://github.com/umee-network/umee/pull/2071) Update GB and enable Valset Burn mechanism.
- [1547](https://github.com/umee-network/umee/pull/1547), [1997](https://github.com/umee-network/umee/pull/1997), [2058](https://github.com/umee-network/umee/pull/2058), [2063](https://github.com/umee-network/umee/pull/2063) Cosmwasm integration.

### Improvements

- [1989](https://github.com/umee-network/umee/pull/1989) Leverage: fix the duplicate symbol denoms issue on adding new tokens to registry.
- [1989](https://github.com/umee-network/umee/pull/1989) Updated go version from 1.19 to 1.20
- [2001](https://github.com/umee-network/umee/pull/2001) Refactoring CLI integration test suite.
- [2009](https://github.com/umee-network/umee/pull/2009) Use DavidAnson/markdownlint action for Markdown linting.
- [2010](https://github.com/umee-network/umee/pull/2010) New `util/store` generic functions to load all values from a store.
- [2021](https://github.com/umee-network/umee/pull/2021) `quota/keeper` unit test refactor.
- [2021](https://github.com/umee-network/umee/pull/2021) `uibc/quota/keeper` unit test refactor.
- [2024](https://github.com/umee-network/umee/pull/2024) New upgrade registration methods.
- [2037](https://github.com/umee-network/umee/pull/2037) Speedup e2e by removing docker cache.
- [2038](https://github.com/umee-network/umee/pull/2038) Unify util tsdk and store packages.

### Fixes

- [1982](https://github.com/umee-network/umee/pull/1982) Fix the build version (`umeed version`).
- [2052](https://github.com/umee-network/umee/pull/2052) Allow liquidation threshold == collateral weight in token validation.
- [2072](https://github.com/umee-network/umee/pull/2072) Fix an int64 overflow when computing module liquidity for high-exponent assets.

## [v4.4.1](https://github.com/umee-network/umee/releases/tag/v4.4.1) - 2023-05-25

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ See [Release procedure](CONTRIBUTING.md#release-procedure) for more information
| v4.0.x || v0.46.6+ | v5.1.x | v1.3.x+ | v2.0.3 | umee/v4 v1.5.3-umee-4 | v1.1.1 |
| v4.1.x || v0.46.7+ | v5.2.x | v1.3.x+ | v2.1.0 | umee/v4 v1.5.3-umee-4 | v1.1.1 |
| v4.2.x || v0.46.10+ | v5.2.x | v1.3.x+ | umee/v2.1.1 | umee/v4 v1.5.3-umee-4 | v1.1.1 |
| v4.3.x || v0.46.11+ | v6.1.x | v1.3.x+ | umee/v2.1.1 | umee/v4 v1.5.3-umee-5 | v1.2.1 |
| v4.4.x || v0.46.11+ | v6.1.x | v1.3.x+ | umee/v2.1.4+ | umee/v4 v1.5.3-umee-5 | v1.2.3 |
| v5.0.x || v0.46.11+ | v6.1.x | v1.3.x+ | umee/v2.1.4+ | umee/v4 v1.5.3-umee-5 | v1.2.3 |
| v4.3.x || v0.46.11+ | v6.1.x | v1.3.x+ | umee/v2.1.1 | umee/v4 v1.5.3-umee-6 | v1.2.1 |
| v4.4.x || v0.46.11+ | v6.1.x | v1.3.x+ | umee/v2.1.4+ | umee/v4 v1.5.3-umee-6 | v1.2.3 |
| v5.0.x || v0.46.11+ | v6.1.x | v1.3.x+ | umee/v2.1.4+ | umee/v4 v1.5.3-umee-8 | v1.2.3 |

#### Price Feeder

Expand Down
102 changes: 9 additions & 93 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,22 @@

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

## v4.5.0
## v5.0.0

Highlights:

- Cosmwasm integration.
- Gravity Bridge phase-3: shutdown of the transfers. In this release we introduce valset burn mechanism,
which will block the Ethereum smart contract for processing any further transactions, as well
as sending transfers back to Ethereum. This follows the plan approved through in the
[prop-67](https://www.mintscan.io/umee/proposals/67).
NOTE: All validators must continue to use Peggo to not get slashed.
- Updated to the latest Cosmos SDK v0.46.12

<!-- TODO: See [CHANGELOG](https://github.com/umee-network/umee/blob/v4.4.0/CHANGELOG.md) for a full list of changes. -->
See [CHANGELOG](https://github.com/umee-network/umee/blob/v5.0.0-rc1/CHANGELOG.md)

### Validators

We changed our GitHub release configuration, and now provide binaries in `.tar.gz` tarball.

#### libwasmvm update

Related to CosmWasm security patch, the binary requires `libwasmvm v1.2.3`. 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/wasmvm@v1.2.3/internal/api/libwasmvm.$(uname -m).so`
- or download from github `wget https://raw.githubusercontent.com/CosmWasm/wasmvm/v1.2.3/internal/api/libwasmvm.$(uname -m).so -O /usr/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:
Expand All @@ -45,90 +40,11 @@ You MUST also set the related parameter when starting Peggo `--cosmos-gas-prices
- Wait for software upgrade proposal to pass and trigger the chain upgrade.
- Swap binaries.
- Ensure latest Peggo (v1.4.0) is running
- Ensure latest Price Feeder (v2.1.1) is running and check your price feeder config is up to date. Price Feeder was moved to the new repository: [ojo-network/price-feeder](https://github.com/ojo-network/price-feeder/tree/umee).
- Ensure latest Price Feeder (see [compatibility matrix](https://github.com/umee-network/umee/#release-compatibility-matrix)) is running and check your price feeder config is up to date.
- Restart the chain.

You can use Cosmovisor → see [instructions](https://github.com/umee-network/umee/#cosmovisor).

#### Docker

Docker images are available in [ghcr.io umee-network](https://github.com/umee-network/umee/pkgs/container/umeed) repository.

## v4.4.1

Patch release updating `ibc-go` to the most recent patch release.

## v4.4.0

This is a small, intermediate release.

For the Stride onboarding process, we decided to disable the IBC ICS-20 inflow limit of x/leverage registered tokens only. That means, now all tokens will be available for inflow transfers. Outflows quota will still hold: unregistered tokens can be transferred out without any limit and x/leverage registered tokens are limited to the daily quota.

See [CHANGELOG](https://github.com/umee-network/umee/blob/v4.4.0/CHANGELOG.md) for a full list of changes.

## v4.3.0

Highlights:

- Gravity Bridge Shutdown Phase 2. Following [Prop-67](https://www.mintscan.io/umee/proposals/67) we are disabling Umee -> Ethereum token transfers. Ethereum -> Umee transfers are still possible, and we encourage everyone to move the tokens back to Umee. In May we are planning the complete shut down. See more in the [blog post](https://umee.cc/blog/bridgemigration).
- IBC updated to `ibc-go v6.1`. That also triggered our wasmvm dependency update (see `libwasmvm` update in Validators section)
- ICA Host integration.
- IBC ICS20: we will only accept tokens (denoms) which are registered in the x/leverage token registry. You can check the supported tokens by `umeed q leverage registered-tokens` or by visiting [umee/leverage/v1/registered_tokens](https://umee-api.polkachu.com/umee/leverage/v1/registered_tokens).

See [CHANGELOG](https://github.com/umee-network/umee/blob/v4.3.0/CHANGELOG.md) for a full list of changes.

### Validators

#### libwasmvm update

Our dependencies have been updated. Now the binary requires `libwasmvm v1.2.1`. 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/wasmvm@v1.2.1/internal/api/libwasmvm.$(uname -m).so`
- or download from github `wget https://raw.githubusercontent.com/CosmWasm/wasmvm/v1.2.1/internal/api/libwasmvm.$(uname -m).so -O /usr/lib/libwasmvm.$(uname -m).so`

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

#### Min Gas Prices

Same as with 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"
```

You MUST also set the related parameter when starting Peggo `--cosmos-gas-prices="0.1uumee"`

## v4.2.0

The main highlight of this release is new `x/uibc` module which introduces IBC Quota functionality.
We are using it to limit daily (quota resets every 24 hours) IBC outflows in USD value based on our Avg price oracle update. Our current daily quota is 1M USD of total outflows and 600k USD of per token outflows. We only track the `x/leverage` registered tokens.
Example IBC outflows reaching the daily quota:

- 600k USD worth of ATOM (this is the max of a single token we can send per day), 400k USD worth of UMEE.
- 300k USD worth of ATOM, 200k USD worth of STATOM, 250k USD worth of UMEE and 250k USD worth JUNO.

Other highlights:

- Oracle: Avg prices. We compute average price based on ~16h rolling window.
- New option is available in `app.toml`: `iavl-lazy-loading` (in general settings). When setting to `true`, lazy loading of iavl store will be enabled and improve start up time of archive nodes.
- Migration from Tendermint to [CometBFT](https://github.com/cometbft/cometbft).

See [CHANGELOG](https://github.com/umee-network/umee/blob/v4.2.0/CHANGELOG.md) for a full list of changes.

## v4.1.0

This release contains several fixes designed to make lending and borrowing more resilient during price outages. Short summary of changes is available in the [Changelog](./CHANGELOG.md)

- [Price Feeder V2.1.0](https://github.com/umee-network/umee/releases/tag/price-feeder/v2.1.0) is recommended for use with this release. Upgrading price feeder can be done immediately by any validators who have not already switched. It does not need to be simultaneously with the chain upgrade.

**Please Note:**

Building from source will automatically link the `libwasmvm.x86_64.so` created as a part of the build process (you must build on the same host as you run the binary, or copy the `libwasmvm.x86_64.so` your lib directory).

If you build on system different than Linux amd64, then you need to download appropriate version of libwasmvm (eg from [CosmWasm/wasmvm Releases](https://github.com/CosmWasm/wasmvm/releases)) or build it from source (you will need Rust toolchain).

Otherwise you have to download `libwasmvm`. Please check [Supported Platforms](https://github.com/CosmWasm/wasmvm/tree/main/#supported-platforms). Example:

```bash
wget https://raw.githubusercontent.com/CosmWasm/wasmvm/v1.1.1/internal/api/libwasmvm.$(uname -m).so -P /lib/
```
6 changes: 4 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ func New(

app.UGovKeeperB = ugovkeeper.NewKeeperBuilder(appCodec, keys[ugov.ModuleName])

// register the staking hooks
// regist
// er the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(
Expand Down Expand Up @@ -626,7 +627,8 @@ func New(

// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,umee"
// default available capabilities https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,umee"

// Register umee custom plugin to wasm
wasmOpts = append(uwasm.RegisterCustomPlugins(app.LeverageKeeper, app.OracleKeeper), wasmOpts...)
Expand Down
63 changes: 63 additions & 0 deletions docs/cosmwasm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Cosmwasm

## Example smart contract to interact with umee native modules (leverage and oracle)

- [umee-cosmwasm](https://github.com/umee-network/umee-cosmwasm)

## Cosmwasm Built-in capabilities

- [Built-in capabilities](https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md) - iterator, staking, stargate, cosmwasm_1_1, cosmwasm_1_2
- Custom capability of umee chain: `umee`

## Allowed native module queries

Queries for all native Umee modules:

- [ugov](https://github.com/umee-network/umee/blob/main/proto/umee/ugov/v1/query.proto)
- [leverage](https://github.com/umee-network/umee/blob/main/proto/umee/leverage/v1/query.proto)
- [oracle](https://github.com/umee-network/umee/blob/main/proto/umee/oracle/v1/query.proto)
- [uibc](https://github.com/umee-network/umee/blob/main/proto/umee/uibc/v1/quota.proto)

```json
{
"chain": {
"custom": {
"leverage_parameters": {}
}
}
}
```

Example command to execute a query:

```bash
$ umeed q wasm contract-state smart ${json_input}
$ umeed q wasm contract-state smart umee14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9scsdqqx '{"chain":{"custom":{"leverage_params":{}}}}'
```

## Allowed native module transactions

Only [leverage module transactions](https://github.com/umee-network/umee/blob/main/proto/umee/leverage/v1/tx.proto) are allowed. Example JSON input for Umee native module:

```json
{
"umee": {
"leverage": {
"supply": {
"supplier": "",
"asset": {
"denom": "uumee",
"amount": "123123123"
}
}
}
}
}
```

Example commands to execute a transaction:

```bash
$ umeed tx wasm execute ${contract_id} ${json_input}
$ umeed tx wasm execute umee14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9scsdqqx '{"umee":{"leverage":{"supply_collateral":{"supplier":"umee1s84d29zk3k20xk9f0hvczkax90l9t94g72n6wm","asset":{"denom":"uumee","amount":"1234"}}}}}'
```
27 changes: 14 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ require (
github.com/rs/zerolog v1.29.1
github.com/spf13/cast v1.5.1
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.3
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/tendermint/tendermint v0.34.28
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
gopkg.in/yaml.v3 v3.0.1
Expand All @@ -41,9 +41,9 @@ require (
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
4d63.com/gochecknoglobals v0.2.1 // indirect
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute v1.19.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.12.0 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/storage v1.28.1 // indirect
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand Down Expand Up @@ -119,7 +119,7 @@ require (
github.com/firefart/nonamedreturns v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/gin-gonic/gin v1.9.0 // indirect
github.com/gin-gonic/gin v1.9.1 // indirect
github.com/go-critic/go-critic v0.7.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand Down Expand Up @@ -152,10 +152,11 @@ require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.3 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
Expand Down Expand Up @@ -207,7 +208,7 @@ require (
github.com/maratori/testpackage v1.1.1 // indirect
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
Expand All @@ -230,7 +231,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down Expand Up @@ -261,7 +262,7 @@ require (
github.com/sivchari/tenv v1.7.1 // indirect
github.com/sonatard/noctx v0.0.2 // indirect
github.com/sourcegraph/go-diff v0.7.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
Expand Down Expand Up @@ -297,19 +298,19 @@ require (
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect
golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.110.0 // indirect
google.golang.org/api v0.122.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit c58df58

Please sign in to comment.