Skip to content

Commit

Permalink
Merge main into concentrated-liquidity-main (#3149)
Browse files Browse the repository at this point in the history
* Add servers to openapi spec file (#2980)

* Chain.schema.json: Added ibc data, fix genesis name, formatting (#3077)

Closes: #XXX

## What is the purpose of the change

> Add a description of the overall background and high level changes that this PR introduces

*(E.g.: This pull request improves documation of area A by adding ....*

To update the chain schema codebase data. This file Auto-updates the chain registry.


## Brief Changelog

*(for example:)*
 
  - *The metadata is stored in the blob store on job creation time as a persistent artifact*
  - *Deployments RPC transmits only the blob storage reference*
  - *Daemons retrieve the RPC data from the blob cache*

Added ibc data (ibc go version and enabled features(ics-20),
fix genesis name, (was version number before, now goes by name)
minor formatting chg.


## Testing and Verifying

*(Please pick one of the following options)*

--> This change is a trivial rework / code cleanup without any test coverage.

*(or)*

This change is already covered by existing tests, such as *(please describe tests)*.

*(or)*

This change added tests and can be verified as follows:

*(example:)*
  - *Added unit test that validates ...*
  - *Added integration tests for end-to-end deployment with ...*
  - *Extended integration test for ...*
  - *Manually verified the change by ...*

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? (yes / no) No
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? (yes / no) No
  - How is the feature or change documented? (not applicable   /   specification (`x/<module>/spec/`)  /  [Osmosis docs repo](https://github.com/osmosis-labs/docs)   /   not documented) not documented

* labels (#3082)

* [x/gamm][stableswap]: Expand inverse relation tests to multi assets and add scaling factors (#3006)

* expand inverse relation tests to multi assets and add scaling factors

* tighten binary search bounds to fit spec

* remove todo

* Fix sped

* move output negation to caller

Co-authored-by: Dev Ojha <dojha@berkeley.edu>

* remove all uses of two-asset binary search solver (#3084)

* [stableswap]: Implement simplified direct multi-asset CFMM solver (#3068)

Closes: #2730

## What is the purpose of the change

This PR implements a direct solver for our multi-asset CFMM. Similar to our two-asset direct solver, it is intended to be kept in our codebase as a reference implementation and proof for our CFMM but is outclassed by our binary search solver for practical use.

## Brief Changelog

- Implement direct multi-asset solver and test it against our full suite of CFMM cases

## Testing and Verifying

- The solver implementation is tested against our full multi-asset CFMM test suite in `amm_test.go`

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? (no)
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? (no)
  - How is the feature or change documented? (not documented)

* refactor: remove PokePool from the PoolI interface, define on extension instead (#3035)

* refactor: remove PokePool from the PoolI interface, use extension instead

* changelog

* fix weights bug

* Update x/gamm/keeper/pool_test.go

Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>

* Update x/gamm/keeper/pool_test.go

* address comments

Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>

* ci(CL): run tests on CL branch and add backport config (#3095)

* ci(CL): run tests on CL branch and add backport config

* Update .github/mergify.yml

* After create pool test (#2783)

* add test for afterCreatePool

* format

* add test to check trackChangePool

Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>

* fix GetModuleToDistributeCoins (#2957)

* update comment in gamm module (#3103)

* chore(deps): Bump github.com/tendermint/tendermint (#3106)

Bumps [github.com/tendermint/tendermint](https://github.com/tendermint/tendermint) from 0.34.21 to 0.34.22.
- [Release notes](https://github.com/tendermint/tendermint/releases)
- [Changelog](https://github.com/tendermint/tendermint/blob/main/CHANGELOG.md)
- [Commits](tendermint/tendermint@v0.34.21...v0.34.22)

---
updated-dependencies:
- dependency-name: github.com/tendermint/tendermint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/golangci/golangci-lint (#3104)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.50.0 to 1.50.1.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.50.0...v1.50.1)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 (#3105)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: update concentrated liquidity backport label (#3115)

* feat(osmomath): log2 approximation (#2788)

* feat: osmomath log2 approximation

* lint

* fix comment

* comment

* Update osmomath/decimal.go

* improve accuracy with narrower range

* comment

* implement and test precise log for x >= 1

* tests for negative values

* make non-mutative and test

* bench

* changelog

* remove redundant assignments

* improve comments

* [stableswap]: Cap number of assets and post-scaled asset amounts to ensure pools never overflow (#3055)

* add tests for 10-asset pools with 10B per asset

* add max post-scaled asset check and create pool tests

* add sanity tests for new swap guardrails

* move max scaled asset amt to constant

* add join-pool-internal tests for new functionality

* Remove unused versions in mergify (#3121)

* Query lockup params (#3098)

* change proto

* add grpc & cli query

* test

* set params in genesis

* add test case: setParams & query

* CI: Delete failing step (#3124)

* Delete failing step

* Fix int overflow in test logic

* [x/gamm][stableswap]: Add inverse join/exit tests, fix single asset join bug, and remove uneven ratio joins (#3102)

* add tests for 10-asset pools with 10B per asset

* add max post-scaled asset check and create pool tests

* add sanity tests for new swap guardrails

* move max scaled asset amt to constant

* add join-pool-internal tests for new functionality

* fix single join bug, remove uneven ratio joins, and add inverse join tests

* add error checks to single asset joins

* fix mistake in test case

* remove commented line

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Dev Ojha <dojha@berkeley.edu>

* Stableswap implement JoinPoolNoSwap (#2942)

* ...

* add tests and denom validation check

* make format

Co-authored-by: alpo <yukseloglua@berkeley.edu>
Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com>

* Make testing suite to ensure queries never alter state (#3001)

* create func to check alter state

* add tests

* format

* Update app/apptesting/test_suite.go

Co-authored-by: Roman <roman@osmosis.team>

* remove fmt

* epochs: try to use Invoke

* gamm: use Invoke

* incentives: use Invoke

* lockup: use Invoke

* mint: use Invoke

* pool-incentives: use Invoke

* superfluid: use Invoke

* tokenfactory

* txfees

* format

* fix

Co-authored-by: Roman <roman@osmosis.team>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Daniel Farina <contact@nevulas.com>
Co-authored-by: JeremyParish69 <95667791+JeremyParish69@users.noreply.github.com>
Co-authored-by: Adam Tucker <adam@osmosis.team>
Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com>
Co-authored-by: Dev Ojha <dojha@berkeley.edu>
Co-authored-by: Roman <roman@osmosis.team>
Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com>
Co-authored-by: khanh-notional <50263489+catShaark@users.noreply.github.com>
Co-authored-by: Nguyen Thanh Nhan <thanhnhan98qh@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: alpo <yukseloglua@berkeley.edu>
  • Loading branch information
14 people authored Oct 25, 2022
1 parent 3cde076 commit 13527b7
Show file tree
Hide file tree
Showing 40 changed files with 2,702 additions and 304 deletions.
7 changes: 5 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
- app/wasm/**/*
"C:x/claim":
- x/claim/**/*
"C:x/concentrated-liquidity":
- x/concentrated-liquidity/**/*
"C:x/epochs":
- x/epochs/**/*
"C:x/gamm":
Expand All @@ -34,6 +36,8 @@
- x/pool-incentives/**/*
"C:x/superfluid":
- x/superfluid/**/*
"C:x/swaprouter":
- x/swaprouter/**/*
"C:x/txfees":
- x/txfees/**/*
"C:x/tokenfactory":
Expand All @@ -52,7 +56,7 @@
"C:CLI":
- client/**/*
- x/*/client/**/*
# Add "C:docs" label to documented related files and directories.
# Add "C:docs" label to documented related files and directories.
"C:docs":
- bug.md
- issue.md
Expand All @@ -61,4 +65,3 @@
- x/**/*.md
- x/**/*/*.md
- tests/**/*.md

32 changes: 8 additions & 24 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ pull_request_rules:
backport:
branches:
- v4.x
- name: backport patches to v5.x branch
conditions:
- base=main
- label=A:backport/v5.x
actions:
backport:
branches:
- v5.x
- name: backport patches to v6.x branch
conditions:
- base=main
Expand All @@ -54,14 +46,6 @@ pull_request_rules:
backport:
branches:
- v6.x
- name: backport patches to v7.x branch
conditions:
- base=main
- label=A:backport/v7.x
actions:
backport:
branches:
- v7.x
- name: backport patches to v8.x branch
conditions:
- base=main
Expand All @@ -70,14 +54,6 @@ pull_request_rules:
backport:
branches:
- v8.x
- name: backport patches to v9.x branch
conditions:
- base=main
- label=A:backport/v9.x
actions:
backport:
branches:
- v9.x
- name: backport patches to v10.x branch
conditions:
- base=main
Expand Down Expand Up @@ -110,3 +86,11 @@ pull_request_rules:
backport:
branches:
- v13.x
- name: backport patches to concentrated-liquidity-main
conditions:
- base=main
- label=A:backport/cl
actions:
backport:
branches:
- concentrated-liquidity-main
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- concentrated-liquidity-main

jobs:
golangci:
Expand Down
8 changes: 8 additions & 0 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ func (s *KeeperTestHelper) BuildTx(
return txBuilder.GetTx()
}

// StateNotAltered validates that app state is not altered. Fails if it is.
func (s *KeeperTestHelper) StateNotAltered() {
oldState := s.App.ExportState(s.Ctx)
s.Commit()
newState := s.App.ExportState(s.Ctx)
s.Require().Equal(oldState, newState)
}

// CreateRandomAccounts is a function return a list of randomly generated AccAddresses
func CreateRandomAccounts(numAccts int) []sdk.AccAddress {
testAddrs := make([]sdk.AccAddress, numAccts)
Expand Down
4 changes: 4 additions & 0 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,7 @@ func (app *OsmosisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddr
},
)
}

func (app *OsmosisApp) ExportState(ctx sdk.Context) map[string]json.RawMessage {
return app.mm.ExportGenesis(ctx, app.AppCodec())
}
12 changes: 9 additions & 3 deletions chain.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"codebase":{
"git_repo": "https://github.com/osmosis-labs/osmosis",
"recommended_version": "12.1.0",
"compatible_versions": ["12.1.0"],
"recommended_version": "12.2.0",
"compatible_versions": [
"12.2.0"
],
"binaries": {
"linux/amd64": "https://github.com/osmosis-labs/osmosis/releases/download/v12.1.0/osmosisd-12.1.0-linux-amd64?checksum=sha256:44433f93946338b8cb167d9030ebbcfe924294d95d745026ada5dbe8f50d5010",
"linux/arm64": "https://github.com/osmosis-labs/osmosis/releases/download/v12.1.0/osmosisd-12.1.0-linux-arm64?checksum=sha256:ef2c3d60156be5481534ecb33f9d94d73afa38a1b016e7e1c6d3fe10e3e69b3a"
Expand All @@ -12,8 +14,12 @@
"tendermint_version": "0.34",
"cosmwasm_version": "0.28",
"cosmwasm_enabled": true,
"ibc_go_version": "3.3.0",
"ics_enabled": [
"ics20-1"
],
"genesis": {
"name": "v3.1.0",
"name": "v3",
"genesis_url": "https://github.com/osmosis-labs/networks/raw/main/osmosis-1/genesis.json"
},
"versions": [
Expand Down
46 changes: 23 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/gogo/protobuf v1.3.3
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.2
github.com/golangci/golangci-lint v1.50.0
github.com/golangci/golangci-lint v1.50.1
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/mattn/go-sqlite3 v1.14.15
Expand All @@ -24,13 +24,13 @@ require (
github.com/spf13/cobra v1.6.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.8.0
github.com/tendermint/tendermint v0.34.21
github.com/stretchr/testify v1.8.1
github.com/tendermint/tendermint v0.34.22
github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b
go.uber.org/multierr v1.8.0
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
google.golang.org/grpc v1.49.0
google.golang.org/grpc v1.50.0
gopkg.in/yaml.v2 v2.4.0
mvdan.cc/gofumpt v0.4.0
)
Expand All @@ -43,16 +43,16 @@ require (
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.2 // indirect
github.com/kkHAIKE/contextcheck v1.1.3 // indirect
github.com/maratori/testableexamples v1.0.0 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.20.0 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/timonwong/loggercheck v0.9.3 // indirect
github.com/zimmski/go-mutesting v0.0.0-20210610104036-6d9217011a00 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/zap v1.21.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/zap v1.22.0 // indirect
)

require (
Expand All @@ -63,7 +63,7 @@ require (
github.com/Antonboom/errname v0.1.7 // indirect
github.com/Antonboom/nilnil v0.1.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/CosmWasm/wasmvm v1.0.0
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
Expand Down Expand Up @@ -97,7 +97,7 @@ require (
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect
github.com/cosmos/ledger-go v0.9.3 // indirect
github.com/daixiang0/gci v0.8.0 // indirect
github.com/daixiang0/gci v0.8.1 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
Expand Down Expand Up @@ -199,11 +199,11 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/revive v1.2.4 // indirect
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect
github.com/moricho/tparallel v0.2.1 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
Expand All @@ -228,14 +228,14 @@ require (
github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rs/cors v1.8.2 // indirect
github.com/rs/zerolog v1.27.0 // indirect
github.com/ryancurrah/gomodguard v1.2.4 // indirect
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/securego/gosec/v2 v2.13.1 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
Expand All @@ -247,7 +247,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
github.com/tdakkota/asciicheck v0.1.1 // indirect
Expand All @@ -256,8 +256,8 @@ require (
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tetafro/godot v1.4.11 // indirect
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
github.com/tomarrell/wrapcheck/v2 v2.7.0 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
github.com/ultraware/funlen v0.0.3 // indirect
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.0.6 // indirect
Expand All @@ -272,15 +272,15 @@ require (
gitlab.com/bosi/decorder v0.2.3 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect
golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/term v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.2.0 // indirect
google.golang.org/protobuf v1.28.1
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 13527b7

Please sign in to comment.