Skip to content

Transaction Version Update Check #82

Transaction Version Update Check

Transaction Version Update Check #82

Workflow file for this run

name: Transaction Version Update Check
on:
workflow_dispatch:
inputs:
endpoint:
description: The endpoint to the calamari or manta mainnet.
default: wss://ws.manta.systems
required: false
chain:
description: The name of the chain under test. Usually, you would pass a dev chain
default: manta-dev
required: true
env:
AWS_REGION: us-east-1
AWS_INSTANCE_TYPE: c5.2xlarge
AWS_INSTANCE_ROOT_VOLUME_SIZE: 32
AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*
AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]'
CHAIN: ${{github.event.inputs.chain}}
ENDPOINT: ${{github.event.inputs.endpoint}}
jobs:
start-checks:
timeout-minutes: 120
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [16.x]
outputs:
runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }}
aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }}
aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }}
steps:
- id: start-self-hosted-runner
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: start
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }}
aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }}
aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }}
aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }}
- uses: actions/checkout@v2
- uses: borales/actions-yarn@v3.0.0
- name: install sccache
env:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: cache cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-
- name: cache sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: /home/runner/.cache/sccache
key: sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
sccache-
- name: start sccache server
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
sudo apt remove -y '^dotnet-.*'
sudo apt remove -y '^mongodb-.*'
sudo apt remove -y '^mysql-.*'
sudo apt remove -y '^postgresql-*'
sudo apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
sudo apt autoremove -y
sudo apt clean
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install nightly-2023-03-03
rustup default nightly-2023-03-03
rustup target add wasm32-unknown-unknown
- name: Build New Binary
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: /home/runner/.cache/sccache
run: |
source ${HOME}/.cargo/env
curl -L -o $HOME/manta https://github.com/Manta-Network/Manta/releases/download/v4.4.0/manta
chmod +x $HOME/manta
ls -ahl $HOME/
- name: Fetch and chmod old release binary
run: |
curl -L -o $HOME/polkadot https://github.com/paritytech/polkadot/releases/download/v1.0.0/polkadot
chmod +x $HOME/polkadot
ls -ahl $HOME/
- name: stop sccache server
run: sccache --stop-server || true
- name: Install pm2
run: npm install -g pm2
- name: Install toml cli
run: |
cargo install toml-cli
toml --version
- uses: actions/checkout@v2
with:
repository: paritytech/zombienet
path: zombienet-tool
- name: create launch config
run: |
ls -ahl ${{ github.workspace }}/zombienet/tests
cd ${{ github.workspace }}
toml set ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml \
relaychain.default_command $HOME/polkadot > ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp1.toml
toml set ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp1.toml \
parachains[0].collators[0].command $HOME/manta > ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp2.toml
if [[ "$CHAIN" == *"manta"* ]]; then
toml set ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp2.toml \
parachains[0].id 2104 > ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp3.toml
toml set ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp3.toml \
parachains[0].chain $CHAIN > ${{ github.workspace }}/zombienet/tests/diff-metadata.toml
else
cp ${{ github.workspace }}/zombienet/tests/metadata-diff-tmp2.toml ${{ github.workspace }}/zombienet/tests/diff-metadata.toml
fi;
- name: launch testnet
run: |
cd ${{ github.workspace }}/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
--output ${{ github.workspace }}/stdout.log \
--error ${{ github.workspace }}/stderr.log \
-- spawn --provider native ${{ github.workspace }}/zombienet/tests/diff-metadata.toml
- name: Prepare output
run: |
VERSION=$($HOME/manta --version)
echo "Metadata comparison:" >> output.txt
echo "Date: $(date)" >> output.txt
echo "Target version: $VERSION" >> output.txt
echo "Chain: $CHAIN" >> output.txt
echo "----------------------------------------------------------------------" >> output.txt
- uses: actions/checkout@v2
with:
repository: polkadot-js/tools
path: tools
- name: Compare the metadata
run: |
echo $ENDPOINT
cd ${{ github.workspace }}/tools
yarn
CMD="yarn run:metadata $ENDPOINT ws://127.0.0.1:9921"
echo -e "Running:\n$CMD"
$CMD >> output.txt
sed -z -i 's/\n\n/\n/g' output.txt
cat output.txt | egrep -n -i ''
chmod +x ${{ github.workspace }}/scripts/github/extrinsic-ordering-filter.sh
SUMMARY=$(${{ github.workspace }}/scripts/github/extrinsic-ordering-filter.sh output.txt)
echo -e $SUMMARY
echo -e $SUMMARY >> output.txt
- name: Show result
run: |
cat output.txt
- name: Stop our local node
run: pkill manta
- if: always()
name: Save output as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.CHAIN }}
path: |
output.txt
stop-checks:
needs: start-checks
runs-on: ubuntu-20.04
if: ${{ always() }}
steps:
- continue-on-error: true
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: stop
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ needs.start-checks.outputs.aws-region }}
runner-label: ${{ needs.start-checks.outputs.runner-label }}
aws-instance-id: ${{ needs.start-checks.outputs.aws-instance-id }}
- name: discard stopper success/failure
run: true