Running Local Network
This section is focused on guiding users through the process of setting up and running a local network, with clear steps and additional context to ensure a smooth setup experience.
Setting Up a Local Network with Niskala
This guide provides detailed instructions for setting up and running a local network using Niskala, built with Substrate. This setup is ideal for development, testing, and experimentation with Niskala.
Prerequisites
Before you begin, ensure you have the following:
A compatible operating system (Linux, macOS, or Windows).
Rust installed on your system.
Familiarity with command-line operations.
Zombienet installed for local testnet setup.
Get the Latest Binary, visit the Release page of the Mandala Github repository.
Installation
Step 1: Install Dependencies
Ensure your system has the necessary dependencies. Follow the Substrate Installation Guide for your specific platform to install required packages.
Step 2: Clone the Repository
Clone the Mandala Node repository to your local machine:
Step 3: Build the Node
Compile the node with the desired runtime:
Note: Use
niskala-native
if you prefer the Niskala runtime.
Running a Local Network
Step 1: Generate Genesis State and Runtime
Generate the genesis state and runtime for your node:
Replace the path with folder you wish to store the state and runtime
Step 2: Set Up the Relay Chain
Navigate to your Zombienet directory and start the relay chain:
Info: This command initializes a 2-node relay chain with Bob and Alice as validators.
Step 3: Launch the Collator
Return to the Mandala Node directory and start the collator:
Step 4: Register the Parachain
After starting the Zombienet script, register your parachain:
Open a browser and navigate to the Polkadot/Substrate Portal.
In the developer tab, go to "sudo" and select
parasSudoWrapper
.Choose
sudoScheduleParaInitialize(id, genesis)
.Set the
id
parameter to2000
.Upload the
genesis-state
file for thegenesisHead
parameter.Set
paraKind
totrue
and submit the transaction.
Wait for the next epoch to start, and your parachain should begin producing blocks.
Interacting with the Local Network
You can interact with your local network using the Polkadot/Substrate Portal. This interface allows you to explore blocks, transactions, and other network activities.
Additional Resources
Last updated