Skip to content

Command-line Arguments

Relevant Source Files

This document provides a comprehensive reference for all command-line arguments available in the NI Compute Subnet. The arguments control the behavior of miners and validators, including network configuration, validation parameters, resource allocation settings, and security controls.

For information about GPU performance configuration parameters, see GPU Performance Configuration. For details about using the registration CLI tools, see Registration CLI.

The command-line argument system is built using the ComputeArgPaser class, which extends Python’s argparse.ArgumentParser to provide both compute subnet-specific arguments and inherited Bittensor framework arguments.

graph TD
    subgraph "ComputeArgPaser Class"
        PARSER["ComputeArgPaser"]
        INIT["__init__()"]
        VALIDATOR_ARGS["add_validator_argument()"]
        MINER_ARGS["add_miner_argument()"]
        PARSE_LIST["parse_list()"]
    end
    
    subgraph "Bittensor Framework Args"
        BT_SUBTENSOR["bt.subtensor.add_args()"]
        BT_LOGGING["bt.logging.add_args()"]
        BT_WALLET["bt.wallet.add_args()"]
        BT_AXON["bt.axon.add_args()"]
    end
    
    subgraph "Configuration Objects"
        CONFIG["bt.config"]
        NETUID["--netuid"]
        AUTO_UPDATE["--auto_update"]
        BLACKLIST["--blacklist.*"]
        WHITELIST["--whitelist.*"]
    end
    
    INIT --> VALIDATOR_ARGS
    INIT --> MINER_ARGS
    INIT --> BT_SUBTENSOR
    INIT --> BT_LOGGING
    INIT --> BT_WALLET
    INIT --> BT_AXON
    
    PARSER --> CONFIG
    
    VALIDATOR_ARGS --> CONFIG
    MINER_ARGS --> CONFIG
    BT_SUBTENSOR --> CONFIG
    BT_LOGGING --> CONFIG
    BT_WALLET --> CONFIG
    BT_AXON --> CONFIG

Sources: compute/utils/parser.py:8-71

ArgumentTypeDefaultDescription
--netuidint27The chain subnet UID (27 for mainnet, 15 for testnet)
--auto_updateflagTrueAutomatically update the git repository

The --netuid argument determines which Bittensor subnet the process connects to. The main production network uses netuid 27, while the test network uses netuid 15.

Sources: compute/utils/parser.py:12-22

The subnet provides comprehensive blacklisting and whitelisting capabilities for both hotkeys and coldkeys:

ArgumentTypeDefaultDescription
--blacklist.exploitersflagTrueAutomatically blacklist known exploiter hotkeys
--blacklist.hotkeyslist[]Comma-separated list of hotkeys to blacklist
--blacklist.coldkeyslist[]Comma-separated list of coldkeys to blacklist
--whitelist.hotkeyslist[]Comma-separated list of hotkeys to whitelist
--whitelist.coldkeyslist[]Comma-separated list of coldkeys to whitelist

The --blacklist.exploiters flag automatically applies the hardcoded list of suspected exploiter hotkeys defined in SUSPECTED_EXPLOITERS_HOTKEYS.

Sources: compute/utils/parser.py:24-57 , compute/__init__.py:60-77

Validators use specialized arguments to control their validation behavior, hardware querying, and performance parameters.

graph LR
    subgraph "Validator Configuration"
        WHITELIST_UNREC["--validator.whitelist.unrecognized"]
        HARDWARE_QUERY["--validator.perform.hardware.query"]
        PROMETHEUS_UPDATE["--validator.force.update.prometheus"]
        WHITELIST_THRESHOLD["--validator.whitelist.updated.threshold"]
    end
    
    subgraph "Batch Processing"
        CHALLENGE_BATCH["--validator.challenge.batch.size"]
        SPECS_BATCH["--validator.specs.batch.size"]
    end
    
    subgraph "Validator Process"
        VALIDATION_LOGIC["Validation Logic"]
        HARDWARE_SPECS["Hardware Specs Collection"]
        CHALLENGE_SYSTEM["Challenge System"]
    end
    
    WHITELIST_UNREC --> VALIDATION_LOGIC
    HARDWARE_QUERY --> HARDWARE_SPECS
    CHALLENGE_BATCH --> CHALLENGE_SYSTEM
    SPECS_BATCH --> HARDWARE_SPECS
    PROMETHEUS_UPDATE --> VALIDATION_LOGIC
    WHITELIST_THRESHOLD --> VALIDATION_LOGIC
ArgumentTypeDefaultDescription
--validator.whitelist.unrecognizedflagFalseWhitelist unrecognized miners
--validator.perform.hardware.queryboolTrueEnable hardware specs collection from miners
--validator.challenge.batch.sizeint256Batch size for challenge processing
--validator.specs.batch.sizeint64Batch size for hardware specs queries
--validator.force.update.prometheusflagFalseForce Prometheus version update
--validator.whitelist.updated.thresholdint60Quorum threshold percentage for whitelisting

The batch size arguments allow validators with lower hardware specifications to reduce memory and processing load by processing smaller batches of miners at a time.

Sources: compute/utils/parser.py:72-114

Miners have specialized arguments for hashcat configuration, resource allocation, and validator interaction policies.

ArgumentTypeDefaultDescription
--miner.hashcat.pathstr”hashcat”Path to the hashcat binary executable
--miner.hashcat.workload.profilestr”3”Performance profile (1=Low, 2=Economic, 3=High, 4=Insane)
--miner.hashcat.extended.optionsstr""Additional hashcat command-line options

The hashcat configuration controls how miners respond to Proof-of-Work challenges. The workload profile directly impacts the computational intensity and power consumption.

Sources: compute/utils/parser.py:117-137 , compute/__init__.py:55-57

graph TD
    subgraph "Miner Whitelist Policy"
        NOT_ENOUGH_STAKE["--miner.whitelist.not.enough.stake"]
        NOT_UPDATED["--miner.whitelist.not.updated"]
        UPDATED_THRESHOLD["--miner.whitelist.updated.threshold"]
    end
    
    subgraph "Resource Allocation"
        SSH_PORT["--ssh.port"]
        ALLOCATION_SERVICE["Allocation Service"]
    end
    
    subgraph "Validator Interaction"
        STAKE_CHECK["Validator Stake Verification"]
        VERSION_CHECK["Validator Version Check"]
        THRESHOLD_CHECK["Quorum Threshold Check"]
    end
    
    NOT_ENOUGH_STAKE --> STAKE_CHECK
    NOT_UPDATED --> VERSION_CHECK
    UPDATED_THRESHOLD --> THRESHOLD_CHECK
    SSH_PORT --> ALLOCATION_SERVICE
    
    STAKE_CHECK --> ALLOCATION_SERVICE
    VERSION_CHECK --> ALLOCATION_SERVICE
    THRESHOLD_CHECK --> ALLOCATION_SERVICE
ArgumentTypeDefaultDescription
--miner.whitelist.not.enough.stakeflagFalseAccept validators without sufficient stake
--miner.whitelist.not.updatedflagFalseAccept validators not using latest code version
--miner.whitelist.updated.thresholdint60Quorum threshold percentage before applying whitelist
--ssh.portint4444SSH port for resource allocation service

These security policies allow miners to control which validators they accept requests from based on stake requirements and code version compliance.

Sources: compute/utils/parser.py:138-165

The argument parser incorporates standard Bittensor framework arguments through method calls that extend the parser with additional argument groups.

graph LR
    subgraph "Bittensor Components"
        SUBTENSOR["bt.subtensor"]
        LOGGING["bt.logging"]
        WALLET["bt.wallet"]
        AXON["bt.axon"]
    end
    
    subgraph "Added Arguments"
        SUBTENSOR_ARGS["--subtensor.network<br/>--subtensor.chain_endpoint"]
        LOGGING_ARGS["--logging.debug<br/>--logging.trace<br/>--logging.logging_dir"]
        WALLET_ARGS["--wallet.name<br/>--wallet.hotkey<br/>--wallet.path"]
        AXON_ARGS["--axon.port"]
    end
    
    subgraph "Configuration Object"
        BT_CONFIG["bt.config"]
    end
    
    SUBTENSOR --> SUBTENSOR_ARGS
    LOGGING --> LOGGING_ARGS
    WALLET --> WALLET_ARGS
    AXON --> AXON_ARGS
    
    SUBTENSOR_ARGS --> BT_CONFIG
    LOGGING_ARGS --> BT_CONFIG
    WALLET_ARGS --> BT_CONFIG
    AXON_ARGS --> BT_CONFIG
  • --subtensor.network: Network endpoint (finney, test, or custom)
  • --subtensor.chain_endpoint: Custom blockchain endpoint URL
  • --logging.debug: Enable debug-level logging
  • --logging.trace: Enable trace-level logging
  • --logging.logging_dir: Directory for log files
  • --wallet.name: Coldkey wallet name
  • --wallet.hotkey: Hotkey name
  • --wallet.path: Custom wallet directory path
  • --axon.port: Port for serving the axon (default: 8091)

Sources: compute/utils/parser.py:61-70

Terminal window
pm2 start ./neurons/miner.py --name MINER_NAME --interpreter python3 -- \
--netuid 27 \
--subtensor.network finney \
--wallet.name COLDKEY_NAME \
--wallet.hotkey HOTKEY_NAME \
--axon.port 8091 \
--ssh.port 4444 \
--logging.debug \
--auto_update
Terminal window
pm2 start ./neurons/validator.py --name VALIDATOR_NAME --interpreter python3 -- \
--netuid 27 \
--subtensor.network finney \
--wallet.name COLDKEY_NAME \
--wallet.hotkey HOTKEY_NAME \
--validator.specs.batch.size 64 \
--validator.challenge.batch.size 256 \
--logging.debug \
--auto_update

For miners with custom hashcat optimization:

Terminal window
--miner.hashcat.workload.profile 4 \
--miner.hashcat.extended.options "-O --force"

For validators with restrictive whitelisting:

Terminal window
--validator.whitelist.updated.threshold 80 \
--blacklist.exploiters \
--blacklist.hotkeys "5HZ1ATsziEMDm1iUqNWQatfEDb1JSNf37AiG8s3X4pZzoP3A"

Sources: README.md:362-425