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 Docker Hub credentials

Your miner needs Docker Hub credentials to pull your private images during validation. See the Docker Hub Registry & PAT guide for full details — here is a summary of what to prepare:

One Username Policy

All images in your active_commit.yaml must use a single Docker Hub username. Mixing usernames (e.g. alice/solver and bob/detector) will cause authentication failures because only one set of credentials is used for pulling.

Before continuing, make sure you have:

  1. A private Docker Hub repository — public repos expose your solution to competitors. Go to your repo Settings → Visibility → Private.
  2. A Personal Access Token (PAT) with Read-only scope — never use your account password. Generate one at hub.docker.com/settings/security.
  3. Verified the token works locally:

    echo "<your-pat>" | docker login -u <your-username> --password-stdin
    # Expected output: Login Succeeded
    

Copy and configure the PAT file:

# Copy template personal access token file:
cp -v ./templates/configs/personal_access_token.txt ./volumes/configs/agent-miner/personal_access_token.txt

# Paste your PAT into the file:
nano ./volumes/configs/agent-miner/personal_access_token.txt

Never commit your PAT

Make sure personal_access_token.txt is not tracked by Git. If you accidentally expose a PAT, revoke it immediately from the security settings page and generate a new one.


4.4. 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.5. Validate docker compose configuration

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

4.6. 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 least 2 days).
  • Stopping the miner node could halt submission communications with validators and affect your earnings.

Next step