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

Add automation price pallet #4

Merged
merged 41 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
afa94b7
Patch polkadot-v1.10.0
imstar15 Aug 24, 2024
9aaeee3
Add pallet-valve
imstar15 Aug 15, 2024
aec21d8
Add pallet-xcmp-handler
imstar15 Aug 15, 2024
d2335f2
Add oak-primitives
imstar15 Aug 16, 2024
9367ac2
Add pallet-automation-time
imstar15 Aug 16, 2024
267f319
Add pallet-valve to runtime
imstar15 Aug 23, 2024
57c339d
Add common-runtime
imstar15 Aug 19, 2024
7e5e9f4
Add xcmp-handler to runtime
imstar15 Aug 24, 2024
caa57d6
Add orml_xtokens
imstar15 Aug 20, 2024
57ce5d0
Add pallet-automation-time to runtime
imstar15 Aug 24, 2024
c603493
Remove unused patch
imstar15 Aug 23, 2024
c437244
Add genesis for asset_registry, tokens
imstar15 Aug 23, 2024
cae60e8
Add native asset to chain spec
imstar15 Aug 25, 2024
73c68fb
Fix an error about sed command in my Mac OS
imstar15 Aug 25, 2024
6c4564a
Change OAK to Ava Protocol
imstar15 Aug 26, 2024
e699a01
Remove pallet-valve
imstar15 Aug 27, 2024
b294767
Fix complation for test
imstar15 Aug 27, 2024
e50d32a
Fix compliation for tests in pallet-automation-time
imstar15 Aug 28, 2024
c9c8b55
Fix complation errors for test in pallet-xcmp-handler
imstar15 Aug 29, 2024
886106d
Add test for pallet-automation-time
imstar15 Aug 29, 2024
fbe2755
Change OAK to Ava Protocol
imstar15 Aug 30, 2024
b4f3b97
Remove unused code
imstar15 Aug 30, 2024
07d6d73
Run "cargo fmt --all"
imstar15 Sep 2, 2024
e06ee0b
Run cargo clippy
imstar15 Sep 2, 2024
3044eeb
Add copyright to types.rs
imstar15 Sep 2, 2024
ba6b00a
Add try-runtime, runtime-benchmarks, std features for packages
imstar15 Sep 3, 2024
47e7ab0
Run toml-maid
imstar15 Sep 3, 2024
becd2b5
Disable coverage_report
imstar15 Sep 3, 2024
83b9592
Disable dancebox,stagenet_dancebox,dancebox chopsticks-upgrade-test
imstar15 Sep 3, 2024
5f2f1f0
Change docker account in release.yml
imstar15 Sep 4, 2024
d69e221
Change get-sha endpoint
imstar15 Sep 4, 2024
e0aa52f
Change simple runtime spec version to 801
imstar15 Sep 7, 2024
a63d55a
Remove parachain 2001 in test_tanssi_parathreads.ts
imstar15 Sep 7, 2024
410bb8e
Fix tanssi-node path in zombie_simple_template_upgrade test
imstar15 Sep 7, 2024
d37da2f
Dsiable frontier_template zombienet-test-upgrade-containers test
imstar15 Sep 7, 2024
0b9dd08
Disable zombienet-test-upgrade action
imstar15 Sep 7, 2024
47cf4f7
Add pallet-automation-price
imstar15 Aug 30, 2024
688debf
Add pallet-automation-price to runtime
imstar15 Sep 7, 2024
9feb305
Run cargo clippy
imstar15 Sep 7, 2024
13c7bd5
Update copyright
imstar15 Sep 7, 2024
162d0f9
Run cargo fmt --all
imstar15 Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
echo "git_target_branch=$(echo ${GITHUB_BASE_REF})" >> $GITHUB_OUTPUT
echo "git_ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
echo "coverage_dir=tanssi-coverage/pulls/${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "coverage_report=true" >> $GITHUB_OUTPUT
# echo "coverage_report=true" >> $GITHUB_OUTPUT
echo "coverage_report=false" >> $GITHUB_OUTPUT
else
echo "git_branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "git_target_branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -157,22 +158,22 @@ jobs:
with:
name: coverage
path: coverage
- name: Upload coverage s3
if: ${{(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }}
uses: mario-sangar/upload-s3-action@master
id: S3
with:
aws_key_id: ${{ secrets.S3_COVERAGE_ID }}
aws_secret_access_key: ${{ secrets.S3_COVERAGE_KEY }}
aws_bucket: ${{ vars.S3_COVERAGE_BUCKET }}
destination_dir: "${{ needs.set-tags.outputs.coverage_dir }}"
source_dir: "coverage"
acl: "none"
- name: Link To Report
if: ${{(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }}
run: |
echo "${{steps.S3.outputs.object_key}}"
echo "${{ vars.S3_BUCKET_URL }}/${{steps.S3.outputs.object_key}}/html/index.html"
# - name: Upload coverage s3
# if: ${{(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }}
# uses: mario-sangar/upload-s3-action@master
# id: S3
# with:
# aws_key_id: ${{ secrets.S3_COVERAGE_ID }}
# aws_secret_access_key: ${{ secrets.S3_COVERAGE_KEY }}
# aws_bucket: ${{ vars.S3_COVERAGE_BUCKET }}
# destination_dir: "${{ needs.set-tags.outputs.coverage_dir }}"
# source_dir: "coverage"
# acl: "none"
# - name: Link To Report
# if: ${{(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }}
# run: |
# echo "${{steps.S3.outputs.object_key}}"
# echo "${{ vars.S3_BUCKET_URL }}/${{steps.S3.outputs.object_key}}/html/index.html"

- name: Create coverage report comment
if: ${{ (needs.set-tags.outputs.coverage_report == 'true') && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }}
Expand Down
172 changes: 86 additions & 86 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
echo "sha=$(git log -1 --format='%H')" >> $GITHUB_OUTPUT
echo "sha8=$(git log -1 --format='%H' | cut -c1-8)" >> $GITHUB_OUTPUT

ENDPOINT="https://api.github.com/repos/moondance-labs/tanssi/git/refs/tags/${{ steps.get-latest-rt.outputs.latest_rt }}"
ENDPOINT="https://api.github.com/repos/AvaProtocol/tanssi-integration/git/refs/tags/${{ steps.get-latest-rt.outputs.latest_rt }}"
RESPONSE=$(curl -s -H "Accept: application/vnd.github.v3+json" $ENDPOINT)
TYPE=$(echo $RESPONSE | jq -r '.object.type')

Expand All @@ -72,7 +72,7 @@ jobs:
id: check-docker-image
run: |
TAG=sha-${{ steps.get-sha.outputs.sha8 }}
echo "image_exists=$(docker image inspect moondancelabs/tanssi:$TAG > /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT
echo "image_exists=$(docker image inspect avaprotocol/tanssi:$TAG > /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT

- name: Display variables
run: |
Expand Down Expand Up @@ -574,9 +574,9 @@ jobs:
fail-fast: false
matrix:
chains: [
{ chain: "stagenet_dancebox", runtime: "dancebox" },
{ chain: "flashbox", runtime: "flashbox" },
{ chain: "dancebox", runtime: "dancebox" },
# { chain: "stagenet_dancebox", runtime: "dancebox" },
# { chain: "flashbox", runtime: "flashbox" },
# { chain: "dancebox", runtime: "dancebox" },
{ chain: "frontier_template", runtime: "container-chain-template-frontier" },
]
env:
Expand Down Expand Up @@ -609,85 +609,85 @@ jobs:
pnpm install
pnpm moonwall test chopsticks_${{ matrix.chains.chain }}_upgrade

zombienet-test-upgrade:
runs-on: self-hosted
needs: ["set-tags", "build"]
strategy:
fail-fast: false
matrix:
chain: ["dancebox"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.set-tags.outputs.git_ref }}

- name: Pnpm
uses: pnpm/action-setup@v3.0.0
with:
version: 8

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"

- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
mkdir -p test/tmp
- name: "Download binaries"
uses: actions/download-artifact@v4
with:
name: binaries
path: target/release

- name: "Download branch built runtime"
uses: actions/download-artifact@v4
with:
name: runtimes
path: target/release/wbuild/${{ matrix.chain }}-runtime/

- name: Retrieve tanssi binary from docker (for plainSpec generation)
run: |
TANSSI_COMMIT=${{ needs.set-tags.outputs.latest_rt_sha8 }}
DOCKER_TAG="moondancelabs/tanssi:sha-$TANSSI_COMMIT"

docker rm -f tanssi_container 2> /dev/null | true
docker create --name tanssi_container $DOCKER_TAG bash
docker cp tanssi_container:tanssi/tanssi-node test/tmp/tanssi_rt
docker rm -f tanssi_container

- name: "Run zombie upgrade test"
run: |
chmod uog+x target/release/tanssi-node

cd test

pnpm install

chmod uog+x tmp/tanssi_rt
tmp/tanssi_rt build-spec --chain ${{ matrix.chain }}-local > tmp/${{ matrix.chain }}-plain-spec.json
pnpm tsx scripts/modify-plain-specs.ts process tmp/${{ matrix.chain }}-plain-spec.json tmp/${{ matrix.chain }}-modified-spec.json
tmp/tanssi_rt build-spec --chain tmp/${{ matrix.chain }}-modified-spec.json --raw > tmp/${{ matrix.chain }}-raw-spec.json

## Run tests

pnpm moonwall test zombie_${{ matrix.chain }}_upgrade
- name: Zip and Upload Node Logs on Failure
if: failure()
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
export NODE_LOGS_ZIP="node_logs_$TIMESTAMP.zip"
MOST_RECENT_ZOMBIE_DIR=$(ls -td /tmp/zombie-* | head -n 1)
find $MOST_RECENT_ZOMBIE_DIR -maxdepth 1 -type f -name '*.log' -exec zip -r $NODE_LOGS_ZIP {} \;
echo "NODE_LOGS_ZIP=${NODE_LOGS_ZIP}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failed-node-logs
path: ${{ env.NODE_LOGS_ZIP }}
# zombienet-test-upgrade:
# runs-on: self-hosted
# needs: ["set-tags", "build"]
# strategy:
# fail-fast: false
# matrix:
# chain: ["dancebox"]
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: ${{ needs.set-tags.outputs.git_ref }}

# - name: Pnpm
# uses: pnpm/action-setup@v3.0.0
# with:
# version: 8

# - name: Setup node
# uses: actions/setup-node@v4
# with:
# node-version: 20.x
# cache: "pnpm"

# - name: Create local folders
# run: |
# mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
# mkdir -p test/tmp
# - name: "Download binaries"
# uses: actions/download-artifact@v4
# with:
# name: binaries
# path: target/release

# - name: "Download branch built runtime"
# uses: actions/download-artifact@v4
# with:
# name: runtimes
# path: target/release/wbuild/${{ matrix.chain }}-runtime/

# - name: Retrieve tanssi binary from docker (for plainSpec generation)
# run: |
# TANSSI_COMMIT=${{ needs.set-tags.outputs.latest_rt_sha8 }}
# DOCKER_TAG="avaprotocol/tanssi:sha-$TANSSI_COMMIT"

# docker rm -f tanssi_container 2> /dev/null | true
# docker create --name tanssi_container $DOCKER_TAG bash
# docker cp tanssi_container:tanssi/tanssi-node test/tmp/tanssi_rt
# docker rm -f tanssi_container

# - name: "Run zombie upgrade test"
# run: |
# chmod uog+x target/release/tanssi-node

# cd test

# pnpm install

# chmod uog+x tmp/tanssi_rt
# tmp/tanssi_rt build-spec --chain ${{ matrix.chain }}-local > tmp/${{ matrix.chain }}-plain-spec.json
# pnpm tsx scripts/modify-plain-specs.ts process tmp/${{ matrix.chain }}-plain-spec.json tmp/${{ matrix.chain }}-modified-spec.json
# tmp/tanssi_rt build-spec --chain tmp/${{ matrix.chain }}-modified-spec.json --raw > tmp/${{ matrix.chain }}-raw-spec.json

# ## Run tests

# pnpm moonwall test zombie_${{ matrix.chain }}_upgrade
# - name: Zip and Upload Node Logs on Failure
# if: failure()
# run: |
# TIMESTAMP=$(date +%Y%m%d%H%M%S)
# export NODE_LOGS_ZIP="node_logs_$TIMESTAMP.zip"
# MOST_RECENT_ZOMBIE_DIR=$(ls -td /tmp/zombie-* | head -n 1)
# find $MOST_RECENT_ZOMBIE_DIR -maxdepth 1 -type f -name '*.log' -exec zip -r $NODE_LOGS_ZIP {} \;
# echo "NODE_LOGS_ZIP=${NODE_LOGS_ZIP}" >> $GITHUB_ENV
# - uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: failed-node-logs
# path: ${{ env.NODE_LOGS_ZIP }}

zombienet-test-upgrade-containers:
runs-on: self-hosted
Expand All @@ -696,7 +696,7 @@ jobs:
fail-fast: false
matrix:
chains: [
{ chain: "frontier_template", runtime: "container-chain-template-frontier" },
# { chain: "frontier_template", runtime: "container-chain-template-frontier" },
{ chain: "simple_template", runtime: "container-chain-template-simple" },
]
steps:
Expand Down Expand Up @@ -757,7 +757,7 @@ jobs:
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=moondancelabs/${{matrix.image}}
DOCKER_IMAGE=avaprotocol/${{matrix.image}}
TAGS="${DOCKER_IMAGE}:sha-${{ needs.set-tags.outputs.sha8 }}"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
Expand Down
Loading
Loading