From 77f431bc6633428fe59a7f33abbcf4f315ba98eb Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Tue, 7 Jul 2026 15:37:58 +0100 Subject: [PATCH 01/16] Remove deprecated build-spec CLI subcommand. Migrate callers to export-chain-spec and drop BuildSpecCmd from sc-cli. --- cumulus/README.md | 2 +- cumulus/polkadot-omni-node/lib/src/cli.rs | 16 ---- cumulus/polkadot-omni-node/lib/src/command.rs | 5 - .../scripts/create_bridge_hub_westend_spec.sh | 4 +- .../scripts/create_coretime_westend_spec.sh | 4 +- cumulus/scripts/create_glutton_spec.sh | 4 +- cumulus/scripts/create_people_westend_spec.sh | 4 +- cumulus/scripts/create_seedling_spec.sh | 4 +- cumulus/scripts/create_shell_spec.sh | 4 +- cumulus/test/service/src/cli.rs | 7 -- cumulus/test/service/src/main.rs | 6 -- .../full_node_warp_sync/generate-snapshots.sh | 2 +- docs/sdk/src/polkadot_sdk/mod.rs | 4 +- docs/sdk/src/reference_docs/cli.rs | 10 +- polkadot/cli/src/cli.rs | 8 -- polkadot/cli/src/command.rs | 5 - substrate/bin/node/cli/src/cli.rs | 8 -- substrate/bin/node/cli/src/command.rs | 5 - ...ec_works.rs => export_chain_spec_works.rs} | 12 +-- .../utils/chain-spec-builder/README.docify.md | 2 +- .../bin/utils/chain-spec-builder/README.md | 2 +- .../client/cli/src/commands/build_spec_cmd.rs | 91 ------------------- .../cli/src/commands/export_chain_spec_cmd.rs | 7 -- substrate/client/cli/src/commands/mod.rs | 3 +- .../client/cli/src/params/shared_params.rs | 2 +- .../frame/revive/dev-node/node/src/cli.rs | 7 +- .../frame/revive/dev-node/node/src/command.rs | 4 - substrate/frame/transaction-storage/README.md | 4 +- .../tests/zombie_ci/block_building.rs | 2 +- templates/minimal/node/src/cli.rs | 7 -- templates/minimal/node/src/command.rs | 5 - templates/parachain/node/src/cli.rs | 10 +- templates/parachain/node/src/command.rs | 5 - templates/solochain/node/src/cli.rs | 7 -- templates/solochain/node/src/command.rs | 5 - 35 files changed, 31 insertions(+), 246 deletions(-) rename substrate/bin/node/cli/tests/{build_spec_works.rs => export_chain_spec_works.rs} (74%) delete mode 100644 substrate/client/cli/src/commands/build_spec_cmd.rs diff --git a/cumulus/README.md b/cumulus/README.md index 17bdc3d2e072..d39842a4ee18 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -123,7 +123,7 @@ git clone https://github.com/paritytech/polkadot-sdk cargo build --release -p polkadot # Generate a raw chain spec -./target/release/polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > rococo-local-cfde.json +./target/release/polkadot export-chain-spec --chain rococo-local --raw > rococo-local-cfde.json # Alice ./target/release/polkadot --chain rococo-local-cfde.json --alice --tmp diff --git a/cumulus/polkadot-omni-node/lib/src/cli.rs b/cumulus/polkadot-omni-node/lib/src/cli.rs index 3a35a496620d..315b0a8c274f 100644 --- a/cumulus/polkadot-omni-node/lib/src/cli.rs +++ b/cumulus/polkadot-omni-node/lib/src/cli.rs @@ -79,22 +79,6 @@ pub enum Subcommand { #[command(subcommand)] Key(sc_cli::KeySubcommand), - /// Build a chain specification. - /// - /// The `build-spec` command relies on the chain specification built (hard-coded) into the node - /// binary, and may utilize the genesis presets of the runtimes also embedded in the nodes - /// that support this command. Since `polkadot-omni-node` does not contain any embedded - /// runtime, and requires a `chain-spec` path to be passed to its `--chain` flag, the command - /// isn't bringing significant value as it does for other node binaries (e.g. the - /// `polkadot` binary). - /// - /// For a more versatile `chain-spec` manipulation experience please check out the - /// `polkadot-omni-node chain-spec-builder` subcommand. - #[deprecated( - note = "build-spec will be removed after 1/06/2025. Use chain-spec-builder instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Validate blocks. CheckBlock(sc_cli::CheckBlockCmd), diff --git a/cumulus/polkadot-omni-node/lib/src/command.rs b/cumulus/polkadot-omni-node/lib/src/command.rs index 0b2ccfb75958..cadc4e89d632 100644 --- a/cumulus/polkadot-omni-node/lib/src/command.rs +++ b/cumulus/polkadot-omni-node/lib/src/command.rs @@ -144,12 +144,7 @@ where Cli::::from_arg_matches(&matches).map_err(|e| sc_cli::Error::Cli(e.into()))?; cli.chain_spec_loader = Some(cmd_config.chain_spec_loader); - #[allow(deprecated)] match &cli.subcommand { - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { diff --git a/cumulus/scripts/create_bridge_hub_westend_spec.sh b/cumulus/scripts/create_bridge_hub_westend_spec.sh index 31dafda25e7a..ef573f088c96 100755 --- a/cumulus/scripts/create_bridge_hub_westend_spec.sh +++ b/cumulus/scripts/create_bridge_hub_westend_spec.sh @@ -26,7 +26,7 @@ echo "Generating chain spec for runtime: $rt_path and para_id: $para_id" binary="./target/release/polkadot-parachain" # build the chain spec we'll manipulate -$binary build-spec --chain bridge-hub-kusama-dev > chain-spec-plain.json +$binary export-chain-spec --chain bridge-hub-kusama-dev > chain-spec-plain.json # convert runtime to hex cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > rt-hex.txt @@ -89,7 +89,7 @@ cat chain-spec-plain.json | jq --rawfile code rt-hex.txt '.genesis.runtime.syste > edited-chain-spec-plain.json # build a raw spec -$binary build-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json +$binary export-chain-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json cp edited-chain-spec-plain.json bridge-hub-westend-spec.json cp chain-spec-raw.json ./parachains/chain-specs/bridge-hub-westend.json cp chain-spec-raw.json bridge-hub-westend-spec-raw.json diff --git a/cumulus/scripts/create_coretime_westend_spec.sh b/cumulus/scripts/create_coretime_westend_spec.sh index 516dc06ac666..9f5eda86bab2 100755 --- a/cumulus/scripts/create_coretime_westend_spec.sh +++ b/cumulus/scripts/create_coretime_westend_spec.sh @@ -26,7 +26,7 @@ echo "Generating chain spec for runtime: $rt_path and para_id: $para_id" binary="./target/release/polkadot-parachain" # build the chain spec we'll manipulate -$binary build-spec --chain coretime-westend-dev > chain-spec-plain.json +$binary export-chain-spec --chain coretime-westend-dev > chain-spec-plain.json # convert runtime to hex cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > rt-hex.txt @@ -68,7 +68,7 @@ cat chain-spec-plain.json | jq --rawfile code rt-hex.txt '.genesis.runtimeGenesi > edited-chain-spec-plain.json # build a raw spec -$binary build-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json +$binary export-chain-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json cp edited-chain-spec-plain.json coretime-westend-spec.json cp chain-spec-raw.json ./cumulus/parachains/chain-specs/coretime-westend.json cp chain-spec-raw.json coretime-westend-spec-raw.json diff --git a/cumulus/scripts/create_glutton_spec.sh b/cumulus/scripts/create_glutton_spec.sh index 78aafda3bd08..855feb6f0524 100755 --- a/cumulus/scripts/create_glutton_spec.sh +++ b/cumulus/scripts/create_glutton_spec.sh @@ -55,7 +55,7 @@ for (( para_id=$from_para_id; para_id<=$to_para_id; para_id++ )); do fi # build the chain spec we'll manipulate - $binary_path build-spec --disable-default-bootnode --chain "glutton-westend-genesis-$para_id" > "$output_para_dir/plain-glutton-$relay_chain-$para_id-spec.json" + $binary_path export-chain-spec --chain "glutton-westend-genesis-$para_id" > "$output_para_dir/plain-glutton-$relay_chain-$para_id-spec.json" id="glutton-$relay_chain-$para_id" protocol_id="glutton-$relay_chain-$para_id" @@ -74,7 +74,7 @@ for (( para_id=$from_para_id; para_id<=$to_para_id; para_id++ )); do > $output_para_dir/glutton-$relay_chain-$para_id-spec.json # build a raw spec - $binary_path build-spec --disable-default-bootnode --chain "$output_para_dir/glutton-$relay_chain-$para_id-spec.json" --raw > "$output_para_dir/glutton-$relay_chain-$para_id-raw-spec.json" + $binary_path export-chain-spec --chain "$output_para_dir/glutton-$relay_chain-$para_id-spec.json" --raw > "$output_para_dir/glutton-$relay_chain-$para_id-raw-spec.json" # build genesis data $binary_path export-genesis-state --chain "$output_para_dir/glutton-$relay_chain-$para_id-raw-spec.json" > "$output_para_dir/glutton-$relay_chain-$para_id-head-data" diff --git a/cumulus/scripts/create_people_westend_spec.sh b/cumulus/scripts/create_people_westend_spec.sh index f9c3694d61e3..e7f014f514e3 100755 --- a/cumulus/scripts/create_people_westend_spec.sh +++ b/cumulus/scripts/create_people_westend_spec.sh @@ -26,7 +26,7 @@ echo "Generating chain spec for runtime: $rt_path and para_id: $para_id" binary="./target/release/polkadot-parachain" # build the chain spec we'll manipulate -$binary build-spec --chain people-westend-local > chain-spec-plain.json +$binary export-chain-spec --chain people-westend-local > chain-spec-plain.json # convert runtime to hex cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > rt-hex.txt @@ -93,7 +93,7 @@ cat chain-spec-plain.json | jq --rawfile code rt-hex.txt '.genesis.runtimeGenesi > edited-chain-spec-plain.json # build a raw spec -$binary build-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json +$binary export-chain-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json cp edited-chain-spec-plain.json people-westend-spec.json cp chain-spec-raw.json ./cumulus/parachains/chain-specs/people-westend.json cp chain-spec-raw.json people-westend-spec-raw.json diff --git a/cumulus/scripts/create_seedling_spec.sh b/cumulus/scripts/create_seedling_spec.sh index a4ac0b2ab528..f0362c85ca68 100755 --- a/cumulus/scripts/create_seedling_spec.sh +++ b/cumulus/scripts/create_seedling_spec.sh @@ -29,7 +29,7 @@ sudo=$8 binary="./target/release/polkadot-parachain" # build the chain spec we'll manipulate -$binary build-spec --disable-default-bootnode --chain seedling > seedling-spec-plain.json +$binary export-chain-spec --chain seedling > seedling-spec-plain.json # convert runtime to hex cat $runtime_path | od -A n -v -t x1 | tr -d ' \n' > seedling-hex.txt @@ -47,7 +47,7 @@ cat seedling-spec-plain.json | jq --rawfile code seedling-hex.txt '.genesis.runt > edited-seedling-plain.json # build a raw spec -$binary build-spec --disable-default-bootnode --chain edited-seedling-plain.json --raw > seedling-spec-raw.json +$binary export-chain-spec --chain edited-seedling-plain.json --raw > seedling-spec-raw.json # build genesis data $binary export-genesis-state --parachain-id=$para_id --chain seedling-spec-raw.json > seedling-head-data diff --git a/cumulus/scripts/create_shell_spec.sh b/cumulus/scripts/create_shell_spec.sh index 6d6675044dba..5173fa95ec03 100755 --- a/cumulus/scripts/create_shell_spec.sh +++ b/cumulus/scripts/create_shell_spec.sh @@ -13,7 +13,7 @@ rt_path=$1 binary="./target/release/polkadot-parachain" # build the chain spec we'll manipulate -$binary build-spec --chain shell > shell-spec-plain.json +$binary export-chain-spec --chain shell > shell-spec-plain.json # convert runtime to hex cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > shell-hex.txt @@ -28,7 +28,7 @@ cat shell-spec-plain.json | jq --rawfile code shell-hex.txt '.genesis.runtime.sy > edited-shell-plain.json # build a raw spec -$binary build-spec --chain edited-shell-plain.json --raw > shell-spec-raw.json +$binary export-chain-spec --chain edited-shell-plain.json --raw > shell-spec-raw.json # build genesis data $binary export-genesis-state --parachain-id=1000 --chain shell-spec-raw.json > shell-head-data diff --git a/cumulus/test/service/src/cli.rs b/cumulus/test/service/src/cli.rs index 3f930c7a61fb..15c6bd9b7536 100644 --- a/cumulus/test/service/src/cli.rs +++ b/cumulus/test/service/src/cli.rs @@ -83,13 +83,6 @@ impl Display for AuthoringPolicy { #[derive(Debug, clap::Subcommand)] pub enum Subcommand { /// Build a chain specification. - /// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec` - /// command instead. - #[deprecated( - note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/cumulus/test/service/src/main.rs b/cumulus/test/service/src/main.rs index 58b48502a793..a2e38ef6a017 100644 --- a/cumulus/test/service/src/main.rs +++ b/cumulus/test/service/src/main.rs @@ -36,12 +36,6 @@ fn main() -> Result<(), sc_cli::Error> { let cli = TestCollatorCli::from_args(); match &cli.subcommand { - #[allow(deprecated)] - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, - Some(Subcommand::ExportChainSpec(cmd)) => { let chain_spec = cli.load_spec(&cmd.chain)?; cmd.run(chain_spec) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/full_node_warp_sync/generate-snapshots.sh b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/full_node_warp_sync/generate-snapshots.sh index 2061587bca60..b89440ffd611 100755 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/full_node_warp_sync/generate-snapshots.sh +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/full_node_warp_sync/generate-snapshots.sh @@ -55,7 +55,7 @@ chainspec_parachain() { chainspec_relaychain() { echo "==> Generating relaychain chain spec" - "$TARGET_DIR/polkadot" build-spec --chain rococo-local --disable-default-bootnode --raw > chain_spec.json + "$TARGET_DIR/polkadot" export-chain-spec --chain rococo-local --raw > chain_spec.json [[ -f "$RELAYCHAIN_SPEC" ]] && cp "$RELAYCHAIN_SPEC" "$RELAYCHAIN_SPEC.backup" mv chain_spec.json "$RELAYCHAIN_SPEC" echo "Created: $RELAYCHAIN_SPEC" diff --git a/docs/sdk/src/polkadot_sdk/mod.rs b/docs/sdk/src/polkadot_sdk/mod.rs index 6fcff250d80f..f60d36bd8599 100644 --- a/docs/sdk/src/polkadot_sdk/mod.rs +++ b/docs/sdk/src/polkadot_sdk/mod.rs @@ -87,8 +87,8 @@ //! * [`frame-omni-bencher`]: a benchmarking tool for FRAME-based runtimes. Nodes typically contain //! a //! `benchmark` subcommand that does the same. -//! * [`chain_spec_builder`]: Utility to build chain-specs Nodes typically contain a `build-spec` -//! subcommand that does the same. +//! * [`chain_spec_builder`]: Utility to build chain-specs. Nodes typically contain an +//! `export-chain-spec` subcommand that does the same. //! * [`subkey`]: Substrate's key management utility. //! * [`substrate-node`](node_cli) is an extensive substrate node that contains the superset of all //! runtime and node side features. The corresponding runtime, called [`kitchensink_runtime`] diff --git a/docs/sdk/src/reference_docs/cli.rs b/docs/sdk/src/reference_docs/cli.rs index 6f393f267b0d..bb1b88003855 100644 --- a/docs/sdk/src/reference_docs/cli.rs +++ b/docs/sdk/src/reference_docs/cli.rs @@ -22,28 +22,24 @@ //! #### Generating Custom Chain Specification //! ```bash //! ./target/debug/node-template \ -//! build-spec \ -//! --disable-default-bootnode \ +//! export-chain-spec \ //! --chain local \ //! > customSpec.json //! ``` //! -//! - `build-spec`: A subcommand to generate a chain specification file. -//! - `--disable-default-bootnode`: Disables the default bootnodes in the node template. +//! - `export-chain-spec`: A subcommand to generate a chain specification file. //! - `--chain local`: Indicates the chain specification is for a local development chain. //! - `> customSpec.json`: Redirects the output into a customSpec.json file. //! //! #### Converting Chain Specification to Raw Format //! ```bash -//! ./target/debug/node-template build-spec \ +//! ./target/debug/node-template export-chain-spec \ //! --chain=customSpec.json \ //! --raw \ -//! --disable-default-bootnode \ //! > customSpecRaw.json //! ``` //! //! - `--chain=customSpec.json`: Uses the custom chain specification as input. -//! - `--disable-default-bootnode`: Disables the default bootnodes in the node template. //! - `--raw`: Converts the chain specification into a raw format with encoded storage keys. //! - `> customSpecRaw.json`: Outputs to `customSpecRaw.json`. //! diff --git a/polkadot/cli/src/cli.rs b/polkadot/cli/src/cli.rs index 16e5f1671f5a..f64f00fda9ba 100644 --- a/polkadot/cli/src/cli.rs +++ b/polkadot/cli/src/cli.rs @@ -24,14 +24,6 @@ use std::path::PathBuf; #[allow(missing_docs)] #[derive(Debug, Parser)] pub enum Subcommand { - /// Build a chain specification. - /// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec` - /// command instead. - #[deprecated( - note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/polkadot/cli/src/command.rs b/polkadot/cli/src/command.rs index c25d64f78a15..ffd8ef43426f 100644 --- a/polkadot/cli/src/command.rs +++ b/polkadot/cli/src/command.rs @@ -350,11 +350,6 @@ pub fn run() -> Result<()> { None, polkadot_node_metrics::logger_hook(), ), - #[allow(deprecated)] - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - Ok(runner.sync_run(|config| cmd.run(config.chain_spec, config.network))?) - }, Some(Subcommand::ExportChainSpec(cmd)) => { // Directly load the embedded chain spec using the CLI’s load_spec method. let spec = cli.load_spec(&cmd.chain)?; diff --git a/substrate/bin/node/cli/src/cli.rs b/substrate/bin/node/cli/src/cli.rs index 7c7335c06d49..01b411e536ef 100644 --- a/substrate/bin/node/cli/src/cli.rs +++ b/substrate/bin/node/cli/src/cli.rs @@ -116,14 +116,6 @@ pub enum Subcommand { /// Sign a message, with a given (secret) key. Sign(sc_cli::SignCmd), - /// Build a chain specification. - /// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec` - /// command instead. - #[deprecated( - note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/substrate/bin/node/cli/src/command.rs b/substrate/bin/node/cli/src/command.rs index ec8f391d596f..1997263f82c2 100644 --- a/substrate/bin/node/cli/src/command.rs +++ b/substrate/bin/node/cli/src/command.rs @@ -180,11 +180,6 @@ pub fn run() -> Result<()> { Some(Subcommand::Sign(cmd)) => cmd.run(), Some(Subcommand::Verify(cmd)) => cmd.run(), Some(Subcommand::Vanity(cmd)) => cmd.run(), - #[allow(deprecated)] - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { diff --git a/substrate/bin/node/cli/tests/build_spec_works.rs b/substrate/bin/node/cli/tests/export_chain_spec_works.rs similarity index 74% rename from substrate/bin/node/cli/tests/build_spec_works.rs rename to substrate/bin/node/cli/tests/export_chain_spec_works.rs index ce97dea6f6c8..527231bc2661 100644 --- a/substrate/bin/node/cli/tests/build_spec_works.rs +++ b/substrate/bin/node/cli/tests/export_chain_spec_works.rs @@ -18,22 +18,14 @@ use assert_cmd::cargo::cargo_bin; use std::process::Command; -use tempfile::tempdir; #[test] -fn build_spec_works() { - let base_path = tempdir().expect("could not create a temp dir"); - +fn export_chain_spec_works() { let output = Command::new(cargo_bin("substrate-node")) - .args(&["build-spec", "--dev", "-d"]) - .arg(base_path.path()) + .args(&["export-chain-spec", "--chain", "dev"]) .output() .unwrap(); assert!(output.status.success()); - // Make sure that the `dev` chain folder exists, but the `db` doesn't - assert!(base_path.path().join("chains/dev/").exists()); - assert!(!base_path.path().join("chains/dev/db").exists()); - let _value: serde_json::Value = serde_json::from_slice(output.stdout.as_slice()).unwrap(); } diff --git a/substrate/bin/utils/chain-spec-builder/README.docify.md b/substrate/bin/utils/chain-spec-builder/README.docify.md index 1b0f78d278c5..8088eccaf238 100644 --- a/substrate/bin/utils/chain-spec-builder/README.docify.md +++ b/substrate/bin/utils/chain-spec-builder/README.docify.md @@ -5,7 +5,7 @@ Substrate's chain spec builder utility. A chain-spec is short for `chain-specification`. See the [`sc-chain-spec`](https://crates.io/docs.rs/sc-chain-spec/latest/sc_chain_spec) for more information. -_Note:_ this binary is a more flexible alternative to the `build-spec` subcommand, contained in typical Substrate-based nodes. +_Note:_ this binary is a more flexible alternative to the `export-chain-spec` subcommand, contained in typical Substrate-based nodes. This particular binary is capable of interacting with [`sp-genesis-builder`](https://docs.rs/sp-genesis-builder/latest/sp_genesis_builder/index.html) implementation of any provided runtime allowing to build chain-spec JSON files. diff --git a/substrate/bin/utils/chain-spec-builder/README.md b/substrate/bin/utils/chain-spec-builder/README.md index 31e843077649..7ad1e820a9c7 100644 --- a/substrate/bin/utils/chain-spec-builder/README.md +++ b/substrate/bin/utils/chain-spec-builder/README.md @@ -5,7 +5,7 @@ Substrate's chain spec builder utility. A chain-spec is short for `chain-specification`. See the [`sc-chain-spec`](https://crates.io/docs.rs/sc-chain-spec/latest/sc_chain_spec) for more information. -_Note:_ this binary is a more flexible alternative to the `build-spec` subcommand, contained in typical Substrate-based nodes. +_Note:_ this binary is a more flexible alternative to the `export-chain-spec` subcommand, contained in typical Substrate-based nodes. This particular binary is capable of interacting with [`sp-genesis-builder`](https://docs.rs/sp-genesis-builder/latest/sp_genesis_builder/index.html) implementation of any provided runtime allowing to build chain-spec JSON files. diff --git a/substrate/client/cli/src/commands/build_spec_cmd.rs b/substrate/client/cli/src/commands/build_spec_cmd.rs deleted file mode 100644 index df8c6b7d0baa..000000000000 --- a/substrate/client/cli/src/commands/build_spec_cmd.rs +++ /dev/null @@ -1,91 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -use crate::{ - error, - params::{NodeKeyParams, SharedParams}, - CliConfiguration, -}; -use clap::Parser; -use log::info; -use sc_network::config::build_multiaddr; -use sc_service::{ - config::{MultiaddrWithPeerId, NetworkConfiguration}, - ChainSpec, -}; -use std::io::Write; - -/// The `build-spec` command used to build a specification. -#[derive(Debug, Clone, Parser)] -pub struct BuildSpecCmd { - /// Force raw genesis storage output. - #[arg(long)] - pub raw: bool, - - /// Disable adding the default bootnode to the specification. - /// By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the - /// specification when no bootnode exists. - #[arg(long)] - pub disable_default_bootnode: bool, - - #[allow(missing_docs)] - #[clap(flatten)] - pub shared_params: SharedParams, - - #[allow(missing_docs)] - #[clap(flatten)] - pub node_key_params: NodeKeyParams, -} - -impl BuildSpecCmd { - /// Run the build-spec command - pub fn run( - &self, - mut spec: Box, - network_config: NetworkConfiguration, - ) -> error::Result<()> { - info!("Building chain spec"); - let raw_output = self.raw; - - if spec.boot_nodes().is_empty() && !self.disable_default_bootnode { - let keys = network_config.node_key.into_keypair()?; - let peer_id = keys.public().to_peer_id(); - let addr = MultiaddrWithPeerId { - multiaddr: build_multiaddr![Ip4([127, 0, 0, 1]), Tcp(30333u16)], - peer_id: peer_id.into(), - }; - spec.add_boot_node(addr) - } - - let json = sc_service::chain_ops::build_spec(&*spec, raw_output)?; - if std::io::stdout().write_all(json.as_bytes()).is_err() { - let _ = std::io::stderr().write_all(b"Error writing to stdout\n"); - } - Ok(()) - } -} - -impl CliConfiguration for BuildSpecCmd { - fn shared_params(&self) -> &SharedParams { - &self.shared_params - } - - fn node_key_params(&self) -> Option<&NodeKeyParams> { - Some(&self.node_key_params) - } -} diff --git a/substrate/client/cli/src/commands/export_chain_spec_cmd.rs b/substrate/client/cli/src/commands/export_chain_spec_cmd.rs index 6af475d5aa07..2820b86a32c0 100644 --- a/substrate/client/cli/src/commands/export_chain_spec_cmd.rs +++ b/substrate/client/cli/src/commands/export_chain_spec_cmd.rs @@ -31,13 +31,6 @@ use std::{ /// genesis config presets which can be referenced via `--chain ` . The logic for /// loading the chain spec into memory based on an `id` is specific to each /// node and is a prerequisite to enable this command. -/// -/// Same functionality can be achieved currently via -/// [`crate::commands::build_spec_cmd::BuildSpecCmd`] but we recommend -/// `export-chain-spec` in its stead. `build-spec` is known -/// to be a legacy mix of exporting chain specs to JSON files or -/// converting them to raw, which will be better -/// represented under `export-chain-spec`. #[derive(Debug, Clone, Parser)] pub struct ExportChainSpecCmd { /// The chain spec identifier to export. diff --git a/substrate/client/cli/src/commands/mod.rs b/substrate/client/cli/src/commands/mod.rs index b63fb1d90423..4af474dc40a7 100644 --- a/substrate/client/cli/src/commands/mod.rs +++ b/substrate/client/cli/src/commands/mod.rs @@ -18,7 +18,6 @@ //! Various subcommands that can be included in a substrate-based chain's CLI. -mod build_spec_cmd; mod chain_info_cmd; mod check_block_cmd; mod export_blocks_cmd; @@ -41,7 +40,7 @@ mod vanity; mod verify; pub use self::{ - build_spec_cmd::BuildSpecCmd, chain_info_cmd::ChainInfoCmd, check_block_cmd::CheckBlockCmd, + chain_info_cmd::ChainInfoCmd, check_block_cmd::CheckBlockCmd, export_blocks_cmd::ExportBlocksCmd, export_chain_spec_cmd::ExportChainSpecCmd, export_state_cmd::ExportStateCmd, generate::GenerateCmd, generate_node_key::GenerateKeyCmdCommon, import_blocks_cmd::ImportBlocksCmd, diff --git a/substrate/client/cli/src/params/shared_params.rs b/substrate/client/cli/src/params/shared_params.rs index e0c52deb44ca..ddbab474d447 100644 --- a/substrate/client/cli/src/params/shared_params.rs +++ b/substrate/client/cli/src/params/shared_params.rs @@ -27,7 +27,7 @@ pub struct SharedParams { /// Specify the chain specification. /// /// It can be one of the predefined ones (dev, local, or staging) or it can be a path to - /// a file with the chainspec (such as one exported by the `build-spec` subcommand). + /// a file with the chainspec (such as one exported by the `export-chain-spec` subcommand). #[arg(long, value_name = "CHAIN_SPEC")] pub chain: Option, diff --git a/substrate/frame/revive/dev-node/node/src/cli.rs b/substrate/frame/revive/dev-node/node/src/cli.rs index fe7717dd7651..3ed4cade3f00 100644 --- a/substrate/frame/revive/dev-node/node/src/cli.rs +++ b/substrate/frame/revive/dev-node/node/src/cli.rs @@ -58,8 +58,8 @@ pub enum Subcommand { #[command(subcommand)] Key(sc_cli::KeySubcommand), - /// Build a chain specification. - BuildSpec(sc_cli::BuildSpecCmd), + /// Export the chain specification. + ExportChainSpec(sc_cli::ExportChainSpecCmd), /// Validate blocks. CheckBlock(sc_cli::CheckBlockCmd), @@ -67,9 +67,6 @@ pub enum Subcommand { /// Export blocks. ExportBlocks(sc_cli::ExportBlocksCmd), - /// Export the chain specification. - ExportChainSpec(sc_cli::ExportChainSpecCmd), - /// Export the state of a given block into a chain spec. ExportState(sc_cli::ExportStateCmd), diff --git a/substrate/frame/revive/dev-node/node/src/command.rs b/substrate/frame/revive/dev-node/node/src/command.rs index 7d92eeae1512..d6a8a075f422 100644 --- a/substrate/frame/revive/dev-node/node/src/command.rs +++ b/substrate/frame/revive/dev-node/node/src/command.rs @@ -68,10 +68,6 @@ pub fn run_with_args(args: Vec) -> sc_cli::Result<()> { match &cli.subcommand { Some(Subcommand::Key(cmd)) => cmd.run(&cli), - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { diff --git a/substrate/frame/transaction-storage/README.md b/substrate/frame/transaction-storage/README.md index 62741a012728..0ef2c02cd7b8 100644 --- a/substrate/frame/transaction-storage/README.md +++ b/substrate/frame/transaction-storage/README.md @@ -13,7 +13,7 @@ The following describes how to set up a new storage chain. Start with generating a chain spec. ```bash -cargo run --release -- build-spec --chain=local > sc_init.json +cargo run --release -- export-chain-spec --chain=local > sc_init.json ``` Edit the json chain spec file to customise the chain. The storage chain genesis params are configured in the @@ -23,7 +23,7 @@ changes at the moment. Build a raw spec from the init spec. ```bash -cargo run --release build-spec --chain=sc_init.json --raw > sc.json +cargo run --release export-chain-spec --chain=sc_init.json --raw > sc.json ``` Run a few validator nodes. diff --git a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs index 0a95a1696bd6..75a625c53a37 100644 --- a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs +++ b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs @@ -82,7 +82,7 @@ fn build_network_config() -> Result { .with_default_command("substrate") .with_default_image(integration_image.as_str()) .with_chain_spec_command( - "substrate build-spec --chain {{chainName}} --disable-default-bootnode --raw", + "substrate export-chain-spec --chain {{chainName}} --raw", ) .chain_spec_command_is_local(true) .with_default_args(default_args) diff --git a/templates/minimal/node/src/cli.rs b/templates/minimal/node/src/cli.rs index 8284bf5b0ed1..751f59da57c2 100644 --- a/templates/minimal/node/src/cli.rs +++ b/templates/minimal/node/src/cli.rs @@ -59,13 +59,6 @@ pub enum Subcommand { Key(sc_cli::KeySubcommand), /// Build a chain specification. - /// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec` - /// command instead. - #[deprecated( - note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/templates/minimal/node/src/command.rs b/templates/minimal/node/src/command.rs index e3115141a083..de2305d3f134 100644 --- a/templates/minimal/node/src/command.rs +++ b/templates/minimal/node/src/command.rs @@ -63,11 +63,6 @@ pub fn run() -> sc_cli::Result<()> { match &cli.subcommand { Some(Subcommand::Key(cmd)) => cmd.run(&cli), - #[allow(deprecated)] - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { diff --git a/templates/parachain/node/src/cli.rs b/templates/parachain/node/src/cli.rs index 3810ea4f1bdb..ae7097034e2d 100644 --- a/templates/parachain/node/src/cli.rs +++ b/templates/parachain/node/src/cli.rs @@ -5,14 +5,6 @@ use std::path::PathBuf; #[allow(clippy::large_enum_variant)] #[derive(Debug, clap::Subcommand)] pub enum Subcommand { - /// Build a chain specification. - /// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec` - /// command instead. - #[deprecated( - note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), @@ -51,7 +43,7 @@ pub enum Subcommand { const AFTER_HELP_EXAMPLE: &str = color_print::cstr!( r#"Examples: - parachain-template-node build-spec --disable-default-bootnode > plain-parachain-chainspec.json + parachain-template-node export-chain-spec --chain local > plain-parachain-chainspec.json Export a chainspec for a local testnet in json format. parachain-template-node --chain plain-parachain-chainspec.json --tmp -- --chain rococo-local Launch a full node with chain specification loaded from plain-parachain-chainspec.json. diff --git a/templates/parachain/node/src/command.rs b/templates/parachain/node/src/command.rs index 9d40e2d496ec..d8c6cbccc521 100644 --- a/templates/parachain/node/src/command.rs +++ b/templates/parachain/node/src/command.rs @@ -113,11 +113,6 @@ pub fn run() -> Result<()> { let cli = Cli::from_args(); match &cli.subcommand { - #[allow(deprecated)] - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, Some(Subcommand::CheckBlock(cmd)) => { construct_async_run!(|components, cli, cmd, config| { Ok(cmd.run(components.client, components.import_queue)) diff --git a/templates/solochain/node/src/cli.rs b/templates/solochain/node/src/cli.rs index c09905c7949e..a02283d2480b 100644 --- a/templates/solochain/node/src/cli.rs +++ b/templates/solochain/node/src/cli.rs @@ -15,13 +15,6 @@ pub enum Subcommand { Key(sc_cli::KeySubcommand), /// Build a chain specification. - /// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec` - /// command instead. - #[deprecated( - note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead" - )] - BuildSpec(sc_cli::BuildSpecCmd), - /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/templates/solochain/node/src/command.rs b/templates/solochain/node/src/command.rs index 460c0e766026..b5f8bb07ec2d 100644 --- a/templates/solochain/node/src/command.rs +++ b/templates/solochain/node/src/command.rs @@ -52,11 +52,6 @@ pub fn run() -> sc_cli::Result<()> { match &cli.subcommand { Some(Subcommand::Key(cmd)) => cmd.run(&cli), - #[allow(deprecated)] - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { From bd43d46c78c79ee3fa261e6b38fc5bf05d8ac733 Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:42:19 +0000 Subject: [PATCH 02/16] Update from github-actions[bot] running command 'prdoc --audience node_dev --bump major' --- prdoc/pr_12586.prdoc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 prdoc/pr_12586.prdoc diff --git a/prdoc/pr_12586.prdoc b/prdoc/pr_12586.prdoc new file mode 100644 index 000000000000..ae3e1c7fe16b --- /dev/null +++ b/prdoc/pr_12586.prdoc @@ -0,0 +1,19 @@ +title: Remove deprecated build-spec CLI subcommand +doc: +- audience: Node Dev + description: |- + ## Summary + + - Remove the deprecated `build-spec` CLI subcommand and `BuildSpecCmd` from `sc-cli`. + - Migrate all callers (nodes, templates, scripts, docs, zombienet) to `export-chain-spec`. + + Part of #11561 +crates: +- name: polkadot-omni-node-lib + bump: major +- name: polkadot-cli + bump: major +- name: staging-chain-spec-builder + bump: major +- name: sc-cli + bump: major From f263b6c3a53b95aeada851d3f1ffaed06c4e6e1b Mon Sep 17 00:00:00 2001 From: Nasihudeen Jimoh Date: Tue, 7 Jul 2026 15:44:17 +0100 Subject: [PATCH 03/16] clean prdoc --- prdoc/pr_12586.prdoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/prdoc/pr_12586.prdoc b/prdoc/pr_12586.prdoc index ae3e1c7fe16b..a3668487ee49 100644 --- a/prdoc/pr_12586.prdoc +++ b/prdoc/pr_12586.prdoc @@ -6,8 +6,6 @@ doc: - Remove the deprecated `build-spec` CLI subcommand and `BuildSpecCmd` from `sc-cli`. - Migrate all callers (nodes, templates, scripts, docs, zombienet) to `export-chain-spec`. - - Part of #11561 crates: - name: polkadot-omni-node-lib bump: major From 872d80449ff6422b7bb0ddfb9238e46ead955418 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Tue, 7 Jul 2026 15:54:45 +0100 Subject: [PATCH 04/16] Fix markdown line length in chain-spec-builder READMEs. --- substrate/bin/utils/chain-spec-builder/README.docify.md | 3 ++- substrate/bin/utils/chain-spec-builder/README.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/substrate/bin/utils/chain-spec-builder/README.docify.md b/substrate/bin/utils/chain-spec-builder/README.docify.md index 8088eccaf238..29c5d0f724dc 100644 --- a/substrate/bin/utils/chain-spec-builder/README.docify.md +++ b/substrate/bin/utils/chain-spec-builder/README.docify.md @@ -5,7 +5,8 @@ Substrate's chain spec builder utility. A chain-spec is short for `chain-specification`. See the [`sc-chain-spec`](https://crates.io/docs.rs/sc-chain-spec/latest/sc_chain_spec) for more information. -_Note:_ this binary is a more flexible alternative to the `export-chain-spec` subcommand, contained in typical Substrate-based nodes. +_Note:_ this binary is a more flexible alternative to the `export-chain-spec` subcommand, +contained in typical Substrate-based nodes. This particular binary is capable of interacting with [`sp-genesis-builder`](https://docs.rs/sp-genesis-builder/latest/sp_genesis_builder/index.html) implementation of any provided runtime allowing to build chain-spec JSON files. diff --git a/substrate/bin/utils/chain-spec-builder/README.md b/substrate/bin/utils/chain-spec-builder/README.md index 7ad1e820a9c7..381e371daf7a 100644 --- a/substrate/bin/utils/chain-spec-builder/README.md +++ b/substrate/bin/utils/chain-spec-builder/README.md @@ -5,7 +5,8 @@ Substrate's chain spec builder utility. A chain-spec is short for `chain-specification`. See the [`sc-chain-spec`](https://crates.io/docs.rs/sc-chain-spec/latest/sc_chain_spec) for more information. -_Note:_ this binary is a more flexible alternative to the `export-chain-spec` subcommand, contained in typical Substrate-based nodes. +_Note:_ this binary is a more flexible alternative to the `export-chain-spec` subcommand, +contained in typical Substrate-based nodes. This particular binary is capable of interacting with [`sp-genesis-builder`](https://docs.rs/sp-genesis-builder/latest/sp_genesis_builder/index.html) implementation of any provided runtime allowing to build chain-spec JSON files. From f66cc2afc383246e41a7b8b273b7c4c5ceeb9ddc Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Tue, 7 Jul 2026 16:01:12 +0100 Subject: [PATCH 05/16] Apply rustfmt to block_building chain spec command. --- .../zombienet-sdk/tests/zombie_ci/block_building.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs index 75a625c53a37..6ef2adc77d17 100644 --- a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs +++ b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs @@ -4,11 +4,11 @@ use std::time::Duration; use crate::utils::{ - env_or_default, initialize_network, log_line_absent, BEST_BLOCK_METRIC, - DEFAULT_SUBSTRATE_IMAGE, INTEGRATION_IMAGE_ENV, NODE_ROLE_METRIC, PEER_COUNT_METRIC, + BEST_BLOCK_METRIC, DEFAULT_SUBSTRATE_IMAGE, INTEGRATION_IMAGE_ENV, NODE_ROLE_METRIC, + PEER_COUNT_METRIC, env_or_default, initialize_network, log_line_absent, }; -use anyhow::{anyhow, Result}; -use subxt::{config::substrate::SubstrateConfig, dynamic::tx, OnlineClient}; +use anyhow::{Result, anyhow}; +use subxt::{OnlineClient, config::substrate::SubstrateConfig, dynamic::tx}; use subxt_signer::sr25519::dev; use zombienet_sdk::{Arg, NetworkConfig, NetworkConfigBuilder, NetworkNode}; @@ -81,9 +81,7 @@ fn build_network_config() -> Result { .with_chain("local") .with_default_command("substrate") .with_default_image(integration_image.as_str()) - .with_chain_spec_command( - "substrate export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("substrate export-chain-spec --chain {{chainName}} --raw") .chain_spec_command_is_local(true) .with_default_args(default_args) .with_validator(|node| node.with_name("alice")) From 41b87acda43315a23510ba7c26995a9188a49ec9 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Tue, 7 Jul 2026 16:06:35 +0100 Subject: [PATCH 06/16] Apply CI rustfmt import ordering in block_building test. --- .../zombienet-sdk/tests/zombie_ci/block_building.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs index 6ef2adc77d17..c1c9478aa2d1 100644 --- a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs +++ b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs @@ -4,11 +4,11 @@ use std::time::Duration; use crate::utils::{ - BEST_BLOCK_METRIC, DEFAULT_SUBSTRATE_IMAGE, INTEGRATION_IMAGE_ENV, NODE_ROLE_METRIC, - PEER_COUNT_METRIC, env_or_default, initialize_network, log_line_absent, + env_or_default, initialize_network, log_line_absent, BEST_BLOCK_METRIC, + DEFAULT_SUBSTRATE_IMAGE, INTEGRATION_IMAGE_ENV, NODE_ROLE_METRIC, PEER_COUNT_METRIC, }; -use anyhow::{Result, anyhow}; -use subxt::{OnlineClient, config::substrate::SubstrateConfig, dynamic::tx}; +use anyhow::{anyhow, Result}; +use subxt::{config::substrate::SubstrateConfig, dynamic::tx, OnlineClient}; use subxt_signer::sr25519::dev; use zombienet_sdk::{Arg, NetworkConfig, NetworkConfigBuilder, NetworkNode}; From 277d1ac26a6c5a6ed5833bc5be0a834d13868c98 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Tue, 7 Jul 2026 18:07:28 +0100 Subject: [PATCH 07/16] Avoid export-chain-spec literal in SharedParams help text. Keeps omni-node help test passing while build-spec is removed. --- substrate/client/cli/src/params/shared_params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/client/cli/src/params/shared_params.rs b/substrate/client/cli/src/params/shared_params.rs index ddbab474d447..32849aa76250 100644 --- a/substrate/client/cli/src/params/shared_params.rs +++ b/substrate/client/cli/src/params/shared_params.rs @@ -27,7 +27,7 @@ pub struct SharedParams { /// Specify the chain specification. /// /// It can be one of the predefined ones (dev, local, or staging) or it can be a path to - /// a file with the chainspec (such as one exported by the `export-chain-spec` subcommand). + /// a file with the chainspec (such as one exported by a node's chain specification export subcommand). #[arg(long, value_name = "CHAIN_SPEC")] pub chain: Option, From ff7f65e7ac2d50a5f4f463ba27db9065b9309d0e Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Tue, 7 Jul 2026 18:14:34 +0100 Subject: [PATCH 08/16] Apply rustfmt to SharedParams chain doc comment. --- substrate/client/cli/src/params/shared_params.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/client/cli/src/params/shared_params.rs b/substrate/client/cli/src/params/shared_params.rs index 32849aa76250..dde472f57528 100644 --- a/substrate/client/cli/src/params/shared_params.rs +++ b/substrate/client/cli/src/params/shared_params.rs @@ -27,7 +27,8 @@ pub struct SharedParams { /// Specify the chain specification. /// /// It can be one of the predefined ones (dev, local, or staging) or it can be a path to - /// a file with the chainspec (such as one exported by a node's chain specification export subcommand). + /// a file with the chainspec (such as one exported by a node's chain specification export + /// subcommand). #[arg(long, value_name = "CHAIN_SPEC")] pub chain: Option, From c0605594ea0c6a494ca99c0b34c86f3a971abc2f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 10 Jul 2026 11:58:07 +0200 Subject: [PATCH 09/16] Apply suggestions from code review Co-authored-by: Francisco Aguirre --- cumulus/test/service/src/cli.rs | 1 - prdoc/pr_12586.prdoc | 2 +- templates/minimal/node/src/cli.rs | 1 - templates/solochain/node/src/cli.rs | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cumulus/test/service/src/cli.rs b/cumulus/test/service/src/cli.rs index 15c6bd9b7536..1007163a4174 100644 --- a/cumulus/test/service/src/cli.rs +++ b/cumulus/test/service/src/cli.rs @@ -82,7 +82,6 @@ impl Display for AuthoringPolicy { #[derive(Debug, clap::Subcommand)] pub enum Subcommand { - /// Build a chain specification. /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/prdoc/pr_12586.prdoc b/prdoc/pr_12586.prdoc index a3668487ee49..00db2183110a 100644 --- a/prdoc/pr_12586.prdoc +++ b/prdoc/pr_12586.prdoc @@ -12,6 +12,6 @@ crates: - name: polkadot-cli bump: major - name: staging-chain-spec-builder - bump: major + bump: patch - name: sc-cli bump: major diff --git a/templates/minimal/node/src/cli.rs b/templates/minimal/node/src/cli.rs index 751f59da57c2..fb83338119a8 100644 --- a/templates/minimal/node/src/cli.rs +++ b/templates/minimal/node/src/cli.rs @@ -58,7 +58,6 @@ pub enum Subcommand { #[command(subcommand)] Key(sc_cli::KeySubcommand), - /// Build a chain specification. /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), diff --git a/templates/solochain/node/src/cli.rs b/templates/solochain/node/src/cli.rs index a02283d2480b..6071376e0381 100644 --- a/templates/solochain/node/src/cli.rs +++ b/templates/solochain/node/src/cli.rs @@ -14,7 +14,6 @@ pub enum Subcommand { #[command(subcommand)] Key(sc_cli::KeySubcommand), - /// Build a chain specification. /// Export the chain specification. ExportChainSpec(sc_cli::ExportChainSpecCmd), From 1c5ac96a5ffd9b590c3b8bb6dd5cf20e051269ad Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sat, 11 Jul 2026 16:39:38 +0100 Subject: [PATCH 10/16] Migrate zombienet tests from build-spec to export-chain-spec. Override zombienet chain spec generation in relay and parachain network builders so tests work after removing the build-spec CLI subcommand. --- .../tests/zombie_ci/block_bundling/basic.rs | 8 ++++++++ .../block_bundling/full_core_usage_scenarios.rs | 4 ++++ .../tests/zombie_ci/block_bundling/pov_recovery.rs | 4 ++++ .../zombie_ci/block_bundling/relay_parent_offset.rs | 4 ++++ .../zombie_ci/block_bundling/runtime_upgrade.rs | 4 ++++ .../zombie_ci/block_bundling/three_cores_glutton.rs | 4 ++++ .../tests/zombie_ci/block_bundling/tracing_block.rs | 4 ++++ .../tests/zombie_ci/block_bundling/warp_sync.rs | 4 ++++ .../zombienet-sdk/tests/zombie_ci/bootnodes.rs | 4 ++++ .../tests/zombie_ci/collator_discovery.rs | 4 ++++ .../zombie_ci/elastic_scaling/asset_hub_westend.rs | 4 ++++ .../tests/zombie_ci/elastic_scaling/pov_recovery.rs | 4 ++++ .../elastic_scaling/slot_based_authoring.rs | 6 ++++++ .../elastic_scaling/slot_based_rp_offset.rs | 4 ++++ .../zombie_ci/elastic_scaling/upgrade_to_3_cores.rs | 4 ++++ .../tests/zombie_ci/full_node_catching_up.rs | 4 ++++ .../zombienet-sdk/tests/zombie_ci/migrate_solo.rs | 6 ++++++ .../parachain_runtime_upgrade_slot_duration_18s.rs | 4 ++++ .../zombienet-sdk/tests/zombie_ci/pov_recovery.rs | 4 ++++ .../tests/zombie_ci/rpc_collator_build_blocks.rs | 4 ++++ .../zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs | 4 ++++ .../tests/zombie_ci/statement_store/common.rs | 4 +++- .../tests/zombie_ci/statement_store/integration.rs | 2 ++ .../zombienet-sdk/tests/zombie_ci/sync_blocks.rs | 4 ++++ .../zombienet-sdk-tests/tests/disabling/slashing.rs | 4 ++++ .../tests/elastic_scaling/basic_3cores.rs | 6 ++++++ .../tests/elastic_scaling/doesnt_break_parachains.rs | 4 ++++ .../tests/elastic_scaling/slot_based_12cores.rs | 4 ++++ .../tests/elastic_scaling/slot_based_3cores.rs | 6 ++++++ .../tests/functional/approval_voting_coalescing.rs | 4 ++++ .../functional/approved_peer_mixed_validators.rs | 6 ++++++ .../tests/functional/async_backing_6_seconds_rate.rs | 6 ++++++ .../tests/functional/beefy_and_mmr.rs | 2 ++ .../chunk_fetching_network_compatibility.rs | 7 +++++++ .../functional/collators_reputation_persistence.rs | 6 ++++++ .../coretime_collation_fetching_fairness.rs | 4 ++++ .../tests/functional/coretime_partitioning.rs | 6 ++++++ .../tests/functional/coretime_shared_core.rs | 4 ++++ .../tests/functional/dispute_freshly_finalized.rs | 4 ++++ .../tests/functional/dispute_old_finalized.rs | 4 ++++ .../tests/functional/duplicate_collations.rs | 4 ++++ .../tests/functional/parachains_disputes.rs | 4 ++++ .../parachains_disputes_garbage_candidate.rs | 4 ++++ .../tests/functional/parachains_max_tranche0.rs | 4 ++++ .../tests/functional/parachains_pvf.rs | 4 ++++ .../tests/functional/scheduling_v3.rs | 10 ++++++++++ .../tests/functional/shared_core_idle_parachain.rs | 4 ++++ .../spam_statement_distribution_requests.rs | 6 ++++++ .../tests/functional/sync_backing.rs | 4 ++++ .../tests/functional/systematic_chunk_recovery.rs | 4 ++++ .../tests/functional/v3_dynamic_enablement.rs | 6 ++++++ .../tests/functional/v3_rolling_upgrade.rs | 4 ++++ .../tests/functional/validator_disabling.rs | 4 ++++ .../tests/misc/malus_dispute_valid_block.rs | 4 ++++ polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs | 4 ++++ .../zombienet-sdk-tests/tests/parachains/weights.rs | 4 ++++ .../tests/smoke/coretime_revenue.rs | 4 ++++ .../tests/smoke/coretime_smoke.rs | 6 ++++++ .../tests/smoke/deregister_register_validator.rs | 2 ++ .../tests/smoke/parachains_smoke.rs | 4 ++++ .../tests/smoke/precompile_pvf_smoke.rs | 4 ++++ .../transaction-pool/tests/zombienet/yap_test.rs | 4 ++++ templates/zombienet/tests/smoke.rs | 12 ++++++++++++ 63 files changed, 288 insertions(+), 1 deletion(-) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs index c8be4c5642a8..a4782698bd6a 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs @@ -163,6 +163,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -194,6 +196,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") .with_default_args(vec![ @@ -215,6 +219,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(HRMP_RECIPIENT_LOW) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("sync-backing") .with_collator(|n| n.with_name("hrmp-recipient-low")) @@ -222,6 +228,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(HRMP_RECIPIENT_HIGH) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") .with_collator(|n| n.with_name("hrmp-recipient-high")) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs index 6eccfbda631d..a860207b5c20 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs @@ -208,6 +208,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -231,6 +233,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs index 690304f97f01..35572d6b1e67 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs @@ -112,6 +112,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_resources(|resources| { // These settings are applicable only for `k8s` provider. @@ -153,6 +155,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_chain("block-bundling") .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_resources(|resources| { // These settings are applicable only for `k8s` provider. diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs index 073fda9389e4..10c6085e793d 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs @@ -28,6 +28,8 @@ async fn block_bundling_relay_parent_offset() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -52,6 +54,8 @@ async fn block_bundling_relay_parent_offset() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2400) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs index 27734b14254d..4886dbdf67f3 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs @@ -190,6 +190,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -213,6 +215,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs index 9c5dd74a9ca5..413d46663da8 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs @@ -75,6 +75,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -98,6 +100,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs index baf1e719d1a5..8485404ad615 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs @@ -105,6 +105,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -132,6 +134,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs index 908bc959659a..5451a3108f51 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs @@ -129,6 +129,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -152,6 +154,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs index 69b5b0717d1a..19ada2b36b78 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs @@ -23,6 +23,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) // Not strictly necessary for the test, but to keep it consistent // with the parachain part we also pass `--no-mdns` to the relaychain. @@ -37,6 +39,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(1000) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("asset-hub-rococo-local") // Do not put bootnodes into the chain-spec nor command line arguments. diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs index d5198a919342..c99c1c402a03 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs @@ -91,6 +91,8 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_default_resources(|resources| { @@ -115,6 +117,8 @@ async fn build_network_config() -> Result { let mut p = p .with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") .with_collator(|n| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs index c0dca0692e05..68dfe2fd3a59 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs @@ -26,6 +26,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) .with_default_resources(|resources| { @@ -53,6 +55,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("asset-hub-westend-local") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs index 10b25f5be0c4..6490cba63a05 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs @@ -116,6 +116,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_resources(|resources| { // These settings are applicable only for `k8s` provider. @@ -157,6 +159,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_chain("elastic-scaling") .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_resources(|resources| { // These settings are applicable only for `k8s` provider. diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs index bcb88722f7c9..a9d6a708e907 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs @@ -93,6 +93,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_genesis_overrides(json!({ "configuration": { @@ -123,6 +125,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID_1) .with_chain("elastic-scaling") .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| n.with_name("collator-elastic") @@ -135,6 +139,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID_2) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| n.with_name("collator-single-core") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs index 79275ad99bf5..507cf27e37d0 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs @@ -26,6 +26,8 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -51,6 +53,8 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any .with_parachain(|p| { p.with_id(2400) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs index 736d88d1d829..421d00b4f431 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs @@ -126,6 +126,8 @@ async fn build_network_config(async_backing: bool) -> Result Result Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_validator(|node| node.with_name("alice")) @@ -85,6 +87,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { n.with_name("charlie") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs index f5c067c1137a..02633a79951e 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs @@ -119,6 +119,8 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_validator(|node| node.with_name("alice")) @@ -128,6 +130,8 @@ async fn build_network_config() -> Result { // parachain A p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { n.with_name("dave").with_args(vec![("-lparachain=debug").into()]) @@ -138,6 +142,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) // modify genesis to produce different parachain header than for parachain A .with_genesis_overrides(json!({ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs index 0859c1543956..193ffe8c8741 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs @@ -114,6 +114,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_validator(|node| node.with_name("validator-0")); @@ -126,6 +128,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) .with_collator(|n| n.with_name("collator").validator(true)) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs index 9d8757a49348..56e19443181a 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs @@ -140,6 +140,8 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_genesis_overrides(json!({ "configuration": { @@ -171,6 +173,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|c| { c.with_name("bob") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs index a27ac9f4a338..ea385be53f2b 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs @@ -106,6 +106,8 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_validator(|node| node.with_name("alice")) @@ -118,6 +120,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![ ("-lparachain=trace,blockchain-rpc-client=debug").into(), diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs index ce82125caed7..f69b1c43bd45 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs @@ -127,6 +127,8 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -142,6 +144,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { n.with_name("charlie").validator(true).with_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs index 2e3c64791643..f8d50aa6d657 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs @@ -240,10 +240,12 @@ async fn launch_network( let images = zombienet_sdk::environment::get_images_from_env(); let base_dir = base_dir()?; - let config = NetworkConfigBuilder::new() + let config = NetworkConfigBuilder::new() .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) .with_validator(|node| node.with_name("validator-0")) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs index 380ee1c8a9b8..359a458c319c 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs @@ -233,6 +233,8 @@ async fn spawn_flooding_network( .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) .with_validator(|node| node.with_name("validator-0")) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs index b9ab9c123c49..9ae33aa70d3c 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs @@ -71,6 +71,8 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_default_resources(|resources| { @@ -84,6 +86,8 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_collator(|n| n.with_name("dave").validator(false)) diff --git a/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs b/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs index 327f2be94894..a43430c89ba6 100644 --- a/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs +++ b/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs @@ -32,6 +32,8 @@ async fn dispute_past_session_slashing() -> Result<(), anyhow::Error> { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ "--no-hardware-benchmarks".into(), @@ -72,6 +74,8 @@ async fn dispute_past_session_slashing() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1337) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator-1337")) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs index fc295e5f9d12..4de4fa2b4d62 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs @@ -26,6 +26,8 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -49,6 +51,8 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("adder-collator") + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -57,6 +61,8 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("adder-collator") + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs index a04d1b015902..dc46d03cac41 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs @@ -30,6 +30,8 @@ async fn doesnt_break_parachains_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -54,6 +56,8 @@ async fn doesnt_break_parachains_test() -> Result<(), anyhow::Error> { // Use default, which has 6 second slot time. Also, don't use slot-based collator. p.with_id(2000) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) .with_collator(|n| n.with_name("collator-2000")) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs index c830ba84e343..fa96b1fc1196 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs @@ -32,6 +32,8 @@ async fn slot_based_12cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -59,6 +61,8 @@ async fn slot_based_12cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2300) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-500ms") .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs index aaa513dd7213..95e0b2e631c3 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs @@ -29,6 +29,8 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -56,6 +58,8 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2100) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-mvp") .with_default_args(vec![ @@ -67,6 +71,8 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2200) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling") .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs b/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs index bd51069b5d4f..3f567172417a 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs @@ -24,6 +24,8 @@ async fn approval_voting_coalescing_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug").into()]) .with_genesis_overrides(json!({ @@ -49,6 +51,8 @@ async fn approval_voting_coalescing_test() -> Result<(), anyhow::Error> { config_builder = config_builder.with_parachain(|p| { p.with_id(para_id) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") .unwrap_or("docker.io/paritypr/colander:latest".to_string()) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs b/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs index 383cf217dfa2..21a667412213 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs @@ -31,6 +31,8 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -70,6 +72,8 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") .unwrap_or("docker.io/paritypr/colander:latest".to_string()) @@ -86,6 +90,8 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") .unwrap_or("docker.io/paritypr/colander:latest".to_string()) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs b/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs index 52dda31c4230..698bee0005b0 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs @@ -26,6 +26,8 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -46,6 +48,8 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("adder-collator") + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") .unwrap_or("docker.io/paritypr/colander:latest".to_string()) @@ -58,6 +62,8 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) .with_collator(|n| n.with_name("collator-2001")) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs b/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs index 859c45fe161b..c054cd2483b5 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs @@ -230,6 +230,8 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![ "--log=beefy=debug".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs b/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs index eac17eb2e756..c26267cd9973 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs @@ -122,6 +122,8 @@ fn build_network_config() -> Result { r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) .with_genesis_overrides(json!({ @@ -178,6 +180,11 @@ fn build_network_config() -> Result { // Use an old image that does not send out v2 receipts, as the old validators will // still check the collator signatures. .with_default_command(format!("polkadot-parachain{old_suffix}").as_str()) + .with_chain_spec_command( + format!("polkadot-parachain{old_suffix} export-chain-spec --chain {{{{chainName}}}} --raw") + .as_str(), + ) + .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name(&format!("collator-{para_id}"))) }) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs b/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs index 3f892e0225bb..1701872ac508 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs @@ -65,6 +65,8 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ ("-lparachain=debug,parachain::collator-protocol=trace").into(), @@ -91,6 +93,8 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(PARA_ID_1) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( std::env::var("COL_IMAGE") @@ -106,6 +110,8 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(PARA_ID_2) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs index fe768010e003..a7681f796473 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs @@ -136,6 +136,8 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) .with_genesis_overrides(json!({ @@ -184,6 +186,8 @@ fn build_network_config() -> Result { })) .with_default_image(col_image.as_str()) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(args) .with_collator(|n| n.with_name(&format!("collator-{para_id}"))) }) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs index b4230e33d75f..4a33ba0af4ba 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs @@ -241,6 +241,8 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ ("-lruntime=debug").into(), @@ -267,6 +269,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_A) .with_chain(chain_a) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_registration_strategy(zombienet_sdk::RegistrationStrategy::Manual) .onboard_as_parachain(false) @@ -277,6 +281,8 @@ async fn build_network_config() -> Result { p.with_id(PARA_B) .with_chain(chain_b) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_registration_strategy(zombienet_sdk::RegistrationStrategy::Manual) .onboard_as_parachain(false) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs index 1c413602dfa6..61ead0eb0aad 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs @@ -138,6 +138,8 @@ fn build_network_config(number_of_paras: u32) -> Result Result Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -166,6 +168,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator")) }); diff --git a/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs b/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs index f04c7afd7907..b55d8cf1b04a 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs @@ -34,6 +34,8 @@ async fn dispute_old_finalized() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -90,6 +92,8 @@ async fn dispute_old_finalized() -> Result<(), anyhow::Error> { .as_str(), ) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator")) }) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs b/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs index ddb691ab6214..4b7b8123e06d 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs @@ -31,6 +31,8 @@ async fn duplicate_collations_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -56,6 +58,8 @@ async fn duplicate_collations_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs index 207b681fdcaa..f58ecd7ef1d4 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs @@ -146,6 +146,8 @@ fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) .with_genesis_overrides(json!({ @@ -209,6 +211,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), format!("--pov-size={pov_size}").as_str().into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs index e9a855f36217..80d84cb9518b 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs @@ -164,6 +164,8 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) .with_genesis_overrides(json!({ @@ -206,6 +208,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), format!("--pov-size={pov_size}").as_str().into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs index 3dcad7bf6ab9..3f731c43a3f6 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs @@ -94,6 +94,8 @@ fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) .with_genesis_overrides(json!({ @@ -138,6 +140,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), format!("--pov-size={pov_size}").as_str().into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs index 42f716f11944..3c85eb7fe9ca 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs @@ -132,6 +132,8 @@ fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) .with_default_resources(|r| { @@ -157,6 +159,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), format!("--pov-size={pov_size}").as_str().into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs b/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs index 89b1a4854fde..f138d0324cb1 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs @@ -62,6 +62,8 @@ async fn scheduling_v2_and_v3_collator_with_v3_validators( let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug,parachain::candidate-backing=debug,parachain::provisioner=debug,parachain::prospective-parachains=debug,runtime::parachains::scheduler=debug,parachain::collator-protocol=debug,basic-authorship=debug,parachain::statement-distribution=debug").into()]) .with_genesis_overrides(json!({ @@ -94,6 +96,8 @@ async fn scheduling_v2_and_v3_collator_with_v3_validators( .with_parachain(|p| { p.with_id(2700) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain(parachain) .with_default_args(vec![ @@ -106,6 +110,8 @@ async fn scheduling_v2_and_v3_collator_with_v3_validators( .with_parachain(|p| { p.with_id(2500) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") .with_default_args(vec![ @@ -207,6 +213,8 @@ async fn scheduling_v3_es_collator_with_v3_validators() -> Result<(), anyhow::Er let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug,parachain::candidate-backing=debug,parachain::provisioner=debug,parachain::prospective-parachains=debug,runtime::parachains::scheduler=debug,parachain::collator-protocol=debug,basic-authorship=debug,parachain::statement-distribution=debug").into()]) .with_genesis_overrides(json!({ @@ -239,6 +247,8 @@ async fn scheduling_v3_es_collator_with_v3_validators() -> Result<(), anyhow::Er .with_parachain(|p| { p.with_id(2800) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-v3") .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs b/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs index 9af68bdda9c6..9e3020f5d409 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs @@ -28,6 +28,8 @@ async fn shared_core_idle_parachain_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -52,6 +54,8 @@ async fn shared_core_idle_parachain_test() -> Result<(), anyhow::Error> { // assign it to the para. .onboard_as_parachain(false) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![ ("-lparachain=debug,aura=debug").into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs b/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs index ad0c189b1e59..2247ad6e4d56 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs @@ -27,6 +27,8 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ // parachain::statement-distribution=trace to find @@ -73,6 +75,8 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( std::env::var("COL_IMAGE") @@ -85,6 +89,8 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(2001) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs b/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs index 6fc04f58204a..6a76316f79c1 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs @@ -26,6 +26,8 @@ async fn sync_backing_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -46,6 +48,8 @@ async fn sync_backing_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2500) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("sync-backing") .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs b/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs index f9519ae4d958..256c9d598fc5 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs @@ -148,6 +148,8 @@ fn build_network_config() -> Result { r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) .with_genesis_overrides(json!({ @@ -193,6 +195,8 @@ fn build_network_config() -> Result { })) .with_default_image(col_image.as_str()) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec![ "-lparachain=debug".into(), "--authoring=slot-based".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs b/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs index 485c15f6657f..e6d4960d564d 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs @@ -38,6 +38,8 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug").into()]) .with_genesis_overrides(json!({ @@ -75,6 +77,8 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2900) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) .with_collator(|n| n.with_name("collator-2900")) @@ -82,6 +86,8 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2901) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling") .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs b/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs index bc2390b4dbca..aa1b9ba10b81 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs @@ -43,6 +43,8 @@ async fn v3_rolling_upgrade() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug").into()]) .with_genesis_overrides(json!({ @@ -72,6 +74,8 @@ async fn v3_rolling_upgrade() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(3000) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs b/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs index 6aa7ed310b67..0cdbfb3b00d5 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs @@ -25,6 +25,8 @@ async fn validator_disabling_test() -> Result<(), anyhow::Error> { let r = r .with_chain("westend-local") // Use westend-local so the disabling can take effect. .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -69,6 +71,8 @@ async fn validator_disabling_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1000) .with_default_command("adder-collator") + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs b/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs index 316116c8a4ed..f0a040e741ea 100644 --- a/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs +++ b/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs @@ -68,6 +68,8 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) .with_default_resources(|r| { @@ -94,6 +96,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("adder-collator") + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_collator(|n| n.with_name("collator")) }) .with_global_settings(|global_settings| match std::env::var("ZOMBIENET_SDK_BASE_DIR") { diff --git a/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs b/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs index 49c1f853760e..969c28427539 100644 --- a/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs +++ b/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs @@ -100,6 +100,8 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![ "-lparachain=debug,runtime=debug".into(), @@ -135,6 +137,8 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), format!("--pov-size={pov_size}").as_str().into(), diff --git a/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs b/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs index 34cbfc7a18fc..784f3fc350a3 100644 --- a/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs +++ b/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs @@ -159,6 +159,8 @@ async fn setup_network() -> Result, anyhow::Error> { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_default_db_snapshot("https://storage.googleapis.com/zombienet-db-snaps/polkadot/test_weights/relaychain.tgz") @@ -168,6 +170,8 @@ async fn setup_network() -> Result, anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") .unwrap_or("docker.io/paritypr/colander:latest".to_string()) diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs index a3e62e6e34ea..ea9af8ff7d3a 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs @@ -233,6 +233,8 @@ async fn coretime_revenue_test() -> Result<(), anyhow::Error> { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_genesis_overrides( json!({ "configuration": { "config": { "scheduler_params": { "on_demand_base_fee": ON_DEMAND_BASE_FEE }}}}), @@ -244,6 +246,8 @@ async fn coretime_revenue_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1005) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("coretime-westend-local") .with_collator(|n| n.with_name("coretime")) diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs index a9687dd24475..64233e39aa4f 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs @@ -124,6 +124,8 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_validator(|node| { node.with_name("alice").with_args(vec![("-lruntime=debug,xcm=trace").into()]) @@ -140,6 +142,8 @@ fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(CORETIME_PARA_ID) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_chain("coretime-westend-local") // Add sudo key @@ -155,6 +159,8 @@ fn build_network_config() -> Result { p.with_id(TEST_PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_collator(|n| { n.with_name("collator-para-100").with_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs b/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs index 9927cb083fd0..118869066cbf 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs @@ -137,6 +137,8 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![("-lruntime=debug,parachain=trace").into()]) .with_validator(|node| node.with_name("alice")) diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs index 5e898952a553..45ffd80ac1f4 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs @@ -56,6 +56,8 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_validator(|node| { node.with_name("alice") @@ -70,6 +72,8 @@ fn build_network_config() -> Result { p.with_id(PARA_ID) .cumulus_based(false) .with_default_command("adder-collator") + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(col_image.as_str()) .with_collator(|n| { n.with_name("collator01") diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs index 9ea54daf9f3c..051cadece13e 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs @@ -206,6 +206,8 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![("-lruntime=debug,parachain=trace").into()]) .with_validator(|node| node.with_name("alice")) @@ -216,6 +218,8 @@ fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_collator(|n| n.with_name("collator-2000")) }) diff --git a/substrate/client/transaction-pool/tests/zombienet/yap_test.rs b/substrate/client/transaction-pool/tests/zombienet/yap_test.rs index fd2fba3b9b95..3d78bf28b4c5 100644 --- a/substrate/client/transaction-pool/tests/zombienet/yap_test.rs +++ b/substrate/client/transaction-pool/tests/zombienet/yap_test.rs @@ -41,6 +41,8 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) .with_genesis_overrides(json!({ @@ -68,6 +70,8 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { // commitment for selecting the core index p.with_id(2200) .with_default_command("polkadot-parachain") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("yap-rococo-local-2200") .with_genesis_overrides(json!({ diff --git a/templates/zombienet/tests/smoke.rs b/templates/zombienet/tests/smoke.rs index 5c0c9828e321..206132fb8cc5 100644 --- a/templates/zombienet/tests/smoke.rs +++ b/templates/zombienet/tests/smoke.rs @@ -52,12 +52,20 @@ mod smoke { para_cmd_args: Option>, } + fn export_chain_spec_command(binary: &str) -> String { + format!("{binary} export-chain-spec --chain {{{{chainName}}}} --raw") + } + fn get_config(network_spec: NetworkSpec) -> Result { let chain = if network_spec.relaychain_cmd == "polkadot" { "rococo-local" } else { "dev" }; let config = NetworkConfigBuilder::new().with_relaychain(|r| { let mut r = r.with_chain(chain).with_default_command(network_spec.relaychain_cmd); if let Some(path) = network_spec.relaychain_spec_path { r = r.with_chain_spec_path(path); + } else { + r = r + .with_chain_spec_command(export_chain_spec_command(network_spec.relaychain_cmd)) + .chain_spec_command_is_local(true); } if let Some(args) = network_spec.relaychain_cmd_args { @@ -76,6 +84,10 @@ mod smoke { } if let Some(path) = network_spec.para_chain_spec_path { p = p.with_chain_spec_path(path); + } else { + p = p + .with_chain_spec_command(export_chain_spec_command(para_cmd)) + .chain_spec_command_is_local(true); } p.with_collator(|n| n.with_name("collator")) }) From 924575d268d18357ea877b815be286e3092dd9d5 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sat, 11 Jul 2026 16:57:44 +0100 Subject: [PATCH 11/16] Wrap long with_chain_spec_command lines for rustfmt. --- .../tests/zombie_ci/block_bundling/basic.rs | 12 +++++++++--- .../block_bundling/full_core_usage_scenarios.rs | 4 +++- .../zombie_ci/block_bundling/relay_parent_offset.rs | 4 +++- .../zombie_ci/block_bundling/runtime_upgrade.rs | 4 +++- .../zombie_ci/block_bundling/three_cores_glutton.rs | 4 +++- .../tests/zombie_ci/block_bundling/tracing_block.rs | 4 +++- .../zombienet-sdk/tests/zombie_ci/bootnodes.rs | 4 +++- .../tests/zombie_ci/collator_discovery.rs | 4 +++- .../elastic_scaling/slot_based_rp_offset.rs | 4 +++- .../zombie_ci/elastic_scaling/upgrade_to_3_cores.rs | 4 +++- .../tests/zombie_ci/full_node_catching_up.rs | 4 +++- .../zombienet-sdk/tests/zombie_ci/migrate_solo.rs | 8 ++++++-- .../parachain_runtime_upgrade_slot_duration_18s.rs | 4 +++- .../tests/zombie_ci/rpc_collator_build_blocks.rs | 4 +++- .../zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs | 4 +++- .../tests/zombie_ci/statement_store/common.rs | 2 +- .../zombienet-sdk/tests/zombie_ci/sync_blocks.rs | 4 +++- .../zombienet-sdk-tests/tests/disabling/slashing.rs | 4 +++- .../tests/elastic_scaling/basic_3cores.rs | 8 ++++++-- .../tests/elastic_scaling/doesnt_break_parachains.rs | 4 +++- .../tests/elastic_scaling/slot_based_12cores.rs | 4 +++- .../tests/elastic_scaling/slot_based_3cores.rs | 8 ++++++-- .../tests/functional/approval_voting_coalescing.rs | 4 +++- .../functional/approved_peer_mixed_validators.rs | 8 ++++++-- .../tests/functional/async_backing_6_seconds_rate.rs | 8 ++++++-- .../functional/collators_reputation_persistence.rs | 8 ++++++-- .../coretime_collation_fetching_fairness.rs | 4 +++- .../tests/functional/coretime_partitioning.rs | 8 ++++++-- .../tests/functional/coretime_shared_core.rs | 4 +++- .../tests/functional/dispute_freshly_finalized.rs | 4 +++- .../tests/functional/dispute_old_finalized.rs | 4 +++- .../tests/functional/duplicate_collations.rs | 4 +++- .../tests/functional/shared_core_idle_parachain.rs | 4 +++- .../spam_statement_distribution_requests.rs | 8 ++++++-- .../tests/functional/sync_backing.rs | 4 +++- .../tests/functional/systematic_chunk_recovery.rs | 4 +++- .../tests/functional/v3_dynamic_enablement.rs | 8 ++++++-- .../tests/functional/v3_rolling_upgrade.rs | 4 +++- .../tests/functional/validator_disabling.rs | 4 +++- .../tests/misc/malus_dispute_valid_block.rs | 4 +++- .../tests/smoke/coretime_smoke.rs | 8 ++++++-- .../tests/smoke/parachains_smoke.rs | 4 +++- .../tests/smoke/precompile_pvf_smoke.rs | 4 +++- .../transaction-pool/tests/zombienet/yap_test.rs | 8 ++++++-- 44 files changed, 169 insertions(+), 57 deletions(-) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs index a4782698bd6a..ae0eb20b0e85 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs @@ -196,7 +196,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") @@ -219,7 +221,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(HRMP_RECIPIENT_LOW) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("sync-backing") @@ -228,7 +232,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(HRMP_RECIPIENT_HIGH) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs index a860207b5c20..124d976ded11 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs @@ -233,7 +233,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs index 10c6085e793d..ca97fda9fe39 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs @@ -54,7 +54,9 @@ async fn block_bundling_relay_parent_offset() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2400) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs index 4886dbdf67f3..011179e9fc25 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs @@ -215,7 +215,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs index 413d46663da8..1aceb4233a9f 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs @@ -100,7 +100,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs index 8485404ad615..abb64eefee8c 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs @@ -134,7 +134,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs index 19ada2b36b78..72019f1c26d9 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs @@ -39,7 +39,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(1000) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("asset-hub-rococo-local") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs index c99c1c402a03..7e6ccb5e505e 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs @@ -117,7 +117,9 @@ async fn build_network_config() -> Result { let mut p = p .with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs index 507cf27e37d0..b5ec628e0283 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs @@ -53,7 +53,9 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any .with_parachain(|p| { p.with_id(2400) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs index 421d00b4f431..c54b870627de 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs @@ -137,7 +137,9 @@ async fn build_network_config(async_backing: bool) -> Result Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs index 02633a79951e..8036b974883d 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs @@ -130,7 +130,9 @@ async fn build_network_config() -> Result { // parachain A p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { @@ -142,7 +144,9 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) // modify genesis to produce different parachain header than for parachain A diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs index 193ffe8c8741..9d919482de1a 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs @@ -128,7 +128,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs index ea385be53f2b..5230157200bc 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs @@ -120,7 +120,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs index f69b1c43bd45..acdf0c8e3e63 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs @@ -144,7 +144,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs index f8d50aa6d657..92259ba6eb75 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs @@ -240,7 +240,7 @@ async fn launch_network( let images = zombienet_sdk::environment::get_images_from_env(); let base_dir = base_dir()?; - let config = NetworkConfigBuilder::new() + let config = NetworkConfigBuilder::new() .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs index 9ae33aa70d3c..9f9b00b6dac7 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs @@ -86,7 +86,9 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs b/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs index a43430c89ba6..d1afbd5eeab5 100644 --- a/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs +++ b/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs @@ -74,7 +74,9 @@ async fn dispute_past_session_slashing() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1337) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs index 4de4fa2b4d62..03e2c5d05307 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs @@ -51,7 +51,9 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("adder-collator") - .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "adder-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) @@ -61,7 +63,9 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("adder-collator") - .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "adder-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs index dc46d03cac41..b264b401eda3 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs @@ -56,7 +56,9 @@ async fn doesnt_break_parachains_test() -> Result<(), anyhow::Error> { // Use default, which has 6 second slot time. Also, don't use slot-based collator. p.with_id(2000) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs index fa96b1fc1196..53b9f39d9590 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs @@ -61,7 +61,9 @@ async fn slot_based_12cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2300) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-500ms") diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs index 95e0b2e631c3..87df9fbf0238 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs @@ -58,7 +58,9 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2100) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-mvp") @@ -71,7 +73,9 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2200) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs b/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs index 3f567172417a..caa2f0e5154c 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs @@ -51,7 +51,9 @@ async fn approval_voting_coalescing_test() -> Result<(), anyhow::Error> { config_builder = config_builder.with_parachain(|p| { p.with_id(para_id) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs b/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs index 21a667412213..401bb92883ed 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs @@ -72,7 +72,9 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") @@ -90,7 +92,9 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs b/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs index 698bee0005b0..2286dc5abc8c 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs @@ -48,7 +48,9 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("adder-collator") - .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "adder-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") @@ -62,7 +64,9 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs b/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs index 1701872ac508..e4da4109692b 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs @@ -93,7 +93,9 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(PARA_ID_1) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( @@ -110,7 +112,9 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(PARA_ID_2) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs index a7681f796473..1b66af3edf3d 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs @@ -186,7 +186,9 @@ fn build_network_config() -> Result { })) .with_default_image(col_image.as_str()) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_args(args) .with_collator(|n| n.with_name(&format!("collator-{para_id}"))) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs index 4a33ba0af4ba..94f6fcb989b8 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs @@ -269,7 +269,9 @@ async fn build_network_config() -> Result { p.with_id(PARA_A) .with_chain(chain_a) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_registration_strategy(zombienet_sdk::RegistrationStrategy::Manual) @@ -281,7 +283,9 @@ async fn build_network_config() -> Result { p.with_id(PARA_B) .with_chain(chain_b) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_registration_strategy(zombienet_sdk::RegistrationStrategy::Manual) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs index 61ead0eb0aad..c88173afcc9f 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs @@ -187,7 +187,9 @@ fn build_network_config(number_of_paras: u32) -> Result Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator")) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs b/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs index b55d8cf1b04a..10dacfc32957 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs @@ -92,7 +92,9 @@ async fn dispute_old_finalized() -> Result<(), anyhow::Error> { .as_str(), ) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator")) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs b/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs index 4b7b8123e06d..4fbbac46cd51 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs @@ -58,7 +58,9 @@ async fn duplicate_collations_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( diff --git a/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs b/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs index 9e3020f5d409..235486e7a49c 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs @@ -54,7 +54,9 @@ async fn shared_core_idle_parachain_test() -> Result<(), anyhow::Error> { // assign it to the para. .onboard_as_parachain(false) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs b/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs index 2247ad6e4d56..5887b1265915 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs @@ -75,7 +75,9 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( @@ -89,7 +91,9 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(2001) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "undying-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( diff --git a/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs b/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs index 6a76316f79c1..c7e1e6fa6478 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs @@ -48,7 +48,9 @@ async fn sync_backing_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2500) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("sync-backing") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs b/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs index 256c9d598fc5..9de35e80b0da 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs @@ -195,7 +195,9 @@ fn build_network_config() -> Result { })) .with_default_image(col_image.as_str()) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_args(vec![ "-lparachain=debug".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs b/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs index e6d4960d564d..0c9ebc95e247 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs @@ -77,7 +77,9 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2900) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) @@ -86,7 +88,9 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2901) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs b/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs index aa1b9ba10b81..290d534c47b3 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs @@ -74,7 +74,9 @@ async fn v3_rolling_upgrade() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(3000) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs b/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs index 0cdbfb3b00d5..b081fbcb15e5 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs @@ -71,7 +71,9 @@ async fn validator_disabling_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1000) .with_default_command("adder-collator") - .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "adder-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs b/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs index f0a040e741ea..3fd3bbb9b2a0 100644 --- a/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs +++ b/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs @@ -96,7 +96,9 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("adder-collator") - .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "adder-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_collator(|n| n.with_name("collator")) }) diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs index 64233e39aa4f..4197ff4a90af 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs @@ -142,7 +142,9 @@ fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(CORETIME_PARA_ID) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_chain("coretime-westend-local") @@ -159,7 +161,9 @@ fn build_network_config() -> Result { p.with_id(TEST_PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "test-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_collator(|n| { diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs index 45ffd80ac1f4..3ef38562d1fc 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs @@ -72,7 +72,9 @@ fn build_network_config() -> Result { p.with_id(PARA_ID) .cumulus_based(false) .with_default_command("adder-collator") - .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "adder-collator export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(col_image.as_str()) .with_collator(|n| { diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs index 051cadece13e..738b0eae40a7 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs @@ -218,7 +218,9 @@ fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_collator(|n| n.with_name("collator-2000")) diff --git a/substrate/client/transaction-pool/tests/zombienet/yap_test.rs b/substrate/client/transaction-pool/tests/zombienet/yap_test.rs index 3d78bf28b4c5..92f00ff8258c 100644 --- a/substrate/client/transaction-pool/tests/zombienet/yap_test.rs +++ b/substrate/client/transaction-pool/tests/zombienet/yap_test.rs @@ -41,7 +41,9 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -70,7 +72,9 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { // commitment for selecting the core index p.with_id(2200) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command( + "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("yap-rococo-local-2200") From 44c7da29125f3784894482346f9e556a045de4e9 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sun, 12 Jul 2026 12:35:12 +0100 Subject: [PATCH 12/16] Map export-chain-spec default chain id for test-parachain. When zombienet omits --chain, ExportChainSpecCmd defaults to "local", but test-parachain's embedded default uses the empty id (as build-spec did). --- cumulus/test/service/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cumulus/test/service/src/main.rs b/cumulus/test/service/src/main.rs index a2e38ef6a017..e55d8d9abbd3 100644 --- a/cumulus/test/service/src/main.rs +++ b/cumulus/test/service/src/main.rs @@ -37,7 +37,12 @@ fn main() -> Result<(), sc_cli::Error> { match &cli.subcommand { Some(Subcommand::ExportChainSpec(cmd)) => { - let chain_spec = cli.load_spec(&cmd.chain)?; + // Zombienet invokes `export-chain-spec --raw` without `--chain` when the parachain + // config has no `.with_chain()`. `ExportChainSpecCmd` then defaults to `"local"`, + // but this node's default spec uses an empty id (same as the old `build-spec` path + // via `SharedParams::chain_id`). + let chain_id = if cmd.chain == "local" { "" } else { cmd.chain.as_str() }; + let chain_spec = cli.load_spec(chain_id)?; cmd.run(chain_spec) }, From 590fa1fe90a6683c6b76a35581d260e29e8e1a3c Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sun, 12 Jul 2026 19:21:47 +0100 Subject: [PATCH 13/16] Drop --raw from zombienet export-chain-spec commands. Zombienet must export a plain chain-spec first so it can customize genesis (para registration, overrides) before converting to raw. Passing --raw up front skipped that step and left paras unregistered. --- .../tests/zombie_ci/block_bundling/basic.rs | 14 ++++---------- .../block_bundling/full_core_usage_scenarios.rs | 6 ++---- .../tests/zombie_ci/block_bundling/pov_recovery.rs | 4 ++-- .../block_bundling/relay_parent_offset.rs | 6 ++---- .../zombie_ci/block_bundling/runtime_upgrade.rs | 6 ++---- .../block_bundling/three_cores_glutton.rs | 6 ++---- .../zombie_ci/block_bundling/tracing_block.rs | 6 ++---- .../tests/zombie_ci/block_bundling/warp_sync.rs | 4 ++-- .../zombienet-sdk/tests/zombie_ci/bootnodes.rs | 4 ++-- .../tests/zombie_ci/collator_discovery.rs | 6 ++---- .../zombie_ci/elastic_scaling/asset_hub_westend.rs | 4 ++-- .../zombie_ci/elastic_scaling/pov_recovery.rs | 4 ++-- .../elastic_scaling/slot_based_authoring.rs | 6 +++--- .../elastic_scaling/slot_based_rp_offset.rs | 6 ++---- .../elastic_scaling/upgrade_to_3_cores.rs | 6 ++---- .../tests/zombie_ci/full_node_catching_up.rs | 6 ++---- .../zombienet-sdk/tests/zombie_ci/migrate_solo.rs | 10 +++------- .../parachain_runtime_upgrade_slot_duration_18s.rs | 6 ++---- .../zombienet-sdk/tests/zombie_ci/pov_recovery.rs | 4 ++-- .../tests/zombie_ci/rpc_collator_build_blocks.rs | 6 ++---- .../tests/zombie_ci/runtime_upgrade.rs | 6 ++---- .../tests/zombie_ci/statement_store/common.rs | 2 +- .../tests/zombie_ci/statement_store/integration.rs | 2 +- .../zombienet-sdk/tests/zombie_ci/sync_blocks.rs | 6 ++---- .../tests/disabling/slashing.rs | 4 ++-- .../tests/elastic_scaling/basic_3cores.rs | 10 +++------- .../elastic_scaling/doesnt_break_parachains.rs | 4 ++-- .../tests/elastic_scaling/slot_based_12cores.rs | 6 ++---- .../tests/elastic_scaling/slot_based_3cores.rs | 10 +++------- .../tests/functional/approval_voting_coalescing.rs | 6 ++---- .../functional/approved_peer_mixed_validators.rs | 10 +++------- .../functional/async_backing_6_seconds_rate.rs | 8 +++----- .../tests/functional/beefy_and_mmr.rs | 2 +- .../chunk_fetching_network_compatibility.rs | 4 ++-- .../functional/collators_reputation_persistence.rs | 10 +++------- .../coretime_collation_fetching_fairness.rs | 4 ++-- .../tests/functional/coretime_partitioning.rs | 6 +++--- .../tests/functional/coretime_shared_core.rs | 4 ++-- .../tests/functional/dispute_freshly_finalized.rs | 6 ++---- .../tests/functional/dispute_old_finalized.rs | 6 ++---- .../tests/functional/duplicate_collations.rs | 6 ++---- .../tests/functional/parachains_disputes.rs | 4 ++-- .../parachains_disputes_garbage_candidate.rs | 4 ++-- .../tests/functional/parachains_max_tranche0.rs | 4 ++-- .../tests/functional/parachains_pvf.rs | 4 ++-- .../tests/functional/scheduling_v3.rs | 10 +++++----- .../tests/functional/shared_core_idle_parachain.rs | 4 ++-- .../spam_statement_distribution_requests.rs | 10 +++------- .../tests/functional/sync_backing.rs | 6 ++---- .../tests/functional/systematic_chunk_recovery.rs | 4 ++-- .../tests/functional/v3_dynamic_enablement.rs | 10 +++------- .../tests/functional/v3_rolling_upgrade.rs | 6 ++---- .../tests/functional/validator_disabling.rs | 6 ++---- .../tests/misc/malus_dispute_valid_block.rs | 6 ++---- .../zombienet-sdk-tests/tests/misc/paritydb.rs | 4 ++-- .../tests/parachains/weights.rs | 4 ++-- .../tests/smoke/coretime_revenue.rs | 4 ++-- .../tests/smoke/coretime_smoke.rs | 8 +++----- .../tests/smoke/deregister_register_validator.rs | 2 +- .../tests/smoke/parachains_smoke.rs | 6 ++---- .../tests/smoke/precompile_pvf_smoke.rs | 4 ++-- .../transaction-pool/tests/zombienet/yap_test.rs | 6 ++---- .../tests/zombie_ci/block_building.rs | 2 +- templates/zombienet/tests/smoke.rs | 2 +- 64 files changed, 138 insertions(+), 224 deletions(-) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs index ae0eb20b0e85..1d45c0c030ce 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/basic.rs @@ -163,7 +163,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -196,9 +196,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") @@ -221,9 +219,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(HRMP_RECIPIENT_LOW) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("sync-backing") @@ -232,9 +228,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(HRMP_RECIPIENT_HIGH) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs index 124d976ded11..36ba54f49428 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/full_core_usage_scenarios.rs @@ -208,7 +208,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -233,9 +233,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs index 35572d6b1e67..b3db9682663d 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/pov_recovery.rs @@ -112,7 +112,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_resources(|resources| { @@ -155,7 +155,7 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_chain("block-bundling") .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_resources(|resources| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs index ca97fda9fe39..ffbd4ffce4e1 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/relay_parent_offset.rs @@ -28,7 +28,7 @@ async fn block_bundling_relay_parent_offset() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -54,9 +54,7 @@ async fn block_bundling_relay_parent_offset() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2400) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs index 011179e9fc25..494c8f8258b0 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/runtime_upgrade.rs @@ -190,7 +190,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -215,9 +215,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs index 1aceb4233a9f..196e3bb1b32b 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/three_cores_glutton.rs @@ -75,7 +75,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -100,9 +100,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs index abb64eefee8c..97e4348e853a 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/tracing_block.rs @@ -105,7 +105,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -134,9 +134,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs index 5451a3108f51..812fb1d65bdd 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/block_bundling/warp_sync.rs @@ -129,7 +129,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -154,7 +154,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("block-bundling") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs index 72019f1c26d9..e140a4f04259 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/bootnodes.rs @@ -23,7 +23,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) // Not strictly necessary for the test, but to keep it consistent @@ -40,7 +40,7 @@ async fn build_network_config() -> Result { p.with_id(1000) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs index 7e6ccb5e505e..f1946e7d6bd7 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/collator_discovery.rs @@ -91,7 +91,7 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -117,9 +117,7 @@ async fn build_network_config() -> Result { let mut p = p .with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs index 68dfe2fd3a59..55958ec43908 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/asset_hub_westend.rs @@ -26,7 +26,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=trace").into()]) @@ -55,7 +55,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("asset-hub-westend-local") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs index 6490cba63a05..2cb3b12e0afa 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/pov_recovery.rs @@ -116,7 +116,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_resources(|resources| { @@ -159,7 +159,7 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_chain("elastic-scaling") .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_resources(|resources| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs index a9d6a708e907..6e79500d753c 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_authoring.rs @@ -93,7 +93,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_genesis_overrides(json!({ @@ -125,7 +125,7 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID_1) .with_chain("elastic-scaling") .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| @@ -139,7 +139,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID_2) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs index b5ec628e0283..bd479c29b2bb 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/slot_based_rp_offset.rs @@ -26,7 +26,7 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -53,9 +53,7 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any .with_parachain(|p| { p.with_id(2400) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("relay-parent-offset") diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs index c54b870627de..456b97928d7e 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/elastic_scaling/upgrade_to_3_cores.rs @@ -126,7 +126,7 @@ async fn build_network_config(async_backing: bool) -> Result Result Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -87,9 +87,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs index 8036b974883d..87f8a1b88ce4 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/migrate_solo.rs @@ -119,7 +119,7 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -130,9 +130,7 @@ async fn build_network_config() -> Result { // parachain A p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { @@ -144,9 +142,7 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) // modify genesis to produce different parachain header than for parachain A diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs index 9d919482de1a..090be7584717 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/parachain_runtime_upgrade_slot_duration_18s.rs @@ -114,7 +114,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -128,9 +128,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs index 56e19443181a..806529130e6c 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/pov_recovery.rs @@ -140,7 +140,7 @@ async fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_genesis_overrides(json!({ @@ -173,7 +173,7 @@ async fn build_network_config() -> Result { p.with_id(PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|c| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs index 5230157200bc..620bfc58b7e3 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/rpc_collator_build_blocks.rs @@ -106,7 +106,7 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -120,9 +120,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![ diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs index acdf0c8e3e63..76e2a7efc0a0 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/runtime_upgrade.rs @@ -127,7 +127,7 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -144,9 +144,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_collator(|n| { diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs index 92259ba6eb75..3605d183a30b 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/common.rs @@ -244,7 +244,7 @@ async fn launch_network( .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs index 359a458c319c..e42e63d137e8 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store/integration.rs @@ -233,7 +233,7 @@ async fn spawn_flooding_network( .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) diff --git a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs index 9f9b00b6dac7..03f5f1d0a5f7 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/zombie_ci/sync_blocks.rs @@ -71,7 +71,7 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -86,9 +86,7 @@ async fn build_network_config() -> Result { .with_parachain(|p| { p.with_id(PARA_ID) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs b/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs index d1afbd5eeab5..c8db80866ff6 100644 --- a/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs +++ b/polkadot/zombienet-sdk-tests/tests/disabling/slashing.rs @@ -32,7 +32,7 @@ async fn dispute_past_session_slashing() -> Result<(), anyhow::Error> { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ @@ -75,7 +75,7 @@ async fn dispute_past_session_slashing() -> Result<(), anyhow::Error> { p.with_id(1337) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs index 03e2c5d05307..97ac296c0602 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/basic_3cores.rs @@ -26,7 +26,7 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -51,9 +51,7 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("adder-collator") - .with_chain_spec_command( - "adder-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) @@ -63,9 +61,7 @@ async fn basic_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("adder-collator") - .with_chain_spec_command( - "adder-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs index b264b401eda3..eac7397a7108 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/doesnt_break_parachains.rs @@ -30,7 +30,7 @@ async fn doesnt_break_parachains_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -57,7 +57,7 @@ async fn doesnt_break_parachains_test() -> Result<(), anyhow::Error> { p.with_id(2000) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs index 53b9f39d9590..1b6dd2fc7095 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_12cores.rs @@ -32,7 +32,7 @@ async fn slot_based_12cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -61,9 +61,7 @@ async fn slot_based_12cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2300) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-500ms") diff --git a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs index 87df9fbf0238..c570cd9f15b5 100644 --- a/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs +++ b/polkadot/zombienet-sdk-tests/tests/elastic_scaling/slot_based_3cores.rs @@ -29,7 +29,7 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -58,9 +58,7 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2100) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-mvp") @@ -73,9 +71,7 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2200) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs b/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs index caa2f0e5154c..e9b1875d28b2 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/approval_voting_coalescing.rs @@ -24,7 +24,7 @@ async fn approval_voting_coalescing_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug").into()]) @@ -51,9 +51,7 @@ async fn approval_voting_coalescing_test() -> Result<(), anyhow::Error> { config_builder = config_builder.with_parachain(|p| { p.with_id(para_id) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs b/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs index 401bb92883ed..8418ebb6a72c 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/approved_peer_mixed_validators.rs @@ -31,7 +31,7 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -72,9 +72,7 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") @@ -92,9 +90,7 @@ async fn approved_peer_mixed_validators_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2001) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs b/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs index 2286dc5abc8c..d4c023b72eff 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/async_backing_6_seconds_rate.rs @@ -26,7 +26,7 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -48,9 +48,7 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("adder-collator") - .with_chain_spec_command( - "adder-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") @@ -65,7 +63,7 @@ async fn async_backing_6_seconds_rate_test() -> Result<(), anyhow::Error> { p.with_id(2001) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs b/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs index c054cd2483b5..8dd45e2be29f 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/beefy_and_mmr.rs @@ -230,7 +230,7 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs b/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs index c26267cd9973..edd2a2093da5 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/chunk_fetching_network_compatibility.rs @@ -122,7 +122,7 @@ fn build_network_config() -> Result { r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) @@ -181,7 +181,7 @@ fn build_network_config() -> Result { // still check the collator signatures. .with_default_command(format!("polkadot-parachain{old_suffix}").as_str()) .with_chain_spec_command( - format!("polkadot-parachain{old_suffix} export-chain-spec --chain {{{{chainName}}}} --raw") + format!("polkadot-parachain{old_suffix} export-chain-spec --chain {{{{chainName}}}}") .as_str(), ) .chain_spec_command_is_local(true) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs b/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs index e4da4109692b..fc67fdbce6f7 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/collators_reputation_persistence.rs @@ -65,7 +65,7 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ @@ -93,9 +93,7 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(PARA_ID_1) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( @@ -112,9 +110,7 @@ async fn comprehensive_reputation_persistence_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(PARA_ID_2) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs index 1b66af3edf3d..cbb0b3fdc5a4 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_collation_fetching_fairness.rs @@ -136,7 +136,7 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) @@ -187,7 +187,7 @@ fn build_network_config() -> Result { .with_default_image(col_image.as_str()) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_args(args) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs index 94f6fcb989b8..c7efd8172e08 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_partitioning.rs @@ -241,7 +241,7 @@ async fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ @@ -270,7 +270,7 @@ async fn build_network_config() -> Result { .with_chain(chain_a) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) @@ -284,7 +284,7 @@ async fn build_network_config() -> Result { .with_chain(chain_b) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs b/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs index c88173afcc9f..efbb991a28c2 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/coretime_shared_core.rs @@ -138,7 +138,7 @@ fn build_network_config(number_of_paras: u32) -> Result Result Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -168,9 +168,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator")) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs b/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs index 10dacfc32957..784188497a89 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/dispute_old_finalized.rs @@ -34,7 +34,7 @@ async fn dispute_old_finalized() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -92,9 +92,7 @@ async fn dispute_old_finalized() -> Result<(), anyhow::Error> { .as_str(), ) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec!["-lparachain=debug".into()]) .with_collator(|n| n.with_name("collator")) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs b/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs index 4fbbac46cd51..cbcbf332a7c9 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/duplicate_collations.rs @@ -31,7 +31,7 @@ async fn duplicate_collations_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -58,9 +58,7 @@ async fn duplicate_collations_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs index f58ecd7ef1d4..26bc9f800877 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes.rs @@ -146,7 +146,7 @@ fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) @@ -211,7 +211,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs index 80d84cb9518b..0a4ef2650bc3 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_disputes_garbage_candidate.rs @@ -164,7 +164,7 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) @@ -208,7 +208,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs index 3f731c43a3f6..9a6d69a629ec 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_max_tranche0.rs @@ -94,7 +94,7 @@ fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) @@ -140,7 +140,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs b/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs index 3c85eb7fe9ca..9caaa8fcb01f 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/parachains_pvf.rs @@ -132,7 +132,7 @@ fn build_network_config() -> Result { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) @@ -159,7 +159,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs b/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs index f138d0324cb1..889eb0633b5a 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/scheduling_v3.rs @@ -62,7 +62,7 @@ async fn scheduling_v2_and_v3_collator_with_v3_validators( let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug,parachain::candidate-backing=debug,parachain::provisioner=debug,parachain::prospective-parachains=debug,runtime::parachains::scheduler=debug,parachain::collator-protocol=debug,basic-authorship=debug,parachain::statement-distribution=debug").into()]) @@ -96,7 +96,7 @@ async fn scheduling_v2_and_v3_collator_with_v3_validators( .with_parachain(|p| { p.with_id(2700) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain(parachain) @@ -110,7 +110,7 @@ async fn scheduling_v2_and_v3_collator_with_v3_validators( .with_parachain(|p| { p.with_id(2500) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") @@ -213,7 +213,7 @@ async fn scheduling_v3_es_collator_with_v3_validators() -> Result<(), anyhow::Er let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug,parachain::candidate-backing=debug,parachain::provisioner=debug,parachain::prospective-parachains=debug,runtime::parachains::scheduler=debug,parachain::collator-protocol=debug,basic-authorship=debug,parachain::statement-distribution=debug").into()]) @@ -247,7 +247,7 @@ async fn scheduling_v3_es_collator_with_v3_validators() -> Result<(), anyhow::Er .with_parachain(|p| { p.with_id(2800) .with_default_command("test-parachain") - .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling-v3") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs b/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs index 235486e7a49c..6eba586a444d 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/shared_core_idle_parachain.rs @@ -28,7 +28,7 @@ async fn shared_core_idle_parachain_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -55,7 +55,7 @@ async fn shared_core_idle_parachain_test() -> Result<(), anyhow::Error> { .onboard_as_parachain(false) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs b/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs index 5887b1265915..8b1d73109122 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/spam_statement_distribution_requests.rs @@ -27,7 +27,7 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![ @@ -75,9 +75,7 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(2000) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( @@ -91,9 +89,7 @@ async fn spam_statement_distribution_requests_test() -> Result<(), anyhow::Error .with_parachain(|p| { p.with_id(2001) .with_default_command("undying-collator") - .with_chain_spec_command( - "undying-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image( diff --git a/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs b/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs index c7e1e6fa6478..fd9cd0c9c2c7 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs @@ -26,7 +26,7 @@ async fn sync_backing_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -48,9 +48,7 @@ async fn sync_backing_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2500) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("sync-backing") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs b/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs index 9de35e80b0da..a65a22676558 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/systematic_chunk_recovery.rs @@ -148,7 +148,7 @@ fn build_network_config() -> Result { r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug,runtime=debug".into()]) @@ -196,7 +196,7 @@ fn build_network_config() -> Result { .with_default_image(col_image.as_str()) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_args(vec![ diff --git a/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs b/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs index 0c9ebc95e247..54dd2098523f 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/v3_dynamic_enablement.rs @@ -38,7 +38,7 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug").into()]) @@ -77,9 +77,7 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2900) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_default_args(vec![("-lparachain=debug,aura=debug").into()]) @@ -88,9 +86,7 @@ async fn v3_dynamic_enablement_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(2901) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("elastic-scaling") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs b/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs index 290d534c47b3..6729dba7f91c 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/v3_rolling_upgrade.rs @@ -43,7 +43,7 @@ async fn v3_rolling_upgrade() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug,runtime=debug").into()]) @@ -74,9 +74,7 @@ async fn v3_rolling_upgrade() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(3000) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("async-backing") diff --git a/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs b/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs index b081fbcb15e5..4540d8543bfc 100644 --- a/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs +++ b/polkadot/zombienet-sdk-tests/tests/functional/validator_disabling.rs @@ -25,7 +25,7 @@ async fn validator_disabling_test() -> Result<(), anyhow::Error> { let r = r .with_chain("westend-local") // Use westend-local so the disabling can take effect. .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -71,9 +71,7 @@ async fn validator_disabling_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1000) .with_default_command("adder-collator") - .with_chain_spec_command( - "adder-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .cumulus_based(false) .with_default_image(images.cumulus.as_str()) diff --git a/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs b/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs index 3fd3bbb9b2a0..f3693715511d 100644 --- a/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs +++ b/polkadot/zombienet-sdk-tests/tests/misc/malus_dispute_valid_block.rs @@ -68,7 +68,7 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec!["-lparachain=debug".into()]) @@ -96,9 +96,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("adder-collator") - .with_chain_spec_command( - "adder-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_collator(|n| n.with_name("collator")) }) diff --git a/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs b/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs index 969c28427539..d8e099280830 100644 --- a/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs +++ b/polkadot/zombienet-sdk-tests/tests/misc/paritydb.rs @@ -100,7 +100,7 @@ fn build_network_config() -> Result { let mut builder = NetworkConfigBuilder::new().with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![ @@ -137,7 +137,7 @@ fn build_network_config() -> Result { .cumulus_based(false) .with_default_image(col_image.as_str()) .with_default_command("undying-collator") - .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("undying-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(vec![ "-lruntime=debug,parachain=trace".into(), diff --git a/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs b/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs index 784f3fc350a3..740b12221872 100644 --- a/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs +++ b/polkadot/zombienet-sdk-tests/tests/parachains/weights.rs @@ -159,7 +159,7 @@ async fn setup_network() -> Result, anyhow::Error> { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -170,7 +170,7 @@ async fn setup_network() -> Result, anyhow::Error> { .with_parachain(|p| { p.with_id(2000) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image( std::env::var("COL_IMAGE") diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs index ea9af8ff7d3a..adef3bb0b0f3 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_revenue.rs @@ -233,7 +233,7 @@ async fn coretime_revenue_test() -> Result<(), anyhow::Error> { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_genesis_overrides( @@ -246,7 +246,7 @@ async fn coretime_revenue_test() -> Result<(), anyhow::Error> { .with_parachain(|p| { p.with_id(1005) .with_default_command("polkadot-parachain") - .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) .with_chain("coretime-westend-local") diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs index 4197ff4a90af..8c83b067f810 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/coretime_smoke.rs @@ -124,7 +124,7 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("westend-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_validator(|node| { @@ -143,7 +143,7 @@ fn build_network_config() -> Result { p.with_id(CORETIME_PARA_ID) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) @@ -161,9 +161,7 @@ fn build_network_config() -> Result { p.with_id(TEST_PARA_ID) .with_registration_strategy(RegistrationStrategy::Manual) .with_default_command("test-parachain") - .with_chain_spec_command( - "test-parachain export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("test-parachain export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) .with_collator(|n| { diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs b/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs index 118869066cbf..46c3a3d226a1 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/deregister_register_validator.rs @@ -137,7 +137,7 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![("-lruntime=debug,parachain=trace").into()]) diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs index 3ef38562d1fc..6f2d721b1616 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/parachains_smoke.rs @@ -56,7 +56,7 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_validator(|node| { @@ -72,9 +72,7 @@ fn build_network_config() -> Result { p.with_id(PARA_ID) .cumulus_based(false) .with_default_command("adder-collator") - .with_chain_spec_command( - "adder-collator export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("adder-collator export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(col_image.as_str()) .with_collator(|n| { diff --git a/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs b/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs index 738b0eae40a7..82f4626855f2 100644 --- a/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs +++ b/polkadot/zombienet-sdk-tests/tests/smoke/precompile_pvf_smoke.rs @@ -206,7 +206,7 @@ fn build_network_config() -> Result { .with_relaychain(|r| { r.with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(polkadot_image.as_str()) .with_default_args(vec![("-lruntime=debug,parachain=trace").into()]) @@ -219,7 +219,7 @@ fn build_network_config() -> Result { p.with_id(PARA_ID) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(cumulus_image.as_str()) diff --git a/substrate/client/transaction-pool/tests/zombienet/yap_test.rs b/substrate/client/transaction-pool/tests/zombienet/yap_test.rs index 92f00ff8258c..d1acfe8a64ba 100644 --- a/substrate/client/transaction-pool/tests/zombienet/yap_test.rs +++ b/substrate/client/transaction-pool/tests/zombienet/yap_test.rs @@ -41,9 +41,7 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { let r = r .with_chain("rococo-local") .with_default_command("polkadot") - .with_chain_spec_command( - "polkadot export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("polkadot export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_image(images.polkadot.as_str()) .with_default_args(vec![("-lparachain=debug").into()]) @@ -73,7 +71,7 @@ async fn slot_based_3cores_test() -> Result<(), anyhow::Error> { p.with_id(2200) .with_default_command("polkadot-parachain") .with_chain_spec_command( - "polkadot-parachain export-chain-spec --chain {{chainName}} --raw", + "polkadot-parachain export-chain-spec --chain {{chainName}}", ) .chain_spec_command_is_local(true) .with_default_image(images.cumulus.as_str()) diff --git a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs index c1c9478aa2d1..051bbfeebb6e 100644 --- a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs +++ b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs @@ -81,7 +81,7 @@ fn build_network_config() -> Result { .with_chain("local") .with_default_command("substrate") .with_default_image(integration_image.as_str()) - .with_chain_spec_command("substrate export-chain-spec --chain {{chainName}} --raw") + .with_chain_spec_command("substrate export-chain-spec --chain {{chainName}}") .chain_spec_command_is_local(true) .with_default_args(default_args) .with_validator(|node| node.with_name("alice")) diff --git a/templates/zombienet/tests/smoke.rs b/templates/zombienet/tests/smoke.rs index 206132fb8cc5..48641ea5a711 100644 --- a/templates/zombienet/tests/smoke.rs +++ b/templates/zombienet/tests/smoke.rs @@ -53,7 +53,7 @@ mod smoke { } fn export_chain_spec_command(binary: &str) -> String { - format!("{binary} export-chain-spec --chain {{{{chainName}}}} --raw") + format!("{binary} export-chain-spec --chain {{{{chainName}}}}") } fn get_config(network_spec: NetworkSpec) -> Result { From 3d529bf42652720d57ebe46fa4d079b907b65363 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sun, 12 Jul 2026 21:20:21 +0100 Subject: [PATCH 14/16] Fix remaining zombienet export-chain-spec CI failures. Map omni-node's default "local" chain id to the empty default used by build-spec, and restore --raw for the substrate-only block_building test. --- cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs | 7 ++++++- .../zombienet-sdk/tests/zombie_ci/block_building.rs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs b/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs index 9ceab8abf987..9a729d5da9cd 100644 --- a/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs +++ b/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs @@ -125,7 +125,12 @@ impl ExtraSubcommand for DefaultExtraSubcommands { fn handle(self, cfg: &RunConfig) -> Result<()> { match self { DefaultExtraSubcommands::ExportChainSpec(cmd) => { - let spec = cfg.chain_spec_loader.load_spec(&cmd.chain)?; + // Zombienet invokes `export-chain-spec` without `--chain` when the parachain + // config has no `.with_chain()`. `ExportChainSpecCmd` then defaults to `"local"`, + // but omni-node loaders use an empty id for the default embedded spec (same as the + // old `build-spec` path via `SharedParams::chain_id`). + let chain_id = if cmd.chain == "local" { "" } else { cmd.chain.as_str() }; + let spec = cfg.chain_spec_loader.load_spec(chain_id)?; cmd.run(spec)?; }, } diff --git a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs index 051bbfeebb6e..afcdce96cabb 100644 --- a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs +++ b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs @@ -81,7 +81,12 @@ fn build_network_config() -> Result { .with_chain("local") .with_default_command("substrate") .with_default_image(integration_image.as_str()) - .with_chain_spec_command("substrate export-chain-spec --chain {{chainName}}") + // `--raw` is required here: kitchensink's plain genesis cannot be converted via + // zombienet's GenericChainSpec path (missing `mixnet`). This is a substrate-only + // network, so skipping plain-spec customization is fine. + .with_chain_spec_command( + "substrate export-chain-spec --chain {{chainName}} --raw", + ) .chain_spec_command_is_local(true) .with_default_args(default_args) .with_validator(|node| node.with_name("alice")) From 826e2a2c0ad703f427e993343c5aa9086ec340fe Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sun, 12 Jul 2026 22:12:19 +0100 Subject: [PATCH 15/16] Default export-chain-spec --chain to empty id. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match SharedParams/build-spec when --chain is omitted, and drop the temporary local→empty remaps in test-parachain and omni-node. --- cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs | 7 +------ cumulus/test/service/src/main.rs | 7 +------ substrate/client/cli/src/commands/export_chain_spec_cmd.rs | 5 ++++- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs b/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs index 9a729d5da9cd..9ceab8abf987 100644 --- a/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs +++ b/cumulus/polkadot-omni-node/lib/src/extra_subcommand.rs @@ -125,12 +125,7 @@ impl ExtraSubcommand for DefaultExtraSubcommands { fn handle(self, cfg: &RunConfig) -> Result<()> { match self { DefaultExtraSubcommands::ExportChainSpec(cmd) => { - // Zombienet invokes `export-chain-spec` without `--chain` when the parachain - // config has no `.with_chain()`. `ExportChainSpecCmd` then defaults to `"local"`, - // but omni-node loaders use an empty id for the default embedded spec (same as the - // old `build-spec` path via `SharedParams::chain_id`). - let chain_id = if cmd.chain == "local" { "" } else { cmd.chain.as_str() }; - let spec = cfg.chain_spec_loader.load_spec(chain_id)?; + let spec = cfg.chain_spec_loader.load_spec(&cmd.chain)?; cmd.run(spec)?; }, } diff --git a/cumulus/test/service/src/main.rs b/cumulus/test/service/src/main.rs index e55d8d9abbd3..a2e38ef6a017 100644 --- a/cumulus/test/service/src/main.rs +++ b/cumulus/test/service/src/main.rs @@ -37,12 +37,7 @@ fn main() -> Result<(), sc_cli::Error> { match &cli.subcommand { Some(Subcommand::ExportChainSpec(cmd)) => { - // Zombienet invokes `export-chain-spec --raw` without `--chain` when the parachain - // config has no `.with_chain()`. `ExportChainSpecCmd` then defaults to `"local"`, - // but this node's default spec uses an empty id (same as the old `build-spec` path - // via `SharedParams::chain_id`). - let chain_id = if cmd.chain == "local" { "" } else { cmd.chain.as_str() }; - let chain_spec = cli.load_spec(chain_id)?; + let chain_spec = cli.load_spec(&cmd.chain)?; cmd.run(chain_spec) }, diff --git a/substrate/client/cli/src/commands/export_chain_spec_cmd.rs b/substrate/client/cli/src/commands/export_chain_spec_cmd.rs index 2820b86a32c0..88ad7615aa40 100644 --- a/substrate/client/cli/src/commands/export_chain_spec_cmd.rs +++ b/substrate/client/cli/src/commands/export_chain_spec_cmd.rs @@ -34,7 +34,10 @@ use std::{ #[derive(Debug, Clone, Parser)] pub struct ExportChainSpecCmd { /// The chain spec identifier to export. - #[arg(long, default_value = "local")] + /// + /// Defaults to the empty id, matching [`crate::SharedParams::chain_id`] / the old + /// `build-spec` behaviour when `--chain` is omitted. + #[arg(long, default_value = "")] pub chain: String, /// `chain-spec` JSON file path. If omitted, prints to stdout. From 37ad680cef9bc111eb5e7c659632075ece598695 Mon Sep 17 00:00:00 2001 From: nasihudeen04 Date: Sun, 12 Jul 2026 22:19:31 +0100 Subject: [PATCH 16/16] Format block_building chain_spec_command for rustfmt. --- .../zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs index afcdce96cabb..94e65776b507 100644 --- a/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs +++ b/substrate/zombienet/zombienet-sdk/tests/zombie_ci/block_building.rs @@ -84,9 +84,7 @@ fn build_network_config() -> Result { // `--raw` is required here: kitchensink's plain genesis cannot be converted via // zombienet's GenericChainSpec path (missing `mixnet`). This is a substrate-only // network, so skipping plain-spec customization is fine. - .with_chain_spec_command( - "substrate export-chain-spec --chain {{chainName}} --raw", - ) + .with_chain_spec_command("substrate export-chain-spec --chain {{chainName}} --raw") .chain_spec_command_is_local(true) .with_default_args(default_args) .with_validator(|node| node.with_name("alice"))