zombienet
zombienet copied to clipboard
cant build raw spec when chain_spec_path provided to relay chain
Issue Description
When I pass chain-spec as a file for relaychain it cannot build the raw one. For some reason zombienet generates command for building raw spec as ./bin --raw > path
instead of ./bin build-spec --chain chain_spec_path --raw > path
Config:
[settings]
provider = "native"
[relaychain]
default_command = "/home/alex/projects/polkadot-bins/polkadot180/polkadot"
chain_spec_path = "/home/alex/projects/curio-parachain/artifacts/xcm-test-ksm-112-polkadot-180/kusama-local.json"
default_substrate_cli_args_version = 3
[[relaychain.nodes]]
name = "alice"
validator = true
ws_port = 9911
[[relaychain.nodes]]
name = "bob"
validator = true
ws_port = 9921
[[relaychain.nodes]]
name = "charlie"
validator = true
ws_port = 9931
[[relaychain.nodes]]
name = "eve"
validator = true
ws_port = 9941
[[parachains]]
id = 2000
chain_spec_path = "/home/alex/projects/curio-parachain/artifacts/xcm-test-ksm-112-polkadot-180/spec-2000.json"
add_to_genesis = true
cumulus_based = true
onboard_as_parachain = true
[parachains.collator]
name = "collator-2000"
command = "/home/alex/projects/curio-parachain/artifacts/xcm-test-ksm-112-polkadot-180/node"
ws_port = 9811
[[parachains]]
id = 2001
chain_spec_path = "/home/alex/projects/curio-parachain/artifacts/xcm-test-ksm-112-polkadot-180/spec-2001.json"
add_to_genesis = true
cumulus_based = true
onboard_as_parachain = true
[parachains.collator]
name = "collator-2001"
command = "/home/alex/projects/curio-parachain/artifacts/xcm-test-ksm-112-polkadot-180/node"
ws_port = 9821
[[parachains]]
id = 1000
chain_spec_path = "/home/alex/projects/curio-parachain/artifacts/xcm-test-ksm-112-polkadot-180/asset-hub-kusama-local.json"
add_to_genesis = true
cumulus_based = true
onboard_as_parachain = true
[parachains.collator]
name = "asset-hub"
command = "/home/alex/projects/polkadot-bins/polkadot180/polkadot-parachain"
ws_port = 9831
Steps to reproduce the issue
Steps to reproduce the issue
- define
chain_spec_path
for relaychain
Describe the results you received
Error: Command failed with exit code 2: bash -c /home/alex/projects/polkadot-bins/polkadot180/polkadot --raw > /tmp/zombie-622174faed5b4410853a77a829bba377_-417822-wEg6dkq1myNG/rococo-local-raw.json error: unexpected argument '--raw' found
Describe the results you expected
Running network
Zombienet version
1.3.94
Provider
Native
Provider version
## For binaries
polkadot 1.8.0
polkadot-parachain 1.8.0
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response
Screenshots
No response
Hi @alexxxkny, sorry about the delay. This is a bug and I will fix asap. Thx!
There's a similar issue when chain_spec_command
command is used for the relay chain, that causes genesis customizations to be discarded. I think they are directly related and touch the same code paths, so I'm commenting about it here.
Steps to reproduce:
- Specify a
chain_spec_command
that generates a human-readable JSON spec. For example using chain-spec-generator:
chain_spec_command = "chain-spec-generator polkadot-local"
- Specify other genesis customizations such as parachains to onboard.
- Run zombienet
- Zombienet will correctly add genesis customizations to the human-readable spec. however, when producing the final raw spec, it will then discard those customizations by calling
chain-spec-generator polkadot-local --raw
Proposed solution:
Rather generate the raw spec by invoking the node binary as follows:
${command} --chain polkadot-local.spec.json --raw
Hi @alexxxkny, sorry about the delay. Fixed here and will be part of the next release. Thx!