From dd50773031b9d8b38a45441302bf52f19f05244e Mon Sep 17 00:00:00 2001 From: abhiyana Date: Fri, 1 Dec 2023 15:38:05 +0530 Subject: [PATCH 1/3] fix: wait long for validation from relaychain node --- local.json | 9 +-------- relaychain/relay-chain.star | 4 ++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/local.json b/local.json index 8f3b3b1..25e72e6 100644 --- a/local.json +++ b/local.json @@ -8,20 +8,13 @@ "node-type": "validator", "port": 9944, "prometheus": false - }, - { - "name": "bob", - "node-type": "full", - "port": 9945, - "prometheus": false - } ] }, "para": [ { - "name":"acala", + "name":"interlay", "nodes": [ { "name": "alice", diff --git a/relaychain/relay-chain.star b/relaychain/relay-chain.star index e63d491..0b93095 100644 --- a/relaychain/relay-chain.star +++ b/relaychain/relay-chain.star @@ -52,6 +52,10 @@ def spawn_multiple_relay(plan, count): def start_relay_chains_local(plan, args): relay_nodes = args["relaychain"]["nodes"] + + if len(relay_nodes) < 2: + fail("relay nodes must contain atleast two nodes") + final_details=[] prometheus_port = 9615 for node in relay_nodes: From 07a83ac963279070551d21315697c453e6f50503 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Fri, 1 Dec 2023 16:05:14 +0530 Subject: [PATCH 2/3] fix: mangata local, testnet, mainnet node issue --- local.json | 11 +++++++++-- package_io/constant.star | 2 +- parachain/static_files/images.star | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/local.json b/local.json index 25e72e6..06f911d 100644 --- a/local.json +++ b/local.json @@ -1,5 +1,5 @@ { - "chain-type": "local", + "chain-type": "testnet", "relaychain": { "name": "rococo", "nodes": [ @@ -8,13 +8,20 @@ "node-type": "validator", "port": 9944, "prometheus": false + }, + { + "name": "bob", + "node-type": "full", + "port": 9945, + "prometheus": false + } ] }, "para": [ { - "name":"interlay", + "name":"mangata", "nodes": [ { "name": "alice", diff --git a/package_io/constant.star b/package_io/constant.star index f3c7d34..99a7068 100644 --- a/package_io/constant.star +++ b/package_io/constant.star @@ -5,7 +5,7 @@ CURL_JQ_IMAGE = "badouralix/curl-jq" NODE_IMAGE = "hugobyte/parachain-node-modules" PARA_SLOT_REGISTER_SERVICE_NAME = "para-slot-registration" BINARY_COMMAND_CHAINS = ["manta", "khala", "phala", "clover", "calamari", "subzero", "robonomics"] -NO_WS_PORT = ["acala", "frequency", "moonbeam", "karura", "ajuna", "bajun", "centrifuge", "moonsama", "encointer", "moonriver", "altair"] +NO_WS_PORT = ["acala", "frequency", "moonbeam", "karura", "ajuna", "bajun", "centrifuge", "moonsama", "encointer", "moonriver", "altair", "mangata"] DIFFERENT_IMAGES_FOR_MAINNET = { "centrifuge": "centrifugeio/centrifuge-chain:main-latest", diff --git a/parachain/static_files/images.star b/parachain/static_files/images.star index 3bfe5d7..d68f03c 100644 --- a/parachain/static_files/images.star +++ b/parachain/static_files/images.star @@ -148,7 +148,7 @@ parachain_images = { "mangata": { "image": "mangatasolutions/mangata-node:feature-post-3rdparty-rewards-fast", "entrypoint": "/mangata/node", - "base": ["rococo-local", "mangata-rococo", "mangata-kusama"], + "base": ["mangata-rococo-local", "mangata-rococo", "mangata-kusama"], }, "moonriver": { "image": "moonbeamfoundation/moonbeam:sha-519bd694", From 0061719bf7075b531fbb2466fc894d6495429b6a Mon Sep 17 00:00:00 2001 From: abhiyana Date: Mon, 4 Dec 2023 10:23:20 +0530 Subject: [PATCH 3/3] docs: add read.md documentation file --- READ.md | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 1 - 2 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 READ.md delete mode 100644 README.md diff --git a/READ.md b/READ.md new file mode 100644 index 0000000..17bb736 --- /dev/null +++ b/READ.md @@ -0,0 +1,179 @@ +# Polkadot-kurtosis-package + +Polkadot-kurtosis-package is a tool built leveraging the power of Kurtosis, a developer platform for packaging and launching environments. This tool simplifies the process of setting up various local, testnet, and mainnet network configurations and scenarios for Polkadot parachains. + +## About + +The primary goal of this project is to streamline the setup of Polkadot parachain environments using the Kurtosis platform. With just a few one-liners, developers can package and launch environments tailored to their needs. + +## Setup and Requirements + +Ensure the following prerequisites are met before using the Polkadot-kurtosis-package: +- Docker installed on your machine[https://www.docker.com/] +- Kurtosis installed on your machine[https://www.kurtosis.com/] + +# Integrated Parachains + +List of integrated parachains within the Polkadot-kurtosis-package. + +- acala +- ajuna +- bifrost +- centrifuge +- clover +- frequency +- integritee +- interlay +- kilt +- kylin +- litentry +- manta +- moonbeam +- moonsama +- nodle +- parallel +- pendulum +- phala +- polkadex +- subsocial +- zeitgeist +- encointer +- altair +- bajun +- calamari +- karura +- khala +- kintsugi-btc +- litmus +- mangata +- moonriver +- robonomics +- subzero +- turing + + + +## Chopstick Compatibility + +The package also supports Chopsticks, a tool offering a user-friendly approach to locally branching existing Substrate-based chains. It enables block replay, multi-block forking, and more. + +### Parachains Compatible with Chopsticks + +- astar +- basilisk +- acala +- centrifuge +- composable-polkadot +- hydradx +- imbu +- interlay +- karura +- mandala +- mangata +- moonbase +- moonbeam +- moonriver +- nodle-eden +- picasso-kusama +- picasso-rococo +- polkadex +- shibuya +- shiden +- statemine +- statemint +-ß tinkernet + +Check more info on Chopsticks, refer to the [Chopsticks]. + +## Zombienet + +Zombienet is a CLI tool that facilitates the creation and testing of ephemeral Polkadot/Substrate networks. It offers a straightforward interface for developers to spawn and examine these temporary networks, enabling them to thoroughly evaluate their applications and protocols within a simulated real-world environment. + + +## Usage + +To use the package, run the following command inside the root directory of your project: + +```bash +kurtosis run . --enclave 'enclavename' --args-file=path/to/config/file +``` + +For detailed instructions on writing the configuration file, refer to the [Configuration File Guidelines] + +Certainly! Let's create a section in your README file to explain how to write the configuration file using the provided example. I'll include a breakdown of each field and provide explanations: + +# Configuration File Guidelines + +To use the Polkadot-kurtosis-package, you need to create a configuration file specifying the desired network setup. Below is an example configuration file along with explanations for each field: + +```json +{ + "chain-type": "testnet", + "relaychain": { + "name": "rococo", + "nodes": [ + { + "name": "alice", + "node-type": "validator", + "port": 9944, + "prometheus": false + }, + { + "name": "bob", + "node-type": "full", + "port": 9945, + "prometheus": false + } + ] + }, + "para": [ + { + "name":"kilt", + "nodes": [ + { + "name": "alice", + "node-type": "validator", + "prometheus": false + }, + { + "name": "bob", + "node-type": "full", + "prometheus": false + } + ] + } + ], + "chopstick": { + "xcm": false, + "relaychain":"", + "parachains": ["acala"] + } +} +``` + +## Configuration Fields: + +- **chain-type:** Specifies the type of the network (e.g., "localnet","testnet", "mainnet"). +- **relaychain:** Configuration for the relay chain. (When chain-type is "testnet" or "mainenet", the "relaychain" can be empty dictonary) + - **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". + - **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". + - **prometheus:** Whether Prometheus monitoring is enabled (true/false). +- **chopstick:** Configuration for Chopstick integration. + - **xcm:** Whether XCM (Cross-Chain Messaging) is enabled (true/false). + - **relaychain:** Name of the relay chain for Chopstick integration. + - **parachains:** List of parachains compatible with Chopsticks. + +Feel free to modify this example configuration file based on your specific network requirements. + +## Contributing + +We welcome contributions to enhance and expand the functionality of the Polkadot-kurtosis-package. Feel free to fork the repository, make your changes, and submit a pull request. diff --git a/README.md b/README.md deleted file mode 100644 index 2033abc..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# Polkadot Kurtosis Package