Skip to content

Commit

Permalink
Merge branch 'nik-make-cumulus-based-true-by-default' of github.com:p…
Browse files Browse the repository at this point in the history
…aritytech/zombienet into nik-make-cumulus-based-true-by-default
  • Loading branch information
wirednkod committed Feb 23, 2023
2 parents 8c73687 + 3687ea2 commit 6252e81
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
6 changes: 3 additions & 3 deletions javascript/packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zombienet/cli",
"version": "1.3.34",
"version": "1.3.35",
"description": "ZombieNet aim to be a testing framework for substrate based blockchains, providing a simple cli tool that allow users to spawn and test ephemeral Substrate based networks",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -53,8 +53,8 @@
},
"dependencies": {
"@zombienet/dsl-parser-wrapper": "^0.1.7",
"@zombienet/orchestrator": "^0.0.25",
"@zombienet/utils": "^0.0.14",
"@zombienet/orchestrator": "^0.0.26",
"@zombienet/utils": "^0.0.15",
"axios": "^0.27.2",
"commander": "^10.0.0",
"debug": "^4.3.2",
Expand Down
4 changes: 2 additions & 2 deletions javascript/packages/orchestrator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zombienet/orchestrator",
"version": "0.0.25",
"version": "0.0.26",
"description": "ZombieNet aim to be a testing framework for substrate based blockchains, providing a simple cli tool that allow users to spawn and test ephemeral Substrate based networks",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -36,7 +36,7 @@
"@polkadot/api": "^9.2.4",
"@polkadot/keyring": "^10.1.6",
"@polkadot/util-crypto": "^10.1.6",
"@zombienet/utils": "^0.0.14",
"@zombienet/utils": "^0.0.15",
"axios": "^0.27.2",
"chai": "^4.3.4",
"debug": "^4.3.2",
Expand Down
12 changes: 11 additions & 1 deletion javascript/packages/orchestrator/src/configGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
DEFAULT_WASM_GENERATE_SUBCOMMAND,
GENESIS_STATE_FILENAME,
GENESIS_WASM_FILENAME,
UNDYING_COLLATOR_BIN,
ZOMBIE_WRAPPER,
} from "./constants";
import { generateKeyForNode } from "./keys";
Expand Down Expand Up @@ -350,11 +351,20 @@ export async function generateNetworkSpec(
computedWasmCommand += ` > {{CLIENT_REMOTE_DIR}}/${GENESIS_WASM_FILENAME}`;
}

// IF is defined use that value
// else check if the command is one off undying/adder otherwise true
const isCumulusBased =
parachain.cumulus_based !== undefined
? parachain.cumulus_based
: ![DEFAULT_ADDER_COLLATOR_BIN, UNDYING_COLLATOR_BIN].includes(
collators[0].command!,
);

let parachainSetup: Parachain = {
id: parachain.id,
name: getUniqueName(parachain.id.toString()),
para,
cumulusBased: parachain.cumulus_based || true,
cumulusBased: isCumulusBased,
addToGenesis:
parachain.add_to_genesis === undefined
? true
Expand Down
2 changes: 2 additions & 0 deletions javascript/packages/orchestrator/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const DEFAULT_CHAIN_SPEC_COMMAND =
const DEFAULT_GENESIS_GENERATE_SUBCOMMAND = "export-genesis-state";
const DEFAULT_WASM_GENERATE_SUBCOMMAND = "export-genesis-wasm";
const DEFAULT_ADDER_COLLATOR_BIN = "adder-collator";
const UNDYING_COLLATOR_BIN = "undying-collator";
const DEFAULT_CUMULUS_COLLATOR_BIN = "polkadot-parachain";
const DEFAULT_COLLATOR_IMAGE = "paritypr/colander:4131-e5c7e975";
const DEFAULT_MAX_NOMINATIONS = 24; // kusama value is 24
Expand Down Expand Up @@ -150,4 +151,5 @@ export {
DEV_ACCOUNTS,
DEFAULT_BALANCE,
ARGS_TO_REMOVE,
UNDYING_COLLATOR_BIN,
};
2 changes: 1 addition & 1 deletion javascript/packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zombienet/utils",
"version": "0.0.14",
"version": "0.0.15",
"description": "Useful utilities for ZombieNet Framework",
"main": "dist/index.js",
"author": "Parity Technologies <admin@parity.io>",
Expand Down

0 comments on commit 6252e81

Please sign in to comment.