previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug... my network definition file:
[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
[[relaychain.nodes]]
name = "bob"
validator = true
[[parachains]]
id = 2000
[parachains.collator]
name = "collator01"
image = "docker.io/paritypr/colander:master"
command = "adder-collator"
args = ["--parachain-id 2000"]
[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"
Now when I changed that colander image to my own parachain image:
[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
[[relaychain.nodes]]
name = "bob"
validator = true
[[parachains]]
id = 2000
cumulus_based = true
[parachains.collator]
name = "collator01"
image = "gcr.io/p-network-202104/collator:v4"
command = "target/release/parachain-collator"
[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"
And my tests:
Description: Small Network test
Network: ./z05-small-network.toml
Creds: config
# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature
# well know functions
alice: is up
bob: is up
alice: parachain 2000 is registered within 225 seconds
# logs
bob: log line matches glob "*rted #1*" within 10 seconds
bob: log line matches "Imported #[0-9]+" within 10 seconds
bob: log line matches "Imported new block." within 10 seconds
alice: parachain 2000 block height is at least 6 within 150 seconds
# Tracing
# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains ["answer-chunk-request", "answer-chunk-request"]
# metrics
alice: reports node_roles is 4
alice: reports sub_libp2p_is_major_syncing is 0
# system events
bob: system event contains "A candidate was included" within 20 seconds
alice: system event matches glob "*was backed*" within 10 seconds
Then I got this command output:
small network( Small Network test )
runningNetworkSpecPath undefined
Launching network... this can take a while.
Using provider: kubernetes
Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034
Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36
launching temp pod with image docker.io/parity/polkadot:v0.9.18
with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode > /cfg/rococo-local-plain.json && until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished
temp pod is ready!
🧹 Starting with a fresh authority set...
👤 Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY
👤 Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc
launching temp-collator pod with image gcr.io/p-network/collator:latest
with command: bash -c target/release/parachain-collator export-genesis-state > /cfg/genesis-state && target/release/parachain-collator export-genesis-wasm > /cfg/genesis-wasm && until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished
temp-collator pod is ready!
✓ Added Genesis Parachain 2000
launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18
with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode --raw > /cfg/rococo-local-raw.json && until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished
uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e
temp-1 pod is ready!
Chain name: Rococo Local Testnet
⚙ Clear Boot Nodes
launching alice pod with image docker.io/parity/polkadot:v0.9.18
with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data
uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498
uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09
alice pod is ready!
alice running
You can follow the logs of the node by running this command:
kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034
⚙ Added Boot Nodes: /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm
launching bob pod with image docker.io/parity/polkadot:v0.9.18
with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data
bob pod is ready!
bob running
You can follow the logs of the node by running this command:
kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034
All relay chain nodes spawned...
launching collator01 pod with image gcr.io/p-network/collator:latest
with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data
collator01 pod is ready!
collator01 running
You can follow the logs of the node by running this command:
kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034
Warn: Tracing collator service doesn't exist
-----------------------------------------
Network launched 🚀🚀
In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider
Node name: alice
Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer
Node prometheus link: http://127.0.0.1:43531/metrics
---
Node name: bob
Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer
Node prometheus link: http://127.0.0.1:41273/metrics
---
Parachain ID: 2000
Node name: collator01
Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer
Node prometheus link: http://127.0.0.1:41621/metrics
---
✔ alice: is up (66ms)
✔ bob: is up
2022-05-13 15:22:39 API/INIT: RPC methods not decorated: beefy_getFinalizedHead
✔ alice: parachain 2000 is registered within 225 seconds (2734ms)
✔ bob: log line matches glob "*rted #1*" within 10 seconds (76ms)
✔ bob: log line matches "Imported #[0-9]+" within 10 seconds (60ms)
✔ bob: log line matches "Imported new block." within 10 seconds (61ms)
Error:
Timeout(150), "getting desired parachain block height 6 within 150 secs".
1) alice: parachain 2000 block height is at least 6 within 150 seconds
✔ alice: reports node_roles is 4
✔ alice: reports sub_libp2p_is_major_syncing is 0
2022-05-13 15:25:11 API/INIT: RPC methods not decorated: beefy_getFinalizedHead
2) bob: system event contains "A candidate was included" within 20 seconds
2022-05-13 15:25:32 API/INIT: RPC methods not decorated: beefy_getFinalizedHead
3) alice: system event matches glob "*was backed*" within 10 seconds
Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs
Deleting network
2022-05-13 15:25:42 RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure
2022-05-13 15:25:49 RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.
2022-05-13 15:25:50 RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected
child process exited
From above you can see the
- relaychain alice node test: ok
- relaychain bob node test: ok
- parachain 2000 is registered: ok
- 3 log tests: ok
- parachain 2000 block height test: failed!!?? Why did that fail?
When I was using docker.io/paritypr/colander:master
, the block height test was successful...
Especially when I checked the collator logs via
kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034
I got:
+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ pipe=/tmp/zombiepipe
+ trap 'rm -f /tmp/zombiepipe' EXIT
+ [[ ! -p /tmp/zombiepipe ]]
+ mkfifo /tmp/zombiepipe
+ child_pid=
+ CMD=($@)
+ child_pid=8
+ ls /proc/8
+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data
+ read line
Error: Input("Error parsing spec file: missing field `relay_chain` at line 155 column 1")
Also the Polkadot.js link did not work as well
Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer
What is wrong?
My repo's docker-compose file:
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"
My Dockerfile.base:
FROM debian:latest
RUN apt update && apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential
RUN curl https://sh.rustup.rs -sSf >> install-rust.sh
RUN chmod u+x install-rust.sh
RUN ./install-rust.sh -y
RUN PATH=$PATH:$HOME/.cargo/env
SHELL ["bash", "-lc"]
RUN rustup update
RUN rustup update nightly
RUN rustup target add wasm32-unknown-unknown --toolchain nightly
CMD [ "tail", "-f", "/dev/null" ]
And my Dockerfile:
FROM gcr.io/p-network-202104/rust as builder
ARG PROFILE=release
WORKDIR /builds/collator
COPY . .
RUN . $HOME/.cargo/env && cargo build --${PROFILE}
EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944
# TODO: Make this run the CMD used in the docker-compose-collator.yaml
CMD tail -f /dev/null
Is there any argument missing in my Zombienet network definition file?