paritytech / zombienet

A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them.
https://paritytech.github.io/zombienet/
GNU General Public License v3.0
162 stars 91 forks source link

API initialization is failed in Parachain #278

Closed sirius651 closed 1 year ago

sirius651 commented 2 years ago

Hi, I tried to connect relay-parachain between Kusama and Shiden. But it seems the node is not running. here's the config.

[relaychain]
default_image = "docker.io/paritypr/polkadot-debug:master"
default_command = "polkadot"
default_args = [ "-lparachain=debug" ]
chain = "kusama-local"

  [[relaychain.nodes]]
  name = "alice"
  validator = true

  [[relaychain.nodes]]
  name = "bob"
  validator = true

[[parachains]]
id = 2007
chain = "shiden-dev"

  [[parachains.collator]]
  name = "collator1"
  image = "docker.io/staketechnologies/astar-collator:latest"
  command = "astar-collator"
  args = ["-lparachain=debug”, “--force-authoring”, “--execution=wasm"]

and run the script.

I can see the message as 'Network launched'. and when I browse to Node direct link for Kusama-local, it works well. but when I browse for Parachain-collator (astar), initializing connection is long pending. it seems not running on Parachain properly.

here's the debug log for parachain

launching collator pod with image paritypr/colander:4131-e5c7e975
         with command: /cfg/zombie-wrapper.sh adder-collator --chain /cfg/kusama-local.json --name collator --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --no-mdns --node-key 53cf10627db4ce8abcddad56fc510cdfc58bfe587b0cbb6772f1f0727266e565 --no-telemetry --parachain-id 2007 --bootnodes /ip4/10.1.1.46/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data

any miss thing or idea to resolve this?

pepoviola commented 2 years ago

Hi @sirius651, the toml config for the collator should use single [] and also add the cumulus_based flag. Can you try with this?

[relaychain]
default_image = "docker.io/paritypr/polkadot-debug:master"
default_command = "polkadot"
default_args = [ "-lparachain=debug" ]
chain = "kusama-local"

  [[relaychain.nodes]]
  name = "alice"
  validator = true

  [[relaychain.nodes]]
  name = "bob"
  validator = true

[[parachains]]
id = 2007
chain = "shiden-dev"
cumulus_based = true

  [parachains.collator]
  name = "collator1"
  image = "docker.io/staketechnologies/astar-collator:latest"
  command = "astar-collator"
  args = ["-lparachain=debug”, “--force-authoring”, “--execution=wasm"]

Let me know if doesn't works. Thanks!

sirius651 commented 2 years ago

Hi, @pepoviola thanks for quick answer. but when I tried to test above, no responding from collator.

Error: Timeout(300) for pod : temp-1
pepoviola commented 2 years ago

Hi, @pepoviola thanks for quick answer. but when I tried to test above, no responding from collator.

Error: Timeout(300) for pod : temp-1

Hi @sirius651, sorry about the delay. I checked this issue and the pod is failing to start because we wrap the command to start the pod using bash -c

bash -c astar-collator build-spec --chain shiden-dev --disable-default-bootnode > /cfg/kusama-local-plain.json && until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished

But the astar-collator doesn't have bash since bin/sbin are removed in the image(https://github.com/AstarNetwork/Astar/blob/master/third-party/docker/Dockerfile#L23).

I will try to work on this to support running the pods without wrapping the command.

Thanks!

pepoviola commented 1 year ago

Hi @sirius651, this is already fixed in the latest versions. I will close here, please re-open if needed. Thanks for your feedback!