Skip to content

Latest commit

 

History

History
198 lines (129 loc) · 4.97 KB

File metadata and controls

198 lines (129 loc) · 4.97 KB

Sample Miner Installation

Table of Contents


Overview

Overview

This guide outlines the installation process for a Vericore miner.

Two sample miners are provided:

  • Perplexity Naive Miner – Integrated with Perplexity
  • Perplexica Naive Miner – Integrated with Perplexica

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.10 or higher (Currently 3.13 isn't supported in certain packages)
  • Git
  • Bittensor SDK
    • Requirements for bittensor sdk includes Rust and Cargo

Setup Instructions

1. Clone the Repository

Clone this repository to your local machine:

git clone [email protected]:dfusionai/Vericore.git
cd Vericore

2. Install Dependencies

Install the required Python packages:

Note: It's recommended to use a virtual environment to manage dependencies.

Rust and Cargo

Rust is the programming language used in Substrate development. Cargo is Rust package manager.

Install rust and cargo:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Update your shell's source to include Cargo's path:

source "$HOME/.cargo/env"

Bittensor Cli

pip install bittensor

3. Create Wallets

You'll need to create wallets for the miner.

Using btcli

The btcli tool is used to manage wallets and keys.

  1. Create a Coldkey (can be shared between miner and validator):

    btcli w new_coldkey --wallet.name mywallet
  2. Create Hotkeys:

    • Miner Hotkey:

      btcli w new_hotkey --wallet.name mywallet --wallet.hotkey miner_hotkey --netuid 70

4. Register Wallets

Register the miner on the Bittensor network.

  • Register the Miner:

    btcli s register --wallet.name mywallet --wallet.hotkey miner_hotkey  --netuid 70

Note: If you're not connecting to the Mainnet, use the following to specify a different network:

 --subtensor.chain_endpoint ws://127.0.0.1:9944`

5. Additional Requirements

Perplexity Miner

Perplexity can be used to fetch the required information from the subnet. To use this miner, set the Perplexity API Key as an environment variable:

export PERPLEXITY_API_KEY=<your_api_key>

or on Windows

$env:PERPLEXITY_API_KEY="<your_api_key>"

Perplexica Miner

Perplexica is a required dependency for this Perplexica Miner. It must be installed locally before use.

Installation

Follow the installation instructions provided in the Perplexica repository:

Installation Guide

Search Engine Endpoint

The search engine endpoint is used to fetch the required information. More details can be found here:

Search API Documentation

Configuration

Set the Perplexica URL in your environment variables as follows:

export PERPLEXICA_URL=<your_perplexica_url>

or on Windows

$env:PERPLEXICA_URL="<your_perplexica_url>"

Running the Miner

In one terminal window, navigate to the project directory and run:

python -m miner.perplexity.miner --wallet.name bittensor --wallet.hotkey miner_hotkey --axon.ip=<EXTERNAL_IP> --axon.port 8901 --netuid 70

Note: If you're not connecting to the Mainnet, use the following to specify a different network:

 --subtensor.network ws://127.0.0.1:9944`

Arguments:

  • --wallet.name: The name of the wallet.
  • --wallet.hotkey: The hotkey name for the miner.
  • --subtensor.network: The Bittensor network to connect to.
  • --axon.ip: The external ip address of the miner

Monitoring and Logging

The miner will output logs to the console and save logs to files in the following directory structure:

~/.bittensor/wallets/<wallet.name>/<wallet.hotkey>/netuid<netuid>/miner/
  • Miner Logs: Located in the miner directory.

You can monitor these logs to observe the interactions and performance metrics.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Feel free to contribute, raise issues, or suggest improvements to this template. Happy mining and validating on the Bittensor network!