-
Notifications
You must be signed in to change notification settings - Fork 0
Mining Guide
- GPU: NVIDIA (CUDA), AMD (ROCm), Apple Silicon (MPS), or Intel (DirectML)
- Python: 3.10+
- RAM: 8GB minimum, 16GB recommended
- Storage: 10GB for models and cached data
- Internet: Required for downloading data from MAST/SDSS/ZTF
git clone https://github.com/thekillsquad007/voidmap.git
cd voidmap/miner
pip install -r requirements.txtMulti-backend support — requirements.txt installs the right PyTorch for your hardware:
# NVIDIA (default)
pip install -r requirements.txt
# AMD (ROCm 6.2)
pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6.2
pip install onnxruntime onnx
# Apple Silicon (MPS)
pip install -r requirements.txt # MPS included in stock PyTorch
# Intel/AMD (DirectML via ONNX)
pip install -r requirements.txt
pip install onnxruntime-directml
# CPU only
pip install -r requirements.txt # works on CPU as fallbackpython voidmap-miner.py --detectOutput:
PyTorch: 2.1.0
GPU 0: NVIDIA GeForce RTX 3080 (10.0 GB)
Backend: ONNX (CUDA)
ONNX providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
lightkurve: OK
astropy: OK
Device: cuda
Results: /home/user/.voidmap/results
The miner auto-selects the best backend in this priority order:
- PyTorch CUDA (NVIDIA) — fastest
- PyTorch ROCm (AMD)
- ONNX DirectML (Intel/AMD on Windows)
- ONNX CPU (anywhere, always works)
- PyTorch CPU (fallback)
# Solo mode: mine and save results locally (no on-chain submission)
python voidmap-miner.py --task exoplanet --rounds 10
# Submit mode: mine and submit directly to MiningPool on-chain
python voidmap-miner.py --task exoplanet --rounds 10 --submit \
--rpc https://mainnet.base.org \
--pk 0xYOUR_PRIVATE_KEY
# Run continuously until interrupted
python voidmap-miner.py --task exoplanet --submit --rpc https://mainnet.base.org --pk 0x...
# Mine all three task types in rotation
python voidmap-miner.py --task all --submit --rpc https://mainnet.base.org --pk 0x...python voidmap-miner.py --list-resultsOutput:
Recent Results (5 total):
exoplanet_TOI-732_1717440000.json
Target: TOI-732 | Prediction: PLANET (87.3%)
Quality: 87/100 | Backend: onnx-cuda | Source: MAST TESS SPOC 2-min cadence
Submitted: tx 0xabc...def (block 12345)
galaxy_NGC_4565_1717439000.json
Galaxy: NGC 4565 | Class: Spiral (92.1%)
Quality: 92/100 | Backend: pytorch-rocm | Source: SDSS DR18 cutout
Mine and save results locally without on-chain submission:
python voidmap-miner.py --task exoplanet --rounds 100- No blockchain transaction fees
- No wallet needed
- Results stored at
~/.voidmap/results/ - Useful for testing, development, or contributing to research without claiming rewards
Mine AND submit each valid result directly to the MiningPool contract:
python voidmap-miner.py --task exoplanet --submit \
--rpc https://mainnet.base.org \
--pk $DEPLOYER_PK- Costs ~0.00001 ETH per submission (Base gas is cheap)
- Earns VOID rewards based on quality + halving + elastic multiplier
- 12-second cooldown enforced on-chain between submissions per miner
- Min 2-second compute duration enforced on-chain (anti-ASIC)
- Quality must be ≥ 50 to be accepted
Connect to a mining pool for more consistent rewards:
python stratum_miner.py --pool ws://pool.voidmap.org:3333 --user YOUR_ADDRESS- Work distributed by pool
- Shares validated locally
- Rewards split among pool members
- 2% pool fee
python voidmap-miner.py --task exoplanet --rounds 10What happens:
- Downloads real TESS light curve from MAST (NASA)
- Preprocesses (quality filter, normalize, phase-fold)
- Runs AstroNetCNN model
- Outputs: PLANET / FALSE_POSITIVE / NO_SIGNAL
Known targets (pre-verified):
- TOI-732 (2 planets)
- TOI-1452 (1 planet)
- TOI-700 (4 planets)
- TOI-1259, TOI-1444
# List known targets
python voidmap-miner.py --list-targets
# Mine specific target
python voidmap-miner.py --task exoplanet --target-idx 0python voidmap-miner.py --task galaxy --rounds 10What happens:
- Downloads galaxy image from SDSS DR18 (NSF)
- Resizes to 224x224 RGB
- Runs ConvNeXT classifier
- Outputs: Spiral / Elliptical / Irregular / Merger / Unknown
python voidmap-miner.py --task anomaly --rounds 10What happens:
- Downloads ZTF alerts from Fink broker (NSF)
- Extracts features
- Runs autoencoder
- Outputs: anomaly scores + flags
python voidmap-miner.py --task all --rounds 30Rotates through all 3 task types. Each task processed in turn.
The miner auto-selects the best ML backend for your hardware.
ModelBackend.auto()
→ PyTorchBackend(cuda) # NVIDIA GPU
→ PyTorchBackend(rocm) # AMD GPU
→ ONNXBackend(providers=['DmlExecutionProvider']) # Intel/AMD on Windows
→ ONNXBackend(providers=['CUDAExecutionProvider']) # NVIDIA via ONNX
→ ONNXBackend(providers=['CPUExecutionProvider']) # any CPU
→ PyTorchBackend(cpu) # PyTorch CPU fallback| Backend | Speed | Hardware | Notes |
|---|---|---|---|
pytorch-cuda |
★★★★★ | NVIDIA | Fastest, requires CUDA toolkit |
pytorch-rocm |
★★★★ | AMD | Requires ROCm 6.2 |
onnx-cuda |
★★★★ | NVIDIA | ONNX runtime, no CUDA toolkit needed |
onnx-dml |
★★★ | Intel/AMD | DirectML on Windows |
onnx-cpu |
★★ | any CPU | Slowest but always works |
pytorch-cpu |
★★ | any CPU | Last resort fallback |
The pre-trained model is exported to ONNX (miner/astronet_cnn.onnx, 15MB) for cross-platform compatibility. Max inference difference vs PyTorch: 0.00000191 (negligible).
# Force a specific backend
python voidmap-miner.py --task exoplanet --backend onnx-cpuAvailable backends: pytorch-cuda, pytorch-rocm, pytorch-mps, pytorch-cpu, onnx-cuda, onnx-rocm, onnx-dml, onnx-cpu.
HiveOS has Docker support built in. One command and you're mining.
NVIDIA GPUs:
# Pull the image (after release)
docker pull thekillsquad007/voidmap-miner:latest
# Run with your wallet
docker run -d \
--name voidmap-miner \
--restart unless-stopped \
--gpus all \
-e VOIDMAP_PK=0xYOUR_PRIVATE_KEY \
-e VOIDMAP_RPC=https://mainnet.base.org \
-e VOIDMAP_TASK=all \
thekillsquad007/voidmap-miner:latestAMD GPUs:
docker run -d \
--name voidmap-miner \
--restart unless-stopped \
--device /dev/kfd \
--device /dev/dri \
--security-opt seccomp=unconfined \
-e VOIDMAP_PK=0xYOUR_PRIVATE_KEY \
-e VOIDMAP_RPC=https://mainnet.base.org \
-e VOIDMAP_TASK=all \
thekillsquad007/voidmap-miner:latestDocker Compose:
# NVIDIA
docker compose up -d voidmap-miner
# AMD
docker compose --profile amd up -d voidmap-miner-amd# SSH into your HiveOS rig
ssh hive@YOUR_RIG_IP
# Run the installer
curl -fsSL https://raw.githubusercontent.com/thekillsquad007/voidmap/main/install_hiveos.sh | sudo bash
# Configure
export VOIDMAP_PK=0xYOUR_PRIVATE_KEY
export VOIDMAP_RPC=https://mainnet.base.org
export VOIDMAP_TASK=all
# Start
sudo systemctl start voidmap-miner
sudo systemctl status voidmap-miner
# Use the `voidmap` wrapper
voidmap --detect
voidmap --task exoplanet --rounds 10The installer:
- Auto-detects GPU vendor (NVIDIA / AMD / Intel)
- Installs ROCm PyTorch for AMD GPUs
- Installs ONNX Runtime
- Creates a
voidmapwrapper at/usr/local/bin/voidmap - Installs systemd service
voidmap-miner.service - Configures auto-start on boot
# Wallet
export VOIDMAP_PK=0xYOUR_PRIVATE_KEY # for --submit mode
# RPC endpoint
export VOIDMAP_RPC=https://mainnet.base.org
# Results directory
export VOIDMAP_RESULTS_DIR=~/.voidmap/results
# Model cache
export VOIDMAP_MODEL_DIR=~/.voidmap/models
# IPFS (optional, for storing results off-chain)
export PINATA_API_KEY=your_key
export PINATA_API_SECRET=your_secret
# Mining config
export VOIDMAP_TASK=exoplanet # exoplanet | galaxy | anomaly | all
export VOIDMAP_COOLDOWN=12 # seconds between submissions (min 12 enforced on-chain)
# Pool settings (if using pool mining)
export VOIDMAP_POOL_PORT=3333python voidmap-miner.py --help
Options:
--task {exoplanet,galaxy,anomaly,all} Mining task
--rounds N Number of rounds (default: infinite)
--batch N Batch size
--target-idx N Specific target index
--backend {pytorch-cuda,pytorch-rocm,pytorch-cpu,onnx-cuda,onnx-dml,onnx-cpu}
Force specific ML backend
--submit Submit results on-chain to MiningPool
--rpc URL Base RPC endpoint
--pk KEY Wallet private key (for --submit)
--detect Show hardware + backend info
--list-tasks Show available tasks
--list-results Show past results
--list-targets Show known exoplanet targetsResults are saved as JSON at ~/.voidmap/results/:
{
"task": "exoplanet_transit",
"target": "TOI-732",
"tic_id": "TIC 307210830",
"prediction": "PLANET",
"confidence": 0.873,
"probabilities": {
"planet": 0.873,
"false_positive": 0.092,
"no_signal": 0.035
},
"quality_score": 87,
"model": "AstroNetCNN (sarojpatil16/exoplanet-transit-detector)",
"backend": "onnx-cuda",
"data_source": "MAST TESS SPOC 2-min cadence",
"input_hash": "0xabc123...",
"output_hash": "0xdef456...",
"model_hash": "0x789abc...",
"samples": 2048,
"duration_ms": 4521,
"gpu": "NVIDIA GeForce RTX 3080",
"ipfs_cid": "QmXxx...",
"timestamp": 1717440000,
"tx_hash": "0x123abc...def" // only if --submit
}The miner automatically enforces the on-chain anti-ASIC rules:
| Check | Threshold | Failure Mode |
|---|---|---|
| Quality floor | ≥ 50 | Reject submission |
| Compute duration | ≥ 2s | Reject submission (reverted on-chain) |
| Submission cooldown | ≥ 12s | Skip submission |
| Hardware signature | GPU detected | Mark as suspicious |
| Data integrity | Hash matches | Reject submission |
If --submit mode detects that your work would be rejected on-chain, it skips the transaction to save gas.
- Target may not have TESS observations
- Try a different target index
- Check MAST portal for available data
- Check internet connection
- MAST may be temporarily unavailable
- Try again in a few minutes
- Model confidence was below 50
- This can happen with noisy data
- The share will be rejected by the pool
- Reduce batch size:
--batch 16 - Close other GPU applications
- Use a GPU with more VRAM
The miner auto-falls back to ONNX-CPU. To force a specific backend:
python voidmap-miner.py --backend onnx-cpu --task exoplanetYour result was rejected for being under 2 seconds. The miner should have caught this before sending. If it didn't, file an issue.
Ensure you've added --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined flags. Also check that ROCm is installed on the host (HiveOS supports ROCm out of the box for many cards).
# Testnet (Base Sepolia)
python voidmap-miner.py --task exoplanet --submit \
--rpc https://sepolia.base.org \
--pk $DEPLOYER_PKApproximate submissions per hour (exoplanet task, single GPU):
| GPU | VRAM | Backend | Submissions/hr |
|---|---|---|---|
| RTX 4090 | 24GB | pytorch-cuda | ~300 |
| RTX 3080 | 10GB | pytorch-cuda | ~200 |
| RTX 3060 | 12GB | pytorch-cuda | ~150 |
| RX 7900 XTX | 24GB | pytorch-rocm | ~250 |
| RX 6800 XT | 16GB | pytorch-rocm | ~180 |
| Apple M2 Max | 32GB | pytorch-mps | ~100 |
| Intel Arc A770 | 16GB | onnx-dml | ~120 |
| CPU (32 cores) | n/a | pytorch-cpu | ~10 |
Numbers assume 12s cooldown per submission. Higher quality = more VOID per submission.
- Join a pool for more consistent rewards
- Read about anti-ASIC measures
- Query results via API
- Read about mainnet features (halving, elastic mint, challenge/slash, timelock)
- Deploy contracts to earn on-chain