diff --git a/README.md b/README.md index 17bb736..942a9e9 100644 --- a/README.md +++ b/README.md @@ -114,13 +114,13 @@ To use the Polkadot-kurtosis-package, you need to create a configuration file sp "nodes": [ { "name": "alice", - "node-type": "validator", + "node_type": "validator", "port": 9944, "prometheus": false }, { "name": "bob", - "node-type": "full", + "node_type": "full", "port": 9945, "prometheus": false } @@ -132,12 +132,12 @@ To use the Polkadot-kurtosis-package, you need to create a configuration file sp "nodes": [ { "name": "alice", - "node-type": "validator", + "node_type": "validator", "prometheus": false }, { "name": "bob", - "node-type": "full", + "node_type": "full", "prometheus": false } ] @@ -158,14 +158,14 @@ To use the Polkadot-kurtosis-package, you need to create a configuration file sp - **name:** Name of the relay chain (e.g., "rococo-local", "rococo", "polkadot" or "kusama"). - **nodes:** List of nodes on the relay chain, each with: - **name:** Node name (e.g., "alice"). - - **node-type:** Node type, can be "validator" or "full". + - **node_type:** Node type, can be "validator" or "full". - **port:** Port number for the node (e.g., 9944). - **prometheus:** Whether Prometheus monitoring is enabled (true/false). - **para:** List of parachains, each with: - **name:** Parachain name (e.g., "kilt"). - **nodes:** List of nodes on the parachain, similar to relay chain nodes. - **name:** Node name (e.g., "alice"). - - **node-type:** Node type, can be "callator" or "full". + - **node_type:** Node type, can be "callator" or "full". - **prometheus:** Whether Prometheus monitoring is enabled (true/false). - **chopstick:** Configuration for Chopstick integration. - **xcm:** Whether XCM (Cross-Chain Messaging) is enabled (true/false). diff --git a/local.json b/local.json index 4cae165..f8d0499 100644 --- a/local.json +++ b/local.json @@ -5,12 +5,12 @@ "nodes": [ { "name": "alice", - "node-type": "validator", + "node_type": "validator", "prometheus": false }, { "name": "bob", - "node-type": "full", + "node_type": "full", "prometheus": true } @@ -23,13 +23,13 @@ "nodes": [ { "name": "alice", - "node-type": "validator", + "node_type": "validator", "prometheus": false }, { "name": "bob", - "node-type": "full", + "node_type": "full", "prometheus": true } ] diff --git a/package_io/utils.star b/package_io/utils.star index f34035f..421e6e3 100644 --- a/package_io/utils.star +++ b/package_io/utils.star @@ -87,19 +87,19 @@ def check_config_validity(plan, chain_type, relaychain, parachains): if len(relaychain) != 0: for node in relay_nodes: if len(node) != 0: - if node["node-type"] in ["validator", "full", "archive"]: + if node["node_type"] in ["validator", "full", "archive"]: plan.print("config for relaynodes is valid") else: - return fail("relaychain node-type can be only validator/full") + return fail("relaychain node_type can be only validator/full") if len(parachains) != 0: for para in parachains: if len(para["nodes"]) != 0: for node in para["nodes"]: - if node["node-type"] in ["validator", "full", "collator"]: + if node["node_type"] in ["validator", "full", "collator"]: plan.print("config for parachain is valid") else: - return fail("parachain node-type can be only validator/full/collator") + return fail("parachain node_type can be only validator/full/collator") def upload_files(plan): plan.upload_files(src = "../parachain/static_files/configs", name = "configs") @@ -111,13 +111,13 @@ def convert_to_lowercase(chain_type, relaychain, parachains): relaychain["name"] = relaychain["name"].lower() for node in relaychain["nodes"]: node["name"] = node["name"].lower() - node["node-type"] = node["node-type"].lower() + node["node_type"] = node["node_type"].lower() for para in parachains: para["name"] = para["name"].lower() for node in para["nodes"]: node["name"] = node["name"].lower() - node["node-type"] = node["node-type"].lower() + node["node_type"] = node["node_type"].lower() return chain_type, relaychain, parachains \ No newline at end of file diff --git a/parachain/parachain.star b/parachain/parachain.star index 441826a..50c5702 100644 --- a/parachain/parachain.star +++ b/parachain/parachain.star @@ -57,7 +57,7 @@ def start_local_parachain_node(plan, chain_type, parachain, para_id): parachain_detail["endpoint"] = utils.get_service_url("ws", parachain_spawn_detail.ip_address, parachain_spawn_detail.ports["ws"].number) parachain_detail["ip_address"] = parachain_spawn_detail.ip_address parachain_detail["prometheus"] = node["prometheus"] - parachain_detail["node-type"] = node["node-type"] + parachain_detail["node_type"] = node["node_type"] if node["prometheus"] == True: parachain_detail["prometheus_port"] = parachain_spawn_detail.ports["metrics"].number if prometheus_port != None: @@ -171,10 +171,10 @@ def run_testnet_mainnet(plan, chain_type, relaychain_name, parachain): command = common_command command = command + ["--name={0}".format(node["name"])] - if node["node-type"] == "collator": + if node["node_type"] == "collator": command = command + ["--collator"] - if node["node-type"] == "validator": + if node["node_type"] == "validator": command = command + ["--validator"] if parachain["name"] in constant.CHAIN_COMMAND: @@ -192,7 +192,7 @@ def run_testnet_mainnet(plan, chain_type, relaychain_name, parachain): node_info["endpoint"] = utils.get_service_url("ws", node_details.ip_address, node_details.ports["ws"].number) node_info["ip_address"] = node_details.ip_address node_info["prometheus"] = node["prometheus"] - node_info["node-type"] = node["node-type"] + node_info["node_type"] = node["node_type"] if node["prometheus"] == True: node_info["prometheus_port"] = node_details.ports["metrics"].number if prometheus_port != None: @@ -210,7 +210,7 @@ def run_testnet_mainnet(plan, chain_type, relaychain_name, parachain): node_info["endpoint"] = utils.get_service_url("ws", node_details.ip_address, node_details.ports["ws"].number) node_info["ip_address"] = node_details.ip_address node_info["prometheus"] = node["prometheus"] - node_info["node-type"] = node["node-type"] + node_info["node_type"] = node["node_type"] if node["prometheus"] == True: node_info["prometheus_port"] = node_details.ports["metrics"].number if prometheus_port != None: diff --git a/relaychain/relay-chain.star b/relaychain/relay-chain.star index d617e4e..0d711ad 100644 --- a/relaychain/relay-chain.star +++ b/relaychain/relay-chain.star @@ -59,7 +59,7 @@ def start_relay_chain(plan, chain_type, chain_name, relay_nodes): relay_node_details["service_name"] = service_details.name relay_node_details["prometheus"] = relay_node["prometheus"] relay_node_details["ip_address"] = service_details.ip_address - relay_node_details["node-type"] = relay_node["node-type"] + relay_node_details["node_type"] = relay_node["node_type"] if relay_node["prometheus"] == True: relay_node_details["prometheus_port"] = service_details.ports["metrics"].number if prometheus_port != None: @@ -117,7 +117,7 @@ def start_relay_chains_local(plan, chain_type, chain_name, relay_nodes): relay_detail["service_name"] = service_details.name relay_detail["prometheus"] = node["prometheus"] relay_detail["ip_address"] = service_details.ip_address - relay_detail["node-type"] = node["node-type"] + relay_detail["node_type"] = node["node_type"] if node["prometheus"]: relay_detail["prometheus_port"] = service_details.ports["metrics"].number if prometheus_port != None: diff --git a/testdata/updated_config.json b/testdata/updated_config.json index 86e4f4e..14db386 100644 --- a/testdata/updated_config.json +++ b/testdata/updated_config.json @@ -5,12 +5,12 @@ "nodes": [ { "name": "alice", - "node-type": "validator", + "node_type": "validator", "port": 9944 }, { "name": "bob", - "node-type": "full", + "node_type": "full", "port": 9945 } ] @@ -20,11 +20,11 @@ "nodes": [ { "name": "alice", - "node-type": "collator" + "node_type": "collator" }, { "name": "bob", - "node-type": "full" + "node_type": "full" } ] }