I have tested the Zombienet example network definition and feature files with default images. How can I test my custom parachain?
I have an existing docker-compose yaml file
version: "3.2"
services:
collator:
container_name: collator
image: pnetwork/collator
ports:
- "30343:30343"
- "40333:40333"
- "6969:6969"
- "8844:8844"
- "9977:9977"
command: bash -c "apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 > collator.out 2>&1; tail -f /dev/null"
depends_on:
- charlie-relay
alice-relay:
container_name: alice-relay
image: pnetwork/relay
ports:
- "30333:30333"
- "9944:9944"
command: bash -c "apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe > alice.out 2>&1; tail -f /dev/null"
bob-relay:
container_name: bob-relay
image: pnetwork/relay
ports:
- "30334:30334"
- "9945:9945"
command: bash -c "apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe > bob.out 2>&1; tail -f /dev/null"
charlie-relay:
container_name: charlie-relay
image: pnetwork/relay
ports:
- "30335:30335"
- "9946:9946"
command: bash -c "apt-get install -y wget; nohup ./target/release/polkadot --charlie --validator --base-path /tmp/relay/charlie --chain rococo-custom-2-raw.json --port 30335 --ws-port 9946 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe > charlie.out 2>&1; tail -f /dev/null"
frontend:
container_name: frontend
image: jacogr/polkadot-js-apps:latest
ports:
- "80:80"
depends_on:
- collator
From the example 0001-small-network.toml file, I keep default_command and default_args the same, but override them in each relay chain node via commandWithArgs
Then I copied alice relay chain node command from above and pasted them into my 0001-small-network.toml as
[[relaychain.nodes]]
name = "alice"
validator = true
commandWithArgs = 'bash -c... "..." '
But how about alice node's ports from the docker-compose yaml file? the copied command has ports in it...
About parachain collator, I copied its command from the docker-compose yaml file. but how about the ports again? My parachain command has port values in it, too...
[relaychain]
default_image = "docker.io/parity/polkadot:v0.9.18"
default_command = "polkadot"
default_args = [ "-lparachain=debug" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "alice"
validator = true
commandWithArgs = 'bash -c "apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe > alice.out 2>&1; tail -f /dev/null"'
[[relaychain.nodes]]
name = "bob"
validator = true
commandWithArgs = 'bash -c "apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe > bob.out 2>&1; tail -f /dev/null"'
[[parachains]]
id = 100
[parachains.collator]
name = "collator01"
image = "..."
command = 'bash -c "apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 > collator.out 2>&1; tail -f /dev/null"'
[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"
Is that the correct way to do it? Thank you