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-.gitcd -Engram-pip install -e .
02
Create a wallet
bash
btcli wallet new_coldkey --wallet.name engrambtcli 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=engramWALLET_HOTKEY=minerNETUID=42SUBTENSOR_NETWORK=testUSE_LOCAL_EMBEDDER=true
06
Start the miner
bash
python neurons/miner.py --wallet.name engram --wallet.hotkey miner --netuid 42
Configuration
| Variable | Default | Description |
|---|---|---|
| NETUID | 42 | Subnet UID |
| SUBTENSOR_NETWORK | test | test | finney | ws://... |
| WALLET_NAME | engram | Coldkey wallet name |
| WALLET_HOTKEY | miner | Hotkey name |
| MINER_PORT | 8091 | HTTP server port |
| MINER_IP | 0.0.0.0 | Bind address |
| USE_LOCAL_EMBEDDER | true | true = sentence-transformers, false = OpenAI |
| OPENAI_API_KEY | — | Required if USE_LOCAL_EMBEDDER=false |
| FAISS_INDEX_PATH | ./data/engram.index | Vector index persistence path |
| MAX_TEXT_LENGTH | 8192 | Max chars per ingest request |
| RATE_LIMIT_RPM | 60 | Max requests per minute per hotkey |
| MIN_STAKE_TAO | 0.001 | Min 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 MinerAfter=network.target[Service]User=ubuntuWorkingDirectory=/home/ubuntu/-Engram-Environment=PATH=/home/ubuntu/-Engram-/.venv/binExecStart=python neurons/miner.py --wallet.name engram --wallet.hotkey miner --netuid 42Restart=on-failure[Install]WantedBy=multi-user.target
bash
systemctl daemon-reloadsystemctl enable engram-minersystemctl start engram-miner
Monitoring
bash
# View logsjournalctl -u engram-miner -f# Check wallet statsengram wallet-stats# Check your miner's scoreengram 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 →