Skip to content

Commit

Permalink
Enable metadata hash verification (#1344)
Browse files Browse the repository at this point in the history
* [no ci]Enable metadata hash verification

Signed-off-by: Jamie <djptux@gmail.com>

* [no ci]Add feature metadata-hash to runtimes

Signed-off-by: Jamie <djptux@gmail.com>

* update deps

Signed-off-by: Charles Ferrell <charlie@manta.network>

* use KMA for token

Signed-off-by: Charles Ferrell <charlie@manta.network>

* Use zombienet binary for testing

Signed-off-by: Jamie <djptux@gmail.com>

* Fix ci

Signed-off-by: Jamie <djptux@gmail.com>

* Fix ci

Signed-off-by: Jamie <djptux@gmail.com>

* Fix ci

Signed-off-by: Jamie <djptux@gmail.com>

* ci

Signed-off-by: Charles Ferrell <charlie@manta.network>

* update node version

Signed-off-by: Charles Ferrell <charlie@manta.network>

* mkdir -p

Signed-off-by: Charles Ferrell <charlie@manta.network>

* use zombienet

Signed-off-by: Charles Ferrell <charlie@manta.network>

* use latest polkadot.js deps

Signed-off-by: Charles Ferrell <charlie@manta.network>

* manual nonce managment

Signed-off-by: Charles Ferrell <charlie@manta.network>

* nonce management

Signed-off-by: Charles Ferrell <charlie@manta.network>

* use rpc nonce

Signed-off-by: Charles Ferrell <charlie@manta.network>

---------

Signed-off-by: Jamie <djptux@gmail.com>
Signed-off-by: Charles Ferrell <charlie@manta.network>
Co-authored-by: Charles Ferrell <charlie@manta.network>
  • Loading branch information
Dengjianping and ferrell-code authored Jun 28, 2024
1 parent 95e5e27 commit 7491ac0
Show file tree
Hide file tree
Showing 15 changed files with 2,508 additions and 1,583 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/integration_test_calamari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
POLKADOT_BINARY: https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.7.0/polkadot
POLKADOT_EXECUTE: https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.7.0/polkadot-execute-worker
POLKADOT_PREPARE: https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.7.0/polkadot-prepare-worker
ZOMBIENET_BINARY: https://github.com/paritytech/zombienet/releases/download/v1.3.106/zombienet-linux-x64
jobs:
print-rust-versions:
if: contains(github.event.pull_request.labels.*.name, 'A-calamari')
Expand All @@ -39,7 +40,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 18.12.x
- name: install sccache
env:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
Expand Down Expand Up @@ -202,10 +203,15 @@ jobs:
with:
name: ${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-launch-config.json
path: /home/runner/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-launch-config.json
- uses: actions/checkout@v2
with:
repository: paritytech/zombienet
path: zombienet-tool
- name: fetch and chmod zombienet
shell: bash
run: |
cd $GITHUB_WORKSPACE
mkdir -p ./zombienet-tool
curl -L -o $GITHUB_WORKSPACE/zombienet-tool/zombienet ${{ env.ZOMBIENET_BINARY }}
cd $GITHUB_WORKSPACE/zombienet-tool
chmod +x zombienet
./zombienet version
- uses: actions/checkout@v2
with:
repository: Manta-Network/Dev-Tools
Expand All @@ -222,11 +228,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/zombienet-tool
git pull && git checkout v1.3.92
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
pm2 start ./zombienet --name zombienet \
--output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \
--error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \
-- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml
Expand Down Expand Up @@ -315,8 +317,8 @@ jobs:
- if: always()
name: test - calamari alice peered successfully
run: |
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
node packages/cli/dist/cli.js -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl
cd $GITHUB_WORKSPACE/zombienet-tool/
./zombienet -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl
- name: append manta-pay storage
shell: bash
run: |
Expand All @@ -337,10 +339,8 @@ jobs:
- name: launch testnet
shell: bash
run: |
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
cd $GITHUB_WORKSPACE/zombienet-tool/
pm2 start ./zombienet --name zombienet \
--output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \
--error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \
-- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml
Expand All @@ -363,10 +363,8 @@ jobs:
- name: launch testnet
shell: bash
run: |
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
cd $GITHUB_WORKSPACE/zombienet-tool
pm2 start ./zombienet --name zombienet \
--output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \
--error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \
-- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/integration_test_manta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
POLKADOT_BINARY: https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.7.0/polkadot
POLKADOT_EXECUTE: https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.7.0/polkadot-execute-worker
POLKADOT_PREPARE: https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.7.0/polkadot-prepare-worker
ZOMBIENET_BINARY: https://github.com/paritytech/zombienet/releases/download/v1.3.106/zombienet-linux-x64
jobs:
print-rust-versions:
if: contains(github.event.pull_request.labels.*.name, 'A-manta')
Expand Down Expand Up @@ -112,7 +113,7 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 18.12.x
- run: |
mkdir -p $HOME/.local/share/calamari-pc
mkdir -p $HOME/.local/bin
Expand Down Expand Up @@ -217,10 +218,15 @@ jobs:
with:
name: ${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-launch-config.json
path: /home/runner/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-launch-config.json
- uses: actions/checkout@v2
with:
repository: paritytech/zombienet
path: zombienet-tool
- name: fetch and chmod zombienet
shell: bash
run: |
cd $GITHUB_WORKSPACE
mkdir -p ./zombienet-tool
curl -L -o $GITHUB_WORKSPACE/zombienet-tool/zombienet ${{ env.ZOMBIENET_BINARY }}
cd $GITHUB_WORKSPACE/zombienet-tool
chmod +x zombienet
./zombienet version
- uses: actions/checkout@v2
with:
repository: Manta-Network/Dev-Tools
Expand All @@ -237,11 +243,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/zombienet-tool
git pull && git checkout v1.3.92
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
pm2 start ./zombienet --name zombienet \
--output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \
--error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \
-- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml
Expand Down Expand Up @@ -280,7 +282,7 @@ jobs:
- name: test - manta alice peered successfully
shell: bash
run: |
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
cd $GITHUB_WORKSPACE/zombienet-tool
sed -i 's/2084/2104/g' $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl
$HOME/dasel put -t string -v $HOME/.local/bin/polkadot -r toml \
-f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \
Expand Down Expand Up @@ -308,7 +310,7 @@ jobs:
'.parachains.[0].id'
cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml
cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl
node packages/cli/dist/cli.js -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl
./zombienet -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl
- if: always()
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -342,10 +344,8 @@ jobs:
- name: launch testnet
shell: bash
run: |
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
cd $GITHUB_WORKSPACE/zombienet-tool
pm2 start ./zombienet --name zombienet \
--output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \
--error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \
-- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/metadata_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
CHAIN: ${{github.event.inputs.chain}}
ENDPOINT: ${{github.event.inputs.endpoint}}
DEBIAN_FRONTEND: noninteractive
ZOMBIENET_BINARY: https://github.com/paritytech/zombienet/releases/download/v1.3.106/zombienet-linux-x64
jobs:
update-checks:
timeout-minutes: 120
Expand Down Expand Up @@ -91,10 +92,15 @@ jobs:
curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel
mv ./dasel $HOME/.cargo/bin/dasel
dasel --version
- uses: actions/checkout@v2
with:
repository: paritytech/zombienet
path: zombienet-tool
- name: fetch and chmod zombienet
shell: bash
run: |
cd $GITHUB_WORKSPACE
mkdir zombienet-tool
curl -L -o $GITHUB_WORKSPACE/zombienet-tool/zombienet ${{ env.ZOMBIENET_BINARY }}
cd $GITHUB_WORKSPACE/zombienet-tool
chmod +x zombienet
./zombienet version
- name: create launch config
run: |
ls -ahl $GITHUB_WORKSPACE/zombienet/tests
Expand All @@ -117,11 +123,7 @@ jobs:
- name: launch testnet
run: |
cd $GITHUB_WORKSPACE/zombienet-tool
git pull && git checkout v1.3.89
cd $GITHUB_WORKSPACE/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
pm2 start ./zombienet --name zombienet \
--output $GITHUB_WORKSPACE/stdout.log \
--error $GITHUB_WORKSPACE/stderr.log \
-- spawn --provider native $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/runtime_upgrade_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
RUNTIME_SPEC: ${{github.event.inputs.runtime}}-local
POLKADOT_BINARY: ${{github.event.inputs.polkadot_url}}
MANTA_BINARY: ${{github.event.inputs.manta_base_url}}
ZOMBIENET_BINARY: https://github.com/paritytech/zombienet/releases/download/v1.3.106/zombienet-linux-x64
jobs:
build-runtimes:
timeout-minutes: 120
Expand Down Expand Up @@ -135,10 +136,15 @@ jobs:
'.parachains.[0].chain'
fi;
cat ${{ github.workspace }}/zombienet/tests/0002-runtime-upgrade.toml
- uses: actions/checkout@v2
with:
repository: paritytech/zombienet
path: zombienet-tool
- name: fetch and chmod zombienet
shell: bash
run: |
cd $GITHUB_WORKSPACE
mkdir zombienet-tool
curl -L -o $GITHUB_WORKSPACE/zombienet-tool/zombienet ${{ env.ZOMBIENET_BINARY }}
cd $GITHUB_WORKSPACE/zombienet-tool
chmod +x zombienet
./zombienet version
- uses: actions/checkout@v2
with:
repository: Manta-Network/Dev-Tools
Expand All @@ -148,11 +154,7 @@ jobs:
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git
cd ${{ github.workspace }}/zombienet-tool
git pull && git checkout v1.3.89
cd ${{ github.workspace }}/zombienet-tool/javascript
yarn
npm run build
pm2 start packages/cli/dist/cli.js --name zombienet \
pm2 start ./zombienet --name zombienet \
--output ${{ github.workspace }}/zombienet-for-${{ env.RUNTIME_SPEC }}-stdout.log \
--error ${{ github.workspace }}/zombienet-for-${{ env.RUNTIME_SPEC }}-stderr.log \
-- spawn --provider native ${{ github.workspace }}/zombienet/tests/0002-runtime-upgrade.toml
Expand Down
Loading

0 comments on commit 7491ac0

Please sign in to comment.