Skip to content

Miner Setup

Minimum System Requirements

Below is the minimum system requirements for running a miner node on the RedTeam Subnet:

  • 8-GB RAM
  • 2-Cores CPU
  • Tested on Ubuntu 22.04

But you may need more resources for engineering challenges.

Setup Instructions

To set up a miner node on the RedTeam Subnet, follow these steps:

  1. Prerequisites

  2. Install the latest version of the RedTeam Subnet repository.

    git clone https://github.com/RedTeamSubnet/RedTeam && cd RedTeam
    pip install -e .
    
  3. Explore challenges at redteam_core/challenge_pool/, build your solution, dockerize it, and push it to Docker Hub. You can view the detailed guide here. We have some limitations on your solution:

    • The solution must be a Python script.
    • The solution won't be able to access the internet.
    • Resource limit: see Active Challenge Config
  4. Specify docker submissions for challenges at neurons/miner/active_commit.yaml:

    - challenge_name_1---docker_hub_id_1@<sha256:digest>
    - challenge_name_2---docker_hub_id_2<sha256:digest>
    
  5. Install PM2 Process Manager

    # Install NVM (Node Version Manager):
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
    
    # Activate NVM:
    source ~/.bashrc
    
    # Check NVM version:
    nvm --version
    
    # Install Node.js and npm:
    nvm install --latest-npm --alias=default [NODE_VERSION]
    # For example:
    nvm install --latest-npm --alias=default 22.14.0
    
    # Set the default Node.js:
    nvm use default
    
    # Check Node.js and npm versions:
    node --version
    npm --version
    
    # Install PM2 globally with logrotate:
    npm install -g pm2
    pm2 install pm2-logrotate
    
    # Check PM2 version:
    pm2 --version
    
  6. Start the miner node:

    pm2 start python --name "miner_snxxx" \
        -- -m neurons.miner.miner \
        --netuid xxx \
        --wallet.name "wallet_name" \
        --wallet.hotkey "wallet_hotkey" \
        --axon.port "axon_port" \
        --subtensor.network <network> # default is finney
    

Optional flags:

  • --logging.trace - Enable trace logging
  • --logging.debug - Enable debug logging