Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed Aug 24, 2023
2 parents 0b2c113 + 36e7201 commit 3083bd6
Show file tree
Hide file tree
Showing 266 changed files with 13,871 additions and 3,918 deletions.
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,11 @@ pull_request_rules:
backport:
branches:
- v16.x
- name: backport patches to v17.x branch
conditions:
- base=main
- label=A:backport/v17.x
actions:
backport:
branches:
- v17.x
2 changes: 1 addition & 1 deletion .github/workflows/changelog-entry-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37.1.0
uses: tj-actions/changed-files@v37.6.1
with:
files_ignore: |
**/*.md
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Verify that generated code is up-to-date.
#
# Note that we run these checks regardless whether the input files have
# changed, because generated code can change in response to toolchain updates
# even if no files in the repository are modified.
name: Check generated code
# Ensure that generated code is up-to-date.
name: Generate protobuf code

on:
workflow_dispatch:
pull_request:
branches:
- '*'
paths:
- 'proto/**'
- '**/**.proto'
- '**/**.pb.go'
- '**/**.sum'
- '**/client/**.go'
- 'scripts/ci/**'
- 'Makefile'
- 'Dockerfile'
- '.github/workflows/check-generated.yml'

permissions:
contents: read
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -22,15 +26,21 @@ jobs:
check-proto:
runs-on: ubuntu-latest
steps:
-
name: 🐿 Setup Golang
uses: actions/setup-go@v4
with:
go-version: '^1.20'
-
uses: actions/checkout@v3
with:
fetch-depth: 1 # we need a .git directory to run git diff
ref: ${{ github.event.pull_request.head.ref }}
-
name: "Check protobuf generated code"
run: scripts/ci/check-generated.sh
run: |
make proto-all
make run-querygen
-
name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add *.go
git add *.proto
git commit -m "Generated protofile changes" || echo "No changes to commit"
git push
47 changes: 16 additions & 31 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,26 @@ on:
pull_request:
branches:
- "**"
paths:
- "**/**/*.wasm"
- "**/**.rs"
- "**/**Cargo.toml"
- "**/**Cargo.lock"
- "**/cosmwasm/**"
- "**/wasmbinding/**"
- ".github/workflows/contracts.yml"
push:
branches:
- "main"
- "v[0-9]**"
paths:
- "**/**/*.wasm"
- "**/**.rs"
- "**/**Cargo.toml"
- "**/**Cargo.lock"
- "**/cosmwasm/**"
- "**/wasmbinding/**"
- ".github/workflows/contracts.yml"
workflow_dispatch:

concurrency:
Expand All @@ -30,13 +46,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**/*.wasm
**/**.rs
**/**Cargo.toml
**/**Cargo.lock

- name: Optimize
working-directory: ${{ matrix.contract.workdir }}
Expand All @@ -46,29 +55,25 @@ jobs:
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.12.10
if: env.GIT_DIFF
- name: 'Upload optimized contract artifact'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.contract.name }}
path: ${{ matrix.contract.workdir }}${{ matrix.contract.build }}
retention-days: 1
if: env.GIT_DIFF

- name: 'Upload Cargo.lock artifact'
uses: actions/upload-artifact@v3
with:
name: Cargo.lock
path: ${{ matrix.contract.workdir }}Cargo.lock
retention-days: 1
if: env.GIT_DIFF

# TODO: workspace optimizer compiles all contracts in the workspace, so we could just run that once
# and then check the diff of all the bytecode files
- name: Check Test Data
working-directory: ${{ matrix.contract.workdir }}
if: env.GIT_DIFF
run: >
diff "${GITHUB_WORKSPACE}/${{ matrix.contract.bytecode }}" ${{ matrix.contract.build }}
Expand All @@ -87,31 +92,20 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/bytecode/*.wasm
**/**.rs
**/**Cargo.toml
**/**Cargo.lock
- name: Install toolchain
uses: dtolnay/[email protected]
with:
target: wasm32-unknown-unknown
if: env.GIT_DIFF

- name: Add the wasm target
working-directory: ${{ matrix.contract.workdir }}
run: >
rustup target add wasm32-unknown-unknown;
if: env.GIT_DIFF
- name: Test
working-directory: ${{ matrix.contract.workdir }}
run: >
cargo test
if: env.GIT_DIFF

lints:
name: Cosmwasm Lints
Expand All @@ -123,27 +117,18 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.rs
**/**Cargo.toml
**/**Cargo.lock
- name: Install toolchain
uses: dtolnay/[email protected]
with:
components: rustfmt, clippy
if: env.GIT_DIFF

- name: Format
working-directory: ${{ matrix.workdir }}
run: >
cargo fmt --all -- --check
if: env.GIT_DIFF
- name: run cargo clippy
working-directory: ${{ matrix.workdir }}
run: >
cargo clippy -- -D warnings
if: env.GIT_DIFF
52 changes: 52 additions & 0 deletions .github/workflows/protocol-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Render and Deploy Docs

on:
workflow_dispatch:
push:
branches:
- main

jobs:

build:
name: Render and deploy protocol and API docs
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Load Rust caching
uses: astriaorg/[email protected]
- name: Load get-version action to grab version component of deployment path
uses: battila7/get-version-action@v2
id: get_version
- name: Print version component of deployment path
run: echo ${{ steps.get_version.outputs.version }}
- name: Install mdbook
run: cargo install mdbook mdbook-katex mdbook-mermaid
- name: Build protocol spec
run: cd docs/protocol && mdbook build
- name: Move protocol spec to subdirectory & Deploy
env:
DO_DOCS_PK: ${{ secrets.DO_DOCS_PK }}
DO_DOCS_IP: ${{ secrets.DO_DOCS_IP }}
run: |
cd docs/protocol
if [ -d "do-tmp" ]; then rm -rf do-tmp; fi
mkdir do-tmp
mv book do-tmp/${{ steps.get_version.outputs.version }}
tree do-tmp
which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
which rsync || ( apt-get update -y && apt-get install rsync -y )
eval $(ssh-agent -s)
ssh-add <(echo "$DO_DOCS_PK" )
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan $DO_DOCS_IP >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
cd do-tmp/main
scp -r * root@$DO_DOCS_IP:/var/www/html
2 changes: 1 addition & 1 deletion .github/workflows/required_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37.1.0
uses: tj-actions/changed-files@v37.6.1
with:
files_ignore: |
**/*.md
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,8 @@ blocks.db
tests/cl-genesis-positions/script
tests/cl-genesis-positions/*.json

# Docs
docs/protocol/book

# Release folder
dist/
dist/
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ linters:
- unconvert
- unused
- whitespace
- unparam

issues:
exclude-rules:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"OSMOSIS_E2E_SKIP_UPGRADE": "true",
"OSMOSIS_E2E_SKIP_CLEANUP": "true",
"OSMOSIS_E2E_SKIP_STATE_SYNC": "true",
"OSMOSIS_E2E_UPGRADE_VERSION": "v17",
"OSMOSIS_E2E_UPGRADE_VERSION": "v18",
"OSMOSIS_E2E_DEBUG_LOG": "false",
},
"preLaunchTask": "e2e-setup"
Expand Down
43 changes: 36 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### API breaks

* [#6071](https://github.com/osmosis-labs/osmosis/pull/6071) reduce number of returns for UpdatePosition and TicksToSqrtPrice functions
* [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module to stargate whitelist.

## v17.0.0

### API breaks

* [#6014](https://github.com/osmosis-labs/osmosis/pull/6014) refactor: reduce the number of returns in superfluid migration
* [#5983](https://github.com/osmosis-labs/osmosis/pull/5983) refactor(CL): 6 return values in CL CreatePosition with a struct
* [#6004](https://github.com/osmosis-labs/osmosis/pull/6004) reduce number of returns for creating full range position
* [#6018](https://github.com/osmosis-labs/osmosis/pull/6018) golangci: add unused parameters linter
* [#6033](https://github.com/osmosis-labs/osmosis/pull/6033) change tick API from sdk.Dec to osmomath.BigDec

### Features

* [#5072](https://github.com/osmosis-labs/osmosis/pull/5072) IBC-hooks: Add support for async acks when processing onRecvPacket

### State Breaking

* [#5532](https://github.com/osmosis-labs/osmosis/pull/5532) fix: Fix x/tokenfactory genesis import denoms reset x/bank existing denom metadata
Expand All @@ -52,27 +71,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#5874](https://github.com/osmosis-labs/osmosis/pull/5874) Remove Partial Migration from superfluid migration to CL
* [#5901](https://github.com/osmosis-labs/osmosis/pull/5901) Adding support for CW pools in ProtoRev
* [#5937](https://github.com/osmosis-labs/osmosis/pull/5937) feat: add SetScalingFactorController gov prop
* [#5949](https://github.com/osmosis-labs/osmosis/pull/5949) Add message to convert from superfluid / locks to native staking directly.
* [#5939](https://github.com/osmosis-labs/osmosis/pull/5939) Fix: Flip existing twapRecords base/quote price denoms
* [#5938](https://github.com/osmosis-labs/osmosis/pull/5938) Chore: Fix valset amino codec

### BugFix

* [#5831](https://github.com/osmosis-labs/osmosis/pull/5831) Fix superfluid_delegations query
* [#5835](https://github.com/osmosis-labs/osmosis/pull/5835) Fix println's for "amountZeroInRemainingBigDec before fee" making it into production
* [#5841] (https://github.com/osmosis-labs/osmosis/pull/5841) Fix protorev's out of gas erroring of the user's transcation.
* [#5930] (https://github.com/osmosis-labs/osmosis/pull/5930) Updating Protorev Binary Search Range Logic with CL Pools
* [#5841](https://github.com/osmosis-labs/osmosis/pull/5841) Fix protorev's out of gas erroring of the user's transcation.
* [#5930](https://github.com/osmosis-labs/osmosis/pull/5930) Updating Protorev Binary Search Range Logic with CL Pools
* [#5950](https://github.com/osmosis-labs/osmosis/pull/5950) fix: spot price for cosmwasm pool types

### Misc Improvements

* [#5534](https://github.com/osmosis-labs/osmosis/pull/5534) fix: fix the account number of x/tokenfactory module account
* [#5750](https://github.com/osmosis-labs/osmosis/pull/5750) feat: add cli commmand for converting proto structs to proto marshalled bytes
* [#5889](https://github.com/osmosis-labs/osmosis/pull/5889) provides an API for protorev to determine max amountIn that can be swapped based on max ticks willing to be traversed
* [#5849] (https://github.com/osmosis-labs/osmosis/pull/5849) CL: Lower gas for leaving a position and withdrawing rewards
* [#5849](https://github.com/osmosis-labs/osmosis/pull/5849) CL: Lower gas for leaving a position and withdrawing rewards
* [#5855](https://github.com/osmosis-labs/osmosis/pull/5855) feat(x/cosmwasmpool): Sending token_in_max_amount to the contract before running contract msg
* [#5893] (https://github.com/osmosis-labs/osmosis/pull/5893) Export createPosition method in CL so other modules can use it in testing
* [#5870] (https://github.com/osmosis-labs/osmosis/pull/5870) Remove v14/ separator in protorev rest endpoints
* [#5923] (https://github.com/osmosis-labs/osmosis/pull/5923) CL: Lower gas for initializing ticks
* [#5927] (https://github.com/osmosis-labs/osmosis/pull/5927) Add gas metering to x/tokenfactory trackBeforeSend hook
* [#5893](https://github.com/osmosis-labs/osmosis/pull/5893) Export createPosition method in CL so other modules can use it in testing
* [#5870](https://github.com/osmosis-labs/osmosis/pull/5870) Remove v14/ separator in protorev rest endpoints
* [#5923](https://github.com/osmosis-labs/osmosis/pull/5923) CL: Lower gas for initializing ticks
* [#5927](https://github.com/osmosis-labs/osmosis/pull/5927) Add gas metering to x/tokenfactory trackBeforeSend hook
* [#5890](https://github.com/osmosis-labs/osmosis/pull/5890) feat: CreateCLPool & LinkCFMMtoCL pool into one gov-prop
* [#5959](https://github.com/osmosis-labs/osmosis/pull/5959) allow testing with different chain-id's in E2E testing
* [#5964](https://github.com/osmosis-labs/osmosis/pull/5964) fix e2e test concurrency bugs
* [#5948] (https://github.com/osmosis-labs/osmosis/pull/5948) Parameterizing Pool Type Information in Protorev
* [#6001](https://github.com/osmosis-labs/osmosis/pull/6001) feat: improve set-env CLI cmd\
* [#5953] (https://github.com/osmosis-labs/osmosis/pull/5953) Supporting two pool routes in ProtoRev
* [#6012](https://github.com/osmosis-labs/osmosis/pull/6012) chore: add autocomplete to makefile
* [#6085](https://github.com/osmosis-labs/osmosis/pull/6085) (v18: feat) Volume-Split, setup gauges to split evenly

### Minor improvements & Bug Fixes

Expand Down
Loading

0 comments on commit 3083bd6

Please sign in to comment.