EngramEngramDocs

Run a Miner

Miners store embedding vectors in a FAISS index and serve them to validators and SDK clients. They earn TAO for provably holding the data.

Requirements

CPU4+ cores
RAM8 GB minimum
Storage50 GB SSD
Python3.10 or higher
NetworkStatic IP recommended
TAO0.001 τ minimum stake

Setup

01
Clone and install
bash
git clone https://github.com/Dipraise1/-Engram-.git
cd -Engram-
pip install -e .
02
Create a wallet
bash
btcli wallet new_coldkey --wallet.name engram
btcli wallet new_hotkey --wallet.name engram --wallet.hotkey miner
03
Get testnet TAO

Request test tokens from the faucet or transfer from an existing wallet.

bash
btcli wallet faucet --wallet.name engram --subtensor.network test
04
Register on the subnet
bash
btcli subnet register --netuid 42 --wallet.name engram --wallet.hotkey miner --subtensor.network test
05
Configure .env
bash
cp .env.example .env
# Edit these values:
WALLET_NAME=engram
WALLET_HOTKEY=miner
NETUID=42
SUBTENSOR_NETWORK=test
USE_LOCAL_EMBEDDER=true
06
Start the miner
bash
python neurons/miner.py --wallet.name engram --wallet.hotkey miner --netuid 42

Configuration

VariableDefaultDescription
NETUID42Subnet UID
SUBTENSOR_NETWORKtesttest | finney | ws://...
WALLET_NAMEengramColdkey wallet name
WALLET_HOTKEYminerHotkey name
MINER_PORT8091HTTP server port
MINER_IP0.0.0.0Bind address
USE_LOCAL_EMBEDDERtruetrue = sentence-transformers, false = OpenAI
OPENAI_API_KEYRequired if USE_LOCAL_EMBEDDER=false
FAISS_INDEX_PATH./data/engram.indexVector index persistence path
MAX_TEXT_LENGTH8192Max chars per ingest request
RATE_LIMIT_RPM60Max requests per minute per hotkey
MIN_STAKE_TAO0.001Min stake to pass the stake check

Start as a service

For production, run the miner as a systemd service so it restarts on failure:

/etc/systemd/system/engram-miner.service
[Unit]
Description=Engram Miner
After=network.target
[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/-Engram-
Environment=PATH=/home/ubuntu/-Engram-/.venv/bin
ExecStart=python neurons/miner.py --wallet.name engram --wallet.hotkey miner --netuid 42
Restart=on-failure
[Install]
WantedBy=multi-user.target
bash
systemctl daemon-reload
systemctl enable engram-miner
systemctl start engram-miner

Monitoring

bash
# View logs
journalctl -u engram-miner -f
# Check wallet stats
engram wallet-stats
# Check your miner's score
engram status --live --netuid 42
Warning
Keep your hotkey registered on-chain and ensure the miner is reachable from the internet. Validators that can't reach your axon will give you a score of 0.
engram docs · v0.1edit on github →