Getting Started

Intelligence is the apex element

System requirements

Bittensor requires at least 2GB of RAM and 10 GB of swap space. Standard machine learning practice applies to Bittensor mining. We recommend a machine with a modern CPU, at least 4GB of RAM, 100 GB of disk space and a stable internet connection to take full advantage of Bittensor mining. We also do offer GPU support, but it is still experimental and will provide a small performance boost compared to a CPU.

Bittensor does not currently support TPU training, but will be implemented in the near future.

Currently, Bittensor only supports Linux and OS X support. Bittensor does not support Windows natively. To install using windows, please make use of windows subsystem for Linux (Installation).

Since mining at Bittensor is effectively training and offering up a machine learning model rather than solving complex hash equations, it is possible to run Bittensor on cloud computing services, such as Amazon Web Services, Microsoft Azure, and DigitalOcean.

Installation

Paste the following into your terminal. The script waits for your go-ahead before installing all the necessary dependencies:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/opentensor/bittensor/master/scripts/install.sh)"

In the near future,

pip install bittensor

will be the preferred method of installation.

Successful Installation

If the installation is completed successfully, you should see the following message in your shell:

==> Installation successful!
==> -----IMPORTANT-----
The Bittensor network is currently down for maintenance since block 1805945 (May 24th 2021)
The main network will reopen on Bittensor-akatsuki: November 2021.
Please use Kusanagi as a testing network for now
==> -------------------
==> Next steps:
- 1) Choose your network:
$ export NETWORK=kusanagi # Testing network (as of block 1805945)"
$ export NETWORK=akatsuki # Main network (opens November 1st 2021)"
- 2) Activate the installed python:
$ source ~/.bittensor/env/bin/activate
- 3) Create a wallet:
$ export WALLET=<your wallet name>
$ export HOTKEY=<your hotkey name>
$ bittensor-cli new_coldkey --wallet.name $WALLET
$ bittensor-cli new_hotkey --wallet.name $WALLET --wallet.hotkey $HOTKEY
- 4) (Optional) Open a port on your NAT:
See Docs: https://app.gitbook.com/@opentensor/s/bittensor)
- 5) Run a miner:
i.e. $ python ~/.bittensor/bittensor/miners/text/template_miner.py \
--logging.debug \
--subtensor.network $NETWORK \
--wallet.name $WALLET \
--wallet.hotkey $HOTKEY
==> Extras:
- Read the docs:
https://opentensor.github.io/index.html
- Visit our website:
https://www.bittensor.com
- Join the discussion:
https://discord.gg/3rUr6EcvbB

Step by Step

#1 Network
#2 Python
#3 Wallet
#4 NAT
#5 Miner
#1 Network

#1 Choosing a network

- 1) Choose your network:
$ export NETWORK=kusanagi # Testing network (as of block 1805945)"
$ export NETWORK=akatsuki # Main network (opens November 1st 2021)"

There are two open Bittensor networks:

  1. Kusanagi: The test network. (named after the main character from Ghost in the Shell)

    Use Kusanagi to get familiar with Bittensor without worrying about losing valuable tokens.

  2. Akatsuki: The main network: Tokens mined here will be real after November 2021.

#2 Python

#2 Activating your installed python

- 2) Activate the installed python:
$ source ~/.bittensor/env/bin/activate

The install script has installed Bittensor and its dependencies into a python virtual environment. You will need to activate this version of python before running your miner. At any time you can deactivate this python version by typing deactivate in your terminal.

#3 Wallet

#3 Creating a default wallet

- 3) Create a default wallet:
$ export WALLET=<your wallet name>
$ export HOTKEY=<your hotkey name>
$ bittensor-cli new_coldkey --wallet.name $WALLET
$ bittensor-cli new_hotkey --wallet.name $WALLET --wallet.hotkey $HOTKEY

Running these commands will create two keys on your device:

~/.bittensor/wallets
├── <your wallet name>
│   ├── coldkey
│   ├── coldkeypub.txt
│   └── hotkeys
│   └── <your hotkey name>
  • hotkey (~/.bittensor/wallets/default/hotkeys/default):

    • Your hotkey is used by the miner to subscribe and set weights. It is "hot" because it is loaded into the running software (which can be insecure). It does not have permission to move funds.

  • coldkey (~/.bittensor/wallets/default/coldkey):

    • Your coldkey is used to store, transfer, and stake tokens. It is "cold" because it is not loaded into the miner and remains encrypted on the device.

Note: Make sure to save your password and mnemonic in a secure place.

#4 NAT

#4 Opening a port on your device (Optional)

- 4) (Optional) Open a port on your NAT:
See Docs: https://app.gitbook.com/@opentensor/s/bittensor

If you are running on a home computer you are likely behind a NAT. This means your computer cannot receive requests from other computers on the wide internet. We suggest the following two strategies for opening your miner up to the web:

  1. Use UPNPC: Some routers allow the UPnP protocol to programmatically open port forwarding. To try this run your miner with the following argument:

    --axon.use_upnpc true
  2. Do it Manually: If step 1 fails, you can open a port on your router by accessing it's admin console via your browser at 192.168.0.1. Through the admin console, you can manually specify that traffic from an external port (i.e. 8081) will be routed to a local/internal port (i.e. 9122). Once this is enabled you will need to run your miner with the following arguments:

    --axon.external_port 8081 // (your choosen external port)
    --axon.local_port 9122 // (your choosen internal port)
#5 Miner

#5 Running the miner

- 5) Run a miner:
i.e. $ python ~/.bittensor/bittensor/miners/text/template_miner.py \
--subtensor.network $NETWORK \
--wallet.name $WALLET \
--wallet.hotkey $HOTKEY

Running the above command will start template_miner miner on your device using your newly created wallet. Please look at Running a Miner for a full explanation of the miner.

That's it! You've set up the Bittensor miner to run on your computer.

Happy knowledge mining! 🚀 🧠