U2U Network Documentations
  • Introduction
    • Our Vision
    • Litepaper
      • Overview
        • U2U Network Diagram
        • U2U Network with DEPIN and Web3 Eco System
      • Consensus
  • Services
    • RPC
      • RPC Endpoints
      • Ethereum API Methods
        • eth_blockNumber
        • eth_call
        • eth_chainId
        • eth_estimateGas
        • eth_feeHistory
        • eth_gasPrice
        • eth_getBalance
        • eth_getBlockByHash
        • eth_getBlockByNumber
        • eth_getBlockTransactionCountByHash
        • eth_getBlockTransactionCountByNumber
        • eth_getCode
        • eth_getLogs
        • eth_getProof
        • eth_getStorageAt
        • eth_getTransactionByBlockHashAndIndex
        • eth_getTransactionByBlockNumberAndIndex
        • eth_getTransactionByHash
        • eth_getTransactionCount
        • eth_getTransactionReceipt
        • eth_getUncleByBlockHashAndIndex
        • eth_getUncleByBlockNumberAndIndex
        • eth_getUncleCountByBlockHash
        • eth_getUncleCountByBlockNumber
        • eth_maxPriorityFeePerGas
        • eth_sendRawTransaction
        • eth_subscribe
        • eth_unsubscribe
        • net_version
        • net_listening
        • net_peerCount
        • web3_clientVersion
        • web3_sha3
        • debug_traceTransaction
      • DAG API Methods
        • dag_getEvent
        • dag_getEventPayload
        • dag_getHeads
        • eth_currentEpoch
      • Trace API Methods
        • trace_block
        • trace_get
        • trace_transaction
        • trace_filter
    • Explorer
      • Explorer URLs
      • Explorer API
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
      • GraphQL
      • Explorer RPC API
      • Smart Contract Verification
        • Via explorer
        • Via hardhat plugin
      • Testnet Faucet
    • Wallets
      • Metamask
      • Wallet Connect
      • Coinbase Wallet
      • U2U Super App
        • Policy
    • Staking
      • How To Stake?
      • FAQ
    • The Graph
      • Deploy a Graph Node
      • Deploy a Subgraph
    • Bridge
      • Smart Contracts & EOA
    • Oracle
      • Smart Contracts & EOA
  • Network
    • Node Types
    • Requirements
    • Build Dependencies
    • Run Normal Node
      • Mainnet Normal Node
      • Testnet Normal Node
      • Run via Docker
    • Run Validator Node
      • Mainnet Validator Node
      • Testnet Validator Node
    • Run A Local Test Network
    • Troubleshooting
  • SUBNET
    • Overview
    • Subnet Node Type
    • Requirements
    • NFT Digital License
    • Subnet Node Setup
      • Master Node
      • Verifier Node
      • Edge Node CLI
  • For Developers
    • SDK
    • Smart Contract Development
      • What are smart contracts?
      • What is gas?
      • Structure of a smart contract
      • Your first smart contract
      • Test your smart contract
      • Deploy your smart contract
      • Submit your contract to explorer
      • Interact With Your Smart Contract
      • Integrate Your Smart Contract With a Frontend
      • Additional Resources
    • Smart Contract Deployment
      • Deploy with Remix
      • Deploy with Hardhat
Powered by GitBook
On this page
  • Installing Subnet Edge Node (non-GUI version)
  • Table of Contents
  • 1. Using Prebuilt Binaries
  • 2. Building from Source
  • 3. Initializing Configuration
  • 4. Running the Subnet Node
  • 5. Development Status and Known Issues
  • 6. Feedback and Contribution
  • License
  1. SUBNET
  2. Subnet Node Setup

Edge Node CLI

PreviousVerifier NodeNextSDK

Last updated 4 months ago

Installing Subnet Edge Node (non-GUI version)

This document provides instructions to install and run Subnet, whether you are building it from source or using prebuilt binaries. Note that this project is currently under development, and breaking changes may occur.


Table of Contents


1. Using Prebuilt Binaries

We provide prebuilt binaries for major platforms (Linux, macOS, and Windows). You can download the binary for your system and start using Subnet without building it from source.

Steps to Install and Run

  1. Download the Prebuilt Binary

    • Download the binary for your operating system:

      • Linux: subnet-linux-amd64

      • macOS: subnet-darwin-amd64

      • Windows: subnet-windows-amd64.exe

  2. Make the Binary Executable (Linux/macOS)

    chmod +x subnet-linux-amd64
  3. Move the Binary to Your PATH

    sudo mv subnet-linux-amd64 /usr/local/bin/subnet

    For macOS, replace subnet-linux-amd64 with subnet-darwin-amd64. For Windows, no additional steps are needed if you run the .exe file directly.

  4. Verify the Installation

    subnet --version
  5. Initialize the Configuration


2. Building from Source

If you prefer to build Subnet from source, follow these steps:

Prerequisites

  • Git: Version control system.

Steps to Build

  1. Clone the repository:

    git clone https://github.com/unicornultrafoundation/subnet-node.git
    cd subnet-node
  2. Build the source code:

    go build -o ./build/subnet ./cmd/subnet
  3. Verify the build:

    cd ./build
    ./subnet --help

3. Initializing Configuration

Before running the Subnet node, you must initialize its configuration.

  1. Run the Initialization Command

    ./subnet --init --datadir ./.data
  2. Verify the Configuration

    • Check the generated file at ~/.subnet/config.yaml:

      addresses:
          api:
          - /ip4/0.0.0.0/tcp/8080 # api server
          swarm:
          - /ip4/0.0.0.0/tcp/4001 # swarm server
       bootstrap:
          - /ip4/47.129.250.9/tcp/4001/p2p/12D3KooWDK63y6sxFi3dNqrS8yRetgbB81Tzszvs2yLoEtWtPCDa # subnet genesis boot node
       identity:
          peer_id: 12D3KooWLJCgSFv62DfQwNKTYxACMisLnCnGbYBp766p1K19PExx # DON'T USE! Example of ED25519 Public Key 
          privkey: CAESQA0P3Td0UZ2sAoCflMNdUivxFbUdcuo+XraGbZk5EZEdm7ZnWjxFiBUG9M718wpSOzl8P4JDQe6vZ6w+F5S9VPE= # DON'T USE! Example of ED25519 Private Key 

4. Running the Subnet Node

Once the configuration is initialized, you can start the Subnet node.

  1. Start the Node

    ./subnet --datadir ./.data
  2. Connect to Bootstrap Peers

    • If you need to connect to a bootstrap node manually:

      ./subnet connect /ip4/<bootstrap-ip>/tcp/<port>/p2p/<peer-id>
  3. Monitor Logs

    • Observe logs for connections and resource discovery:

      Initializing Subnet Node...
      Node started with Peer ID: <ED25519 Public Key>
      Listening on: /ip4/127.0.0.1/tcp/4001

5. Development Status and Known Issues

Current Status

  • Active Development: Subnet is currently in the alpha stage and under heavy development.

  • Breaking Changes: APIs, configurations, and network protocols may change without notice.

Known Issues

  1. Peer Connection Failures:

    • NAT traversal issues may occur in certain network environments.

    • Temporary fix: Ensure ports are forwarded manually or run on public networks.

  2. Incomplete Features:

    • Resource management and discovery are being actively developed.

  3. Stability:

    • The system may become unstable under heavy load or high peer counts.


6. Feedback and Contribution

We value your feedback to improve Subnet. If you encounter issues or have suggestions, please:


License

Go to the .

Follow the section.

Golang: Version 1.19 or higher ().

Open an issue on our .

Join discussions and share ideas in the .

For contributing to Subnet, refer to .

This project is licensed under the .

Using Prebuilt Binaries
Building from Source
Initializing Configuration
Running the Subnet Node
Development Status and Known Issues
Feedback and Contribution
License
Releases Page
Initializing Configuration
Install Go
GitHub Repository
Community Forum
CONTRIBUTING.md
MIT License