Skip to content

Commit

Permalink
Add zombie upgrade tests containers (#560)
Browse files Browse the repository at this point in the history
* add possibility of running upgrade tests against containers with zombieç

* add jobs to release

* fmt

* lint

* fix

* download binearies

* fixç

* fix

* fixes

* hopefully last fix
  • Loading branch information
girazoki authored Jun 5, 2024
1 parent 16d60b7 commit 4c664c5
Show file tree
Hide file tree
Showing 12 changed files with 500 additions and 29 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,53 @@ jobs:
name: failed-node-logs
path: ${{ env.NODE_LOGS_ZIP }}

zombienet-test-upgrade-containers:
runs-on: self-hosted
needs: ["set-tags", "build"]
strategy:
matrix:
chains: [
{ chain: "frontier_template", runtime: "container-chain-template-frontier" },
{ chain: "simple_template", runtime: "container-chain-template-simple" },
]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.set-tags.outputs.git_ref }}

- name: Pnpm
uses: pnpm/[email protected]
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.chains.runtime }}-runtime/
mkdir -p test/tmp
- name: "Download binaries"
uses: actions/download-artifact@v4
with:
name: binaries
path: target/release
- name: "Download runtime"
uses: actions/download-artifact@v4
with:
name: runtimes
path: target/release/wbuild/${{ matrix.chains.runtime }}-runtime/

- name: "Install and run upgrade test"
run: |
cd test
pnpm install
pnpm moonwall test zombie_${{ matrix.chains.chain }}_upgrade
docker-tanssi:
runs-on: ubuntu-latest
needs: ["set-tags", "build"]
Expand Down
6 changes: 3 additions & 3 deletions test/configs/zombieTanssiKeepDb.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"parachains": [
{
"id": 1000,
"chain_spec_path": "specs/warp-sync-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-warp-sync.sh`",
"chain_spec_path": "specs/single-container-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-single-container.sh`",
"collators": [
{
"name": "FullNode-1000",
Expand Down Expand Up @@ -89,7 +89,7 @@
},
{
"id": 2000,
"chain_spec_path": "specs/warp-sync-template-container-2000.json",
"chain_spec_path": "specs/single-container-template-container-2000.json",
"collators": [
{
"name": "FullNode-2000",
Expand Down
6 changes: 3 additions & 3 deletions test/configs/zombieTanssiMetrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"parachains": [
{
"id": 1000,
"chain_spec_path": "specs/warp-sync-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-warp-sync.sh`",
"chain_spec_path": "specs/single-container-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-single-container.sh`",
"collators": [
{
"name": "FullNode-1000",
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"id": 2000,
"chain_spec_path": "specs/warp-sync-template-container-2000.json",
"chain_spec_path": "specs/single-container-template-container-2000.json",
"collators": [
{
"name": "FullNode-2000",
Expand Down
6 changes: 3 additions & 3 deletions test/configs/zombieTanssiWarpSync.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"parachains": [
{
"id": 1000,
"chain_spec_path": "specs/warp-sync-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-warp-sync.sh`",
"chain_spec_path": "specs/single-container-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-single-container.sh`",
"collators": [
{
"name": "FullNode-1000",
Expand Down Expand Up @@ -76,7 +76,7 @@
},
{
"id": 2000,
"chain_spec_path": "specs/warp-sync-template-container-2000.json",
"chain_spec_path": "specs/single-container-template-container-2000.json",
"collators": [
{
"name": "FullNode-2000",
Expand Down
101 changes: 101 additions & 0 deletions test/configs/zombieTemplateUpgradeFrontier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"settings": {
"timeout": 1000,
"provider": "native"
},
"relaychain": {
"chain": "rococo-local",
"default_command": "tmp/polkadot",
"default_args": ["--no-hardware-benchmarks", "-lparachain=debug", "--database=paritydb", "--no-beefy"],
"genesis": {
"runtimeGenesis": {
"patch": {
"configuration": {
"config": {
"async_backing_params": {
"allowed_ancestry_len": 2,
"max_candidate_depth": 3
},
"scheduling_lookahead": 2
}
}
}
}
},
"nodes": [
{
"name": "alice",
"ws_port": "9947",
"validator": true
},
{
"name": "bob",
"validator": true
},
{
"name": "charlie",
"validator": true
},
{
"name": "dave",
"validator": true
}
]
},
"parachains": [
{
"id": 1000,
"chain_spec_path": "specs/single-container-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec.sh`",
"collators": [
{
"name": "Collator1000-01",
"ws_port": "9948",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator1000-02",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator2000-01",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator2000-02",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator1000-03",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
}
]
},
{
"id": 2000,
"chain_spec_path": "specs/single-container-template-container-2000.json",
"collators": [
{
"name": "FullNode-2000",
"validator": false,
"command": "../target/release/container-chain-frontier-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"],
"ws_port": 9949,
"p2p_port": 33049
}
]
}
],
"types": {
"Header": {
"number": "u64",
"parent_hash": "Hash",
"post_state": "Hash"
}
}
}
101 changes: 101 additions & 0 deletions test/configs/zombieTemplateUpgradeSimple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"settings": {
"timeout": 1000,
"provider": "native"
},
"relaychain": {
"chain": "rococo-local",
"default_command": "tmp/polkadot",
"default_args": ["--no-hardware-benchmarks", "-lparachain=debug", "--database=paritydb", "--no-beefy"],
"genesis": {
"runtimeGenesis": {
"patch": {
"configuration": {
"config": {
"async_backing_params": {
"allowed_ancestry_len": 2,
"max_candidate_depth": 3
},
"scheduling_lookahead": 2
}
}
}
}
},
"nodes": [
{
"name": "alice",
"ws_port": "9947",
"validator": true
},
{
"name": "bob",
"validator": true
},
{
"name": "charlie",
"validator": true
},
{
"name": "dave",
"validator": true
}
]
},
"parachains": [
{
"id": 1000,
"chain_spec_path": "specs/single-container-tanssi-1000.json",
"COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec.sh`",
"collators": [
{
"name": "Collator1000-01",
"ws_port": "9948",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator1000-02",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator2000-01",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator2000-02",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
},
{
"name": "Collator1000-03",
"command": "../target/release/tanssi-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"]
}
]
},
{
"id": 2000,
"chain_spec_path": "specs/single-container-template-container-2000.json",
"collators": [
{
"name": "FullNode-2000",
"validator": false,
"command": "../target/release/container-chain-simple-node",
"args": ["--no-hardware-benchmarks", "--database=paritydb", "--wasmtime-precompiled=wasm"],
"ws_port": 9949,
"p2p_port": 33049
}
]
}
],
"types": {
"Header": {
"number": "u64",
"parent_hash": "Hash",
"post_state": "Hash"
}
}
}
Loading

0 comments on commit 4c664c5

Please sign in to comment.