Skip to content

4. 🚀 Submit Commit

In this step, you will configure and run your miner node to submit your published commit (Docker image) to the RedTeam Subnet for evaluation.

Prerequisites

4.1. Clone miner node repository

Create a dedicated directory for RedTeam Subnet projects (if not exists):

# Create projects directory:
mkdir -pv ~/workspaces/projects/redteam61

# Enter into projects directory:
cd ~/workspaces/projects/redteam61

Clone the miner repository:

git clone https://github.com/RedTeamSubnet/miner.git && \
    cd miner

4.2. Configure active commit file to submit

IMPORTANT

Make sure to change the commit hash with your own pushed docker image SHA256 digest as commit hash in the active_commit.yaml file:

# Copy template active commit file:
cp -v ./templates/configs/active_commit.yaml ./volumes/configs/agent-miner/active_commit.yaml

# Change active commit file with your own commit hash:
nano ./volumes/configs/agent-miner/active_commit.yaml

active_commit.yaml format:

- <CHALLENGE_NAME>---<USERNAME>/<REPO_NAME>@sha256:<DIGEST>

For example:

- ab_sniffer_v5---my_username/my_repo@sha256:abc123def456...
- ada_detection_v3---my_username/my_repo@sha256:abc123def456...

TIP

You can add multiple commits for different challenges in the same active_commit.yaml file.

WARNING

  • Only one commit per challenge is allowed in the active_commit.yaml file. If you add multiple commits for the same challenge, only the last one will be considered during submission and others will be ignored.
  • We are allowing only one commit per challenge/day for submission to avoid spam, abuse, unnecessary network load, and fair evaluation for all participants.

4.3. Configure environment variables

IMPORTANT

Make sure to change the wallet directory, wallet name, and hotkey name variables in the .env file to match your wallet and hotkey:

RT_BTCLI_WALLET_DIR="${HOME}/.bittensor/wallets" # !!! CHANGE THIS TO REAL WALLET DIRECTORY !!!
RT_MINER_WALLET_NAME="miner" # !!! CHANGE THIS TO REAL MINER WALLET NAME !!!
RT_MINER_HOTKEY_NAME="default" # !!! CHANGE THIS TO REAL MINER HOTKEY NAME !!!
# Copy '.env.example' file to '.env' file:
cp -v ./.env.example ./.env

# Edit environment variables to fit in your environment
nano ./.env

4.4. Validate docker compose configuration

# Check docker compose configuration is valid:
./compose.sh validate
# Or:
docker compose config

4.5. Start miner node to submit

# Start docker compose:
./compose.sh start -l
# Or:
docker compose up -d --remove-orphans --force-recreate && \
    docker compose logs -f --tail 100

IMPORTANT

  • You need to keep the miner node running continuously to submit solutions and earn rewards during the challenge period (at 2 least days).
  • Stopping the miner node could halt submission communications with validators and affect your earnings.

Next step