Magnet
  • Welcome to Magnet
  • Overview
    • Magnet Network Features
      • Magnet Coretime
      • Coretime Order Control and Assurance
      • Workflows of Magnet Network
      • Profit Calcuation and Distribution
    • Magnet Stack Features
      • Magnet Stack Coretime Modules
  • Product Guides
    • Setup a Local Node
      • Installing Substrate Dependencies
      • Launching the Local Relay Chain
      • Build the Magnet Node
      • Prepare the parachain Collator
      • Register on the Local Relay Chain
    • Deploy Contracts on Magnet Network
      • EVM Contract Deployment
      • WASM Contract Deployment
      • MoveVM Contract Deployment
    • Bridge Asset
      • Bridging Asset between EVM and Substrate
      • Bridging Asset with XCM
    • Develop Coretime-Ready chain with Magnet Stack
      • Preparation: Reserve a ParaID
      • Preparation: Generate the Collator's Address
      • Preparation: Purchase Bulk Core
      • Using Magnet Stack : Coretime Configuration
      • Using Magnet Stack : Virtual Machine Configuration
      • Using Magnet Stack : Functional Models
      • Using Magnet Stack : Summary
      • Deployment & Connection to Rocococ
        • Define the collator's address
Powered by GitBook
On this page
  1. Product Guides
  2. Setup a Local Node

Launching the Local Relay Chain

PreviousInstalling Substrate DependenciesNextBuild the Magnet Node

Last updated 8 months ago

Magnet need a proper Substrate development environment to start. If you need a refresher setting up your Substrate environment, see .

Using the file provided by substrate.

  1. Build the relay chain node

Clone the most recent release branch of the Polkadot repository to prepare a stable working environment.

git clone --branch release-v1.1.0 https://github.com/paritytech/polkadot-sdk.git

Change to the root of the polkadot directory by running the following command:

cd polkadot

Build the relay chain node by running the following command:

cargo build --release

Compiling the node can take 15 to 60 minuets to complete.

Verify the node built correctly by running the following command:

./target/release/polkadot --help

If command-line help is displayed, the node is ready to configure.

  1. Create the First Node

nohup ./target/release/polkadot --alice --validator --chain custom-spec-raw.json --port 30333 --rpc-port 9944  --rpc-cors all --unsafe-rpc-external >alice.log 2>&1 &
  1. Create the Second Node

nohup ./target/release/polkadot --bob --validator --chain custom-spec-raw.json --port 30334 --rpc-
Substrate's Getting Started Guide
custom-spec-raw.json