Skip to content

Commit

Permalink
Merge branch 'main' into stack/fix-twap
Browse files Browse the repository at this point in the history
  • Loading branch information
stackman27 authored Aug 7, 2023
2 parents 8709c4a + e1552a3 commit 169850f
Show file tree
Hide file tree
Showing 86 changed files with 2,794 additions and 602 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
env:
GO_VERSION: '1.20.5'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: osmosisd-${{ matrix.targetos }}-${{ matrix.arch }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# changed, because generated code can change in response to toolchain updates
# even if no files in the repository are modified.
name: Check generated code

on:
workflow_dispatch:
pull_request:
Expand All @@ -13,6 +14,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check-proto:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check-state-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ env:
LCD_ENDPOINT: https://lcd.osmosis.zone
DELTA_HALT_HEIGHT: 50

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
compare_versions:
# Compare current mainnet osmosis major version with the major version of github branch
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Cosmwasm Contracts

on:
pull_request:
branches:
Expand All @@ -9,6 +10,9 @@ on:
- "v[0-9]**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
Expand Down
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/buildjet-rust-cache@v2.5.1
- 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/push-dev-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
branches:
- main
- v[0-9]+.x

env:
RUNNER_BASE_IMAGE_ALPINE: alpine:3.17
OSMOSIS_DEV_IMAGE_REPOSITORY: osmolabs/osmosis-dev
Expand Down
99 changes: 46 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ on:
workflow_dispatch:

env:
GO_VERSION: '1.20.5'
GO_VERSION: "1.20.5"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
get_diff:
runs-on: ubuntu-latest
steps:
-
name: Check out repository code
- name: Check out repository code
uses: actions/checkout@v3
-
name: Get git diff
- name: Get git diff
uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
Expand All @@ -41,37 +43,29 @@ jobs:
if: needs.get_diff.outputs.git_diff
runs-on: ubuntu-latest
steps:
-
name: Check out repository code
- name: Check out repository code
uses: actions/checkout@v3
-
name: 🐿 Setup Golang
- name: 🐿 Setup Golang
uses: actions/setup-go@v4
with:
go-version: ${{env.GO_VERSION}}
-
name: Create a file with all core Cosmos SDK pkgs
- name: Create a file with all core Cosmos SDK pkgs
run: go list ./... ./osmomath/... ./osmoutils/... ./x/ibc-hooks/... ./x/epochs | grep -E -v 'tests/simulator|e2e' > pkgs.txt
-
name: Split pkgs into 4 files
- name: Split pkgs into 4 files
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
-
uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-00"
path: ./pkgs.txt.part.00
-
uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-01"
path: ./pkgs.txt.part.01
-
uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-02"
path: ./pkgs.txt.part.02
-
uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-03"
path: ./pkgs.txt.part.03
Expand All @@ -85,23 +79,18 @@ jobs:
matrix:
part: ["00", "01", "02", "03"]
steps:
-
name: Check out repository code
- name: Check out repository code
uses: actions/checkout@v3
-
name: 🐿 Setup Golang
- name: 🐿 Setup Golang
uses: actions/setup-go@v4
with:
go-version: ${{env.GO_VERSION}}
-
name: Display go version
- name: Display go version
run: go version
-
uses: actions/download-artifact@v3
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
-
name: Test & coverage report creation
- name: Test & coverage report creation
run: |
VERSION=$(echo $(git describe --tags) | sed 's/^v//') || VERSION=${GITHUB_SHA}
TESTS=$(cat pkgs.txt.part.${{ matrix.part }})
Expand All @@ -111,59 +100,63 @@ jobs:
e2e:
needs: get_diff
if: needs.get_diff.outputs.git_diff
runs-on: ubuntu-latest
runs-on: self-hosted
timeout-minutes: 25
steps:
-
name: Check out repository code
- name: Clean up Pre-Existing E2E Docker containers
run: |
# Remove containers with names starting with "osmo-test-"
docker ps -aqf "name=osmo-test-*" | xargs -r docker rm -f
# Remove containers with names starting with "hermes-relayer"
docker ps -aqf "name=hermes-relayer*" | xargs -r docker rm -f
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: 🐿 Setup Golang
- name: 🐿 Setup Golang
uses: actions/setup-go@v4
with:
go-version: ${{env.GO_VERSION}}
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build e2e image
- name: Build e2e image
uses: docker/build-push-action@v4
with:
load: true
context: .
tags: osmosis:debug
# Use experimental Cache backend API:
# Use experimental Cache backend API:
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMG_TAG=debug
-
name: Test e2e and Upgrade
- name: Test e2e and Upgrade
run: make test-e2e-ci
-
name: Dump docker logs on failure
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: "./logs"
-
name: Tar logs
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
-
name: Upload logs to GitHub
- name: Upload logs to GitHub
uses: actions/upload-artifact@v3
with:
name: logs.tgz
path: ./logs.tgz
if: failure()
-
name: 🧹 Clean up Osmosis Home
- name: 🧹 Clean up Osmosis Home
if: always()
run: rm -rf $HOME/.osmosisd/ || true
- name: Clean up E2E Docker containers
run: |
# Remove containers with names starting with "osmo-test-"
docker ps -aqf "name=osmo-test-*" | xargs -r docker rm -f
# Remove containers with names starting with "hermes-relayer"
docker ps -aqf "name=hermes-relayer*" | xargs -r docker rm -f
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/
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#5883](https://github.com/osmosis-labs/osmosis/pull/5883) feat: Uninitialize empty ticks
* [#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
* [#5937](https://github.com/osmosis-labs/osmosis/pull/5937) feat: add SetScalingFactorController gov prop
* [#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

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Sikka Research Pte. Ltd.
Copyright 2021 Osmosis Foundation Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ run-querygen:
###############################################################################

PACKAGES_UNIT=$(shell go list ./... ./osmomath/... ./osmoutils/... ./x/ibc-hooks/... ./x/epochs | grep -E -v 'tests/simulator|e2e')
PACKAGES_E2E=$(shell go list ./... | grep '/e2e')
PACKAGES_E2E := $(shell go list ./... | grep '/e2e' | awk -F'/e2e' '{print $$1 "/e2e"}' | uniq)
PACKAGES_SIM=$(shell go list ./... | grep '/tests/simulator')
TEST_PACKAGES=./...

Expand Down
2 changes: 1 addition & 1 deletion app/apptesting/cosmwasmpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *KeeperTestHelper) PrepareCosmWasmPool() cosmwasmpooltypes.CosmWasmExten
return s.PrepareCustomTransmuterPool(s.TestAccs[0], []string{DefaultTransmuterDenomA, DefaultTransmuterDenomB})
}

// PrepareCustomConcentratedPool sets up a concentrated liquidity pool with the custom parameters.
// PrepareCustomTransmuterPool sets up a transmuter pool with the custom parameters.
func (s *KeeperTestHelper) PrepareCustomTransmuterPool(owner sdk.AccAddress, denoms []string) cosmwasmpooltypes.CosmWasmExtension {
// Mint some assets to the account.
s.FundAcc(s.TestAccs[0], DefaultAcctFunds)
Expand Down
Loading

0 comments on commit 169850f

Please sign in to comment.