Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conflicts for protorev from renaming swaprouter to poolmanager #3963

Merged
merged 126 commits into from
Jan 9, 2023

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Jan 9, 2023

Closes: #XXX

What is the purpose of the change

Fix conflicts for protorev from renaming swaprouter to poolmanager

Ran:

git checkout main
git pull

git checkout protorev-pr5
git pull

git checkout -b roman/fix-conflicts
git merge main

p0mvn and others added 30 commits October 18, 2022 13:02
* refactor: remove PokePool from the PoolI interface, define on extension instead (backport #3035)

* refactor: implement TraditionalAmmInterface and refactor gamm
* Add BareBone

* Add barebone

* Moce to pool model packaage
* swap cl

* remove upscaling

* godocs

* code review

* godoc

* correct logic for calc in and out

* remove debugging lines

* final comments

* add swap fee for pool test

* fee logic

* code review comments

Co-authored-by: Roman <[email protected]>
* swap cl

* remove upscaling

* godocs

* code review

* godoc

* Seperate out concentrated liquidity as separate module

* correct logic for calc in and out

* remove debugging lines

* final comments

* add swap fee for pool test

* fee logic

Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
* feat: osmomath log2 approximation

* lint

* fix comment

* comment

* Update osmomath/decimal.go

* hacky mod to make this work

Co-authored-by: Adam Tucker <[email protected]>
* Add pool state, basic outline for join pool

* Remove comment

* Fix lint

* change from code review
* feat(CL): swap router module

* remove unused things

* Update x/swaprouter/types/params.go

* Update x/swaprouter/types/params.go

* Update proto/osmosis/swaprouter/v1beta1/genesis.proto

Co-authored-by: Matt, Park <[email protected]>

* regen proto

Co-authored-by: Matt, Park <[email protected]>
* feat(CL): swap router messages and wiring

* fix lint
* adds tick price functions

* add no lint
* feat(CL): app wiring for concentrated liquidity module

* lint

* field
* Add basic modulew wiring in app.go

* Add genesis

* Change import name
* further swap generalizing

* code review changes
* Add Base layer for generalized minting

* Generalized swaps

* WIP: test refactor

* Finish refactoring existing testS

* Fix testS

* Fix lint
#3073)

* updates

* remove swap messages from gamm

* remove swap bindings

* fix CI and tests

* port cli tests

* add query proto comments

* clean up

* port msg_server_test.go

* port msgs_test.go

* try integrating swap messages

* lint

* attempt fixing e2e

* set params

* upgrade constants

* Update x/swaprouter/module/module.go

Co-authored-by: Matt, Park <[email protected]>

* swaprouter comment

Co-authored-by: Matt, Park <[email protected]>
* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* Update x/concentrated-liquidity/tick_test.go

Co-authored-by: Matt, Park <[email protected]>

* Update x/concentrated-liquidity/tick.go

Co-authored-by: Matt, Park <[email protected]>

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* bez: updates

* Fix lint

Co-authored-by: Matt, Park <[email protected]>
Co-authored-by: mattverse <[email protected]>
* further swap generalization

* add step and swap state

* Update test.yml

* Update test.yml

* Further generalize swaps and lp (#3111)

* Change sqrt to caller

* Remove margin of error from mint

* Change Pool to have dec curr price

* Remove swap structs

* Adams comments

* address code review comments

* final additions

* address code review comments

* code review

Co-authored-by: Matt, Park <[email protected]>
Co-authored-by: Roman <[email protected]>
…idity module (#3128)

* feat/refactor(CL): move multihop to swaprouter, connect to concentrated liquidity

* comments

* godoc for RouteExactAmountOut

* link issues

* delete multihop_test.go

* Update x/swaprouter/router_test.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/swaprouter/router_test.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/concentrated-liquidity/pool.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/gamm/keeper/swap.go

Co-authored-by: Adam Tucker <[email protected]>

Co-authored-by: Adam Tucker <[email protected]>
* WIP: tick

* Finish implementing

* Update x/concentrated-liquidity/lp.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/concentrated-liquidity/lp.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/concentrated-liquidity/lp.go

Co-authored-by: Adam Tucker <[email protected]>

* Change to negative calculations

* Add comment

* Add getter in osmoutils

* Update osmoutils/store_helper.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/concentrated-liquidity/position.go

Co-authored-by: Adam Tucker <[email protected]>

Co-authored-by: Adam Tucker <[email protected]>
* feat(CL): CreatePosition and WithdrawPosition messages

* lint
* add tests for GetIfFound

* refactor
* 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 <[email protected]>

* 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 <[email protected]>

* Update x/gamm/keeper/pool_test.go

* address comments

Co-authored-by: Matt, Park <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
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] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
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] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
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 <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>

* Stableswap implement JoinPoolNoSwap (#2942)

* ...

* add tests and denom validation check

* make format

Co-authored-by: alpo <[email protected]>
Co-authored-by: alpo <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Daniel Farina <[email protected]>
Co-authored-by: JeremyParish69 <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: Hieu Vu <[email protected]>
Co-authored-by: khanh-notional <[email protected]>
Co-authored-by: Nguyen Thanh Nhan <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niccolo Raspa <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: alpo <[email protected]>
#3141)

* refactor/docs(CL): return liquidity from MsgCreatePosition and add keeper specs

* updates

* lint

* change liquidity to dec and pass test

* Update x/concentrated-liquidity/msg_server.go

Co-authored-by: Adam Tucker <[email protected]>

* Update x/concentrated-liquidity/msg_server.go

Co-authored-by: Adam Tucker <[email protected]>

Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
* initial push

* WIP: tick

* Finish implementing

* milestone 3

* fix

* address matt comment

* code review comments

Co-authored-by: mattverse <[email protected]>
ValarDragon and others added 15 commits January 6, 2023 12:24
* initial setup for manual and e2e tests

* added cli for calculating the sender

* tidy

* added cleaner flags and better checks at the end

* proper checks

* cleanup

* initial e2e tests

* debugging

* cleanup

* tidy

* remove import cycle

* test cleanup

* updated prefix

* fix go test
… comparable gamm CLI (#3875)

* NewSwapExactAmountInCmd: migrate to osmocli / remove from gamm

* NewSwapExactAmountOutCmd to osmocli

* GetCmdNumPools query to osmocli/swaprouter

* EstimateSwapExactAmountIn to osmocli  and swaprouter

* GetCmdEstimateSwapExactAmountOut to osmocli/swaprouter

* TestGetCmdNumPools was a method for integration test suite??? removed it

* change gamm to swaprouter in scripts/docs

* restore go work sum

* revert gamm deprecation

* go work sum

* back gamm

* one more swaprouter to gamm change

* change go work sum
* fix order for JoinSwapShareAmountOut args

* Revert "fix order for JoinSwapShareAmountOut args"

This reverts commit 7991c1c.

* change help text

* add line to changelog
…essages (#3929)

* go work sum

* MsgCreateConcentratedPool (de)ser check

* test for MsgCreateConcentratedPool

* MsgWithdrawPosition check

* MsgWithdrawPosition test case

* MsgCreatePosition check

* MsgCreatePosition test case

* add check to make sure result is expected and add else branch for msgs not yet checked

* remove wrong test

* fix test

* commit not passed test

* fix issue with MsgCreateConcentratedPool
## What is the purpose of the change
This just adds a bit of documentation to the helper script for doing manual testing of ibc hooks.
* reafctor(x/swaprouter, x/gamm): unify swap routes in swaprouter

* changelog

* remove deprecation messages

* revert

* merge

* values for test routes

* json serialization test

* fix changelog
* Add accumulator to lp positions

* Add test cases for initFeeAccum, calculateFeeGrowth

* Add TestGetFeeGrowthOutside

* Partially fix tests

* Fixed all tests :P

* Remove all lp.go related logic

* Fix lint

* Fix test
* feat(CL Fees): getInitialFeeGrowthOtsideForTick, chargeFee methods

* godocs

* TestChargeFee

* nolint

* update TestGetTickInfo

* Update x/concentrated-liquidity/tick.go

* Update x/concentrated-liquidity/fees.go

* rename

* Update x/concentrated-liquidity/fees_test.go

Co-authored-by: Matt, Park <[email protected]>

* Update x/concentrated-liquidity/tick_test.go

Co-authored-by: Matt, Park <[email protected]>

Co-authored-by: Matt, Park <[email protected]>
* codec changes

* Update codec.go

* address comments

* lint
* Rename swaprouter to poolmanager

* Rename swap router to pool manager and swap-router to pool-manager

* Update proto

* keep swaprouter in swaprouter contract

* fix linter
@github-actions github-actions bot added C:app-wiring Changes to the app folder C:CLI C:docs Improvements or additions to documentation C:simulator Edits simulator or simulations C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/pool-incentives C:x/superfluid C:x/swaprouter C:x/twap Changes to the twap module C:x/txfees T:CI labels Jan 9, 2023
@p0mvn p0mvn marked this pull request as ready for review January 9, 2023 17:23
@davidterpay davidterpay merged commit 911023a into protorev-pr5 Jan 9, 2023
@davidterpay davidterpay deleted the roman/fix-conflicts branch January 9, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder C:CLI C:docs Improvements or additions to documentation C:simulator Edits simulator or simulations C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/pool-incentives C:x/superfluid C:x/swaprouter C:x/twap Changes to the twap module C:x/txfees T:CI
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.