From 75c7aa6926409aece59ea19a47b86d92ce8e70a4 Mon Sep 17 00:00:00 2001 From: Valery Gantchev Date: Fri, 30 Aug 2024 14:33:24 +0200 Subject: [PATCH] Update zombienet config --- README.md | 11 ++ rococo-local/3parachains.json | 88 -------------- rococo-local/basilisk-karura.json | 168 --------------------------- rococo-local/basilisk-kintsugi.json | 83 ------------- rococo-local/basilisk-moonriver.json | 159 ------------------------- rococo-local/check-versions.js | 8 -- rococo-local/config-zombienet.json | 53 --------- rococo-local/config.json | 62 ---------- rococo-local/single-config.json | 57 --------- zombienet/local.json | 65 +++++++++++ 10 files changed, 76 insertions(+), 678 deletions(-) delete mode 100644 rococo-local/3parachains.json delete mode 100644 rococo-local/basilisk-karura.json delete mode 100644 rococo-local/basilisk-kintsugi.json delete mode 100644 rococo-local/basilisk-moonriver.json delete mode 100644 rococo-local/check-versions.js delete mode 100644 rococo-local/config-zombienet.json delete mode 100644 rococo-local/config.json delete mode 100644 rococo-local/single-config.json create mode 100644 zombienet/local.json diff --git a/README.md b/README.md index 9e261dc9e59..15ddf4668e7 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,17 @@ make build ## Run +### Local Testnet with Zombienet +Prerequisites: +* Relay chain repository (polkadot) has to be built in `../polkadot` +* Grab `zombienet` utility used to start network from [releases](https://github.com/paritytech/zombienet/releases) + + +``` +cd ./zombienet +zombienet spawn local.json +``` + ### Local Testnet Relay chain repository [Polkadot](https://github.com/paritytech/polkadot) has to be built in `../polkadot` sibling directory diff --git a/rococo-local/3parachains.json b/rococo-local/3parachains.json deleted file mode 100644 index 3dde2a098f2..00000000000 --- a/rococo-local/3parachains.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "relaychain": { - "bin": "../../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444 - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555 - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666 - }, - { - "name": "dave", - "wsPort": 9977, - "port": 30777 - } - ], - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - }, - "parachains": [ - { - "bin": "../target/release/basilisk", - "chain":"local", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9988, - "port": 31200, - "flags": ["--alice","--", "--execution=wasm"] - }, - { - "wsPort": 9999, - "port": 31300, - "flags": ["--bob","--", "--execution=wasm"] - } - ] - }, - { - "bin": "../../cumulus/target/release/polkadot-collator", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9980, - "port": 31199, - "flags": ["--alice","--", "--execution=wasm"] - }, - { - "wsPort": 9981, - "port": 31299, - "flags": ["--bob","--", "--execution=wasm"] - } - ] - }, - { - "bin": "../../statemint/target/release/statemint", - "chain": "statemint-dev", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9970, - "port": 31198, - "flags": ["--alice", "--force-authoring", "--", "--execution=wasm"] - } - ] - } - ], - "hrmpChannels": [], - "types": { - "Address": "MultiAddress", - "LookupSource": "MultiAddress" - } -} diff --git a/rococo-local/basilisk-karura.json b/rococo-local/basilisk-karura.json deleted file mode 100644 index b0a4d290333..00000000000 --- a/rococo-local/basilisk-karura.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "relaychain": { - "bin": "../../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "dave", - "wsPort": 9967, - "port": 30667, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "ferdie", - "wsPort": 9968, - "port": 30668, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "eve", - "wsPort": 9969, - "port": 30669, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "one", - "wsPort": 9970, - "port": 30670, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "two", - "wsPort": 9971, - "port": 30671, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "simpleParachains": [], - "parachains": [ - { - "bin": "../target/release/basilisk", - "chain":"local", - "nodes": [ - { - "wsPort": 9988, - "port": 31200, - "name": "alice", - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all", - "--", - "--execution=wasm" - ] - }, - { - "wsPort": 9977, - "port": 31201, - "name": "bob", - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "bin": "../../Acala/target/release/acala", - "chain": "karura-dev", - "nodes": [ - { - "wsPort": 9999, - "port": 31300, - "name": "alice", - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all", - "--", - "--execution=wasm" - ] - } - ] - } - ], - "hrmpChannels": [ - { - "sender": 2090, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 1024 - }, - { - "sender": 2000, - "recipient": 2090, - "maxCapacity": 8, - "maxMessageSize": 1024 - } - ], - "types": {}, - "finalization": false -} - diff --git a/rococo-local/basilisk-kintsugi.json b/rococo-local/basilisk-kintsugi.json deleted file mode 100644 index cc10d0a26b7..00000000000 --- a/rococo-local/basilisk-kintsugi.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "relaychain": { - "bin": "/usr/local/bin/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444 - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555 - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666 - }, - { - "name": "dave", - "wsPort": 9977, - "port": 30777 - } - ], - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - }, - "simpleParachains": [], - "parachains": [ - { - "bin": "/usr/local/bin/testing-basilisk", - "chain":"local", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9988, - "port": 31200, - "flags": ["--alice", "--rpc-cors=all", "--runtime=testing", "--", "--execution=wasm"] - }, - { - "wsPort": 9989, - "port": 31201, - "flags": ["--bob", "--rpc-cors=all", "--runtime=testing", "--", "--execution=wasm"] - } - ] - }, - { - "bin": "/usr/local/bin/interbtc-parachain", - "chain": "rococo-local-2000", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9999, - "port": 31202, - "flags": ["--alice", "--rpc-port=9980", "--", "--execution=wasm"] - } - ] - } - ], - "hrmpChannels": [ - { - "sender": 2090, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 1024 - }, - { - "sender": 2000, - "recipient": 2090, - "maxCapacity": 8, - "maxMessageSize": 1024 - } - ], - "types": {} -} diff --git a/rococo-local/basilisk-moonriver.json b/rococo-local/basilisk-moonriver.json deleted file mode 100644 index a659f6b0175..00000000000 --- a/rococo-local/basilisk-moonriver.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "relaychain": { - "bin": "../../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "dave", - "wsPort": 9967, - "port": 30667, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "ferdie", - "wsPort": 9968, - "port": 30668, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "eve", - "wsPort": 9969, - "port": 30669, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "one", - "wsPort": 9970, - "port": 30670, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - }, - { - "name": "two", - "wsPort": 9971, - "port": 30671, - "flags": [ - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "simpleParachains": [], - "parachains": [ - { - "bin": "../target/release/basilisk", - "chain":"local", - "nodes": [ - { - "wsPort": 9988, - "port": 31200, - "name": "alice", - "flags": [ - "--log=debug", - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all", - "--", - "--execution=wasm" - ] - }, - { - "wsPort": 9977, - "port": 31201, - "name": "bob", - "flags": [ - "--log=debug", - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "bin": "../moonbeam/target/release/moonbeam", - "chain": "moonriver-local", - "nodes": [ - { - "wsPort": 9999, - "port": 31300, - "name": "alice", - "flags": [ - "--log=debug", - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--rpc-cors=all", - "--", - "--execution=wasm" - ] - } - ] - } - ], - "hrmpChannels": [ - ], - "types": {}, - "finalization": false -} - diff --git a/rococo-local/check-versions.js b/rococo-local/check-versions.js deleted file mode 100644 index eaa1aef5a56..00000000000 --- a/rococo-local/check-versions.js +++ /dev/null @@ -1,8 +0,0 @@ -const { exec } = require("child_process"); -const config = require("./" + (process.argv[2] !== undefined ? process.argv[2] : "config.json")); - -[config.relaychain.bin, ...config.parachains.map(p => p.bin)].forEach(checkVersion); - -function checkVersion(bin) { - exec(`${bin} --version`, (e, out) => console.log(out.trim())); -} diff --git a/rococo-local/config-zombienet.json b/rococo-local/config-zombienet.json deleted file mode 100644 index bfe22ce08c3..00000000000 --- a/rococo-local/config-zombienet.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "settings": { - "provider": "native" - }, - "relaychain": { - "default_command": "../../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "ws_port": 9944, - "invulnerable": true - }, - { - "name": "bob", - "ws_port": 9955, - "invulnerable": true - }, - { - "name": "charlie", - "ws_port": 9966, - "invulnerable": true - }, - { - "name": "dave", - "ws_port": 9977, - "invulnerable": true - } - ] - }, - "types": {}, - "hrmp_channels": [], - "parachains": [ - { - "id": 2090, - "cumulus_based": true, - "chain": "local", - "collators": [ - { - "name": "alice", - "command": "../target/release/basilisk", - "ws_port": 9988, - "rpc_port": 9999 - }, - { - "name": "bob", - "command": "../target/release/basilisk", - "ws_port": 9989 - } - ] - } - ] -} diff --git a/rococo-local/config.json b/rococo-local/config.json deleted file mode 100644 index 07f15b1a779..00000000000 --- a/rococo-local/config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "relaychain": { - "bin": "../../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444 - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555 - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666 - }, - { - "name": "dave", - "wsPort": 9977, - "port": 30777 - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "configuration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 10 - } - } - } - } - } - }, - "simpleParachains": [], - "parachains": [ - { - "bin": "../target/release/basilisk", - "chain":"local", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9988, - "port": 31200, - "flags": ["--alice", "--rpc-cors=all", "--", "--execution=wasm"] - }, - { - "wsPort": 9989, - "port": 31201, - "flags": ["--bob", "--rpc-cors=all", "--", "--execution=wasm"] - } - ] - } - ], - "hrmpChannels": [], - "types": {} -} diff --git a/rococo-local/single-config.json b/rococo-local/single-config.json deleted file mode 100644 index 70a625d5c5d..00000000000 --- a/rococo-local/single-config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "relaychain": { - "bin": "../../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9944, - "port": 30444 - }, - { - "name": "bob", - "wsPort": 9955, - "port": 30555 - }, - { - "name": "charlie", - "wsPort": 9966, - "port": 30666 - }, - { - "name": "dave", - "wsPort": 9977, - "port": 30777 - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "configuration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 10 - } - } - } - } - } - }, - "simpleParachains": [], - "parachains": [ - { - "bin": "../target/release/testing-basilisk", - "chain":"local", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9988, - "port": 31200, - "flags": ["--alice", "--rpc-cors=all", "--runtime=testing", "--", "--execution=wasm"] - } - ] - } - ], - "hrmpChannels": [], - "types": {} -} diff --git a/zombienet/local.json b/zombienet/local.json new file mode 100644 index 00000000000..7b9c6218567 --- /dev/null +++ b/zombienet/local.json @@ -0,0 +1,65 @@ +{ + "settings": { + "timeout": 1000, + "provider": "native" + }, + "relaychain": { + "default_command": "../../polkadot/target/release/polkadot", + "chain": "rococo-local", + "default_args": [ + "--no-hardware-benchmarks", + "-lparachain=debug", + "--database=paritydb" + ], + "nodes": [ + { + "name": "alice", + "ws_port": 9944, + "validator": true + }, + { + "name": "bob", + "ws_port": 9955, + "validator": true + } + ] + }, + "parachains": [ + { + "id": 2090, + "chain": "local", + "collators": [ + { + "name": "alice", + "command": "../target/release/basilisk", + "ws_port": 9988, + "rpc_port": 9999, + "args": [ + "--no-hardware-benchmarks", + "--force-authoring", + "-lparachain=debug", + "--database=paritydb" + ] + }, + { + "name": "bob", + "command": "../target/release/basilisk", + "ws_port": 9989, + "args": [ + "--no-hardware-benchmarks", + "--force-authoring", + "-lparachain=debug", + "--database=paritydb" + ] + } + ] + } + ], + "types": { + "Header": { + "number": "u64", + "parent_hash": "Hash", + "post_state": "Hash" + } + } +}