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

Build the Magnet Node

PreviousLaunching the Local Relay ChainNextPrepare the parachain Collator

Last updated 8 months ago

1. Build the Magnet Node from Source Code

This method involves cloning the Magnet project repository from GitHub and compiling the project using Cargo, the package manager and build tool for Rust. Follow these steps:

# Clone the repository
git clone https://github.com/Magport/Magnet.git

# Navigate to the project directory
cd Magnet

# Build the project using Cargo
cargo build --release

Compiling the node may take about 30 minutes to complete, depending on your system's performance.

2. Run the Pre-Compiled Executable from GitHub

If you prefer not to build from source, you can directly download the pre-compiled executable file of the Magnet node from GitHub. This is usually faster as it bypasses the compilation process. Follow these steps:

a. Visit the Magnet project's GitHub releases page: .

b. Select the latest version and download the pre-compiled executable suitable for your operating system.

c. After downloading, you may need to grant execution permissions to the file, depending on your operating system. On Linux or macOS, you can use the following command:

chmod +x magnet_executable # Replace with the actual name of the downloaded file

d. Run the executable to start the Magnet node:

./magnet_executable # Replace with the actual name of the downloaded file

3. Create a new paraid in the browser

  • c. Choose an account and submit.

  • d. The registered paraid for this session is 2000.

4. Modify the Default Chain Specification

  • a. Generate the default chain specification:

./target/release/parachain-magnet-node build-spec --disable-default-bootnode >magnet-2000.json

Modify the magnet-2000.json file, change para_id to 2000 and parachainid to 2000.

  • b. Convert the spec file to a raw file:

./target/release/parachain-magnet-node build-spec --disable-default-bootnode --chain magnet-2000.json --raw>raw-magn

a. Click on network, select parachains.

b. Click on parathreads, click on paraid.

Magnet Releases