Skip to content

Commit

Permalink
Add zombienet tests for parathread slotFrequency
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk committed Feb 8, 2024
1 parent 9e8200e commit 8d504b7
Show file tree
Hide file tree
Showing 4 changed files with 542 additions and 0 deletions.
105 changes: 105 additions & 0 deletions test/configs/zombieTanssiParathreads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"settings": {
"timeout": 1000,
"provider": "native"
},
"relaychain": {
"chain": "rococo-local",
"default_command": "tmp/polkadot",
"default_args": ["--no-hardware-benchmarks", "-lparachain=debug", "--database=paritydb", "--no-beefy"],
"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/parathreads-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-parathreads.sh`",
"collators": [
{
"name": "Collator-01",
"ws_port": "9948",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-02",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-03",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-04",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-05",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-06",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-07",
"command": "../target/release/tanssi-node"
},
{
"name": "Collator-08",
"command": "../target/release/tanssi-node"
}
]
},
{
"id": 2000,
"chain_spec_path": "specs/parathreads-template-container-2000.json",
"collators": [
{
"name": "FullNode-2000",
"validator": false,
"command": "../target/release/container-chain-template-simple-node",
"ws_port": 9949,
"p2p_port": 33049
}
]
},
{
"id": 2001,
"chain_spec_path": "specs/parathreads-template-container-2001.json",
"collators": [
{
"name": "FullNode-2001",
"validator": false,
"command": "../target/release/container-chain-template-frontier-node",
"ws_port": 9950,
"p2p_port": 33050
}
]
}
],
"types": {
"Header": {
"number": "u64",
"parent_hash": "Hash",
"post_state": "Hash"
}
}
}
45 changes: 45 additions & 0 deletions test/moonwall.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,51 @@
}
]
},
{
"name": "zombie_tanssi_parathreads",
"timeout": 600000,
"testFileDir": ["suites/parathreads"],
"runScripts": ["build-spec-parathreads.sh", "download-polkadot.sh"],
"foundation": {
"type": "zombie",
"zombieSpec": {
"configPath": "./configs/zombieTanssiParathreads.json",
"skipBlockCheck": ["Container2000", "Container2001"]
}
},
"connections": [
{
"name": "Relay",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9947"]
},
{
"name": "Tanssi",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9948"]
},
{
"name": "Container2000",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9949"]
},
{
"name": "Container2001",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9950"]
},
{
"name": "ethers",
"type": "ethers",
"endpoints": ["ws://127.0.0.1:9950"]
},
{
"name": "w3",
"type": "web3",
"endpoints": ["ws://127.0.0.1:9950"]
}
]
},
{
"name": "zombie_tanssi_rotation",
"testFileDir": ["suites/rotation-para"],
Expand Down
13 changes: 13 additions & 0 deletions test/scripts/build-spec-parathreads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Exit on any error
set -e

# Always run the commands from the "test" dir
cd $(dirname $0)/..

mkdir -p specs
../target/release/container-chain-template-simple-node build-spec --disable-default-bootnode --add-bootnode "/ip4/127.0.0.1/tcp/33049/ws/p2p/12D3KooWHVMhQDHBpj9vQmssgyfspYecgV6e3hH1dQVDUkUbCYC9" --parachain-id 2000 --raw > specs/parathreads-template-container-2000.json
../target/release/container-chain-template-frontier-node build-spec --disable-default-bootnode --add-bootnode "/ip4/127.0.0.1/tcp/33050/ws/p2p/12D3KooWFGaw1rxB6MSuN3ucuBm7hMq5pBFJbEoqTyth4cG483Cc" --parachain-id 2001 --raw > specs/parathreads-template-container-2001.json
# TODO: add parathreads to genesis when supported by pallet_registrar
../target/release/tanssi-node build-spec --chain dancebox-local --parachain-id 1000 --invulnerable "Collator-01" --invulnerable "Collator-02" --invulnerable "Collator-03" --invulnerable "Collator-04" --invulnerable "Collator-05" --invulnerable "Collator-06" --invulnerable "Collator-07" --invulnerable "Collator-08" > specs/parathreads-tanssi-1000.json
Loading

0 comments on commit 8d504b7

Please sign in to comment.