Mining Guide
Configure and optimize TensorChain mining on Apple Silicon, Kneron accelerators, and sharded pools.
TensorChain Mining
TensorChain is a Proof of Useful Work algorithm designed to favor consumer NPUs over industrial GPU farms. It exploits the "Batch-1 Efficiency Gap" where unified memory architectures outperform PCIe-bound systems.
Memory-Bound
Matrix size targets 75% of system RAM, creating a Proof of Memory Capacity
INT8 Operations
Saturates Neural Engine tensor cores with integer arithmetic
Fast Verification
Freivalds' algorithm verifies in O(n²) vs O(n³) compute
MLX Backend Setup
Requirements
- Apple Silicon Mac (M1/M2/M3 series)
- macOS 13.0+ (Ventura or later)
- Xcode Command Line Tools
- 64 GB+ Unified Memory recommended
Installation
# Install MLX framework pip install mlx # Build tensor-miner with MLX backend cd po8-core/miner cargo build --release --features mlx
Configuration
# ~/.po8/miner.toml [backend] type = "mlx" [tensorchain] # Matrix dimension (auto-calculated from RAM if not set) matrix_size = 8192 # Target RAM usage (0.75 = 75%) memory_target = 0.75 # Use INT8 precision precision = "int8" [performance] # Pin to performance cores pin_cores = true # Number of mining threads threads = "auto"
Running the Miner
# Start mining ./target/release/tensor-miner \ --config ~/.po8/miner.toml \ --node http://localhost:26657 # With verbose logging RUST_LOG=debug ./target/release/tensor-miner --config ~/.po8/miner.toml
Performance Tuning
Memory Allocation
Close other applications to maximize available unified memory. The miner performs best with uninterrupted memory access.
Thermal Management
Ensure adequate cooling. Sustained mining can throttle if temperatures exceed 100°C.
Power Settings
Disable sleep and use "High Power Mode" on MacBooks for consistent performance.
Edge Accelerator Setup
Supported Devices
KL520
Entry-level, image classification workloads
KL720
Recommended for TensorChain shards
KL730
High-performance edge mining
Installation
# Install Kneron SDK pip install kneron-plus # Build tensor-miner with Kneron backend cd po8-core/miner cargo build --release --features kneron # Verify device detection ./target/release/tensor-miner --backend kneron --list-devices
Configuration
# ~/.po8/miner-kneron.toml [backend] type = "kneron" device_id = 0 [sharding] # Enable sharded mining for memory-constrained devices enabled = true # Shard size (smaller = less memory required) shard_size = 512 # Pool coordinator address pool_url = "https://pool.po8.network"
Sharded Mining
Kneron devices participate in sharded mining pools where large matrices are decomposed into sub-blocks.
Useful Work Tasks
Beyond TensorChain entropy, InferNet lets miners earn rewards by executing useful AI inference tasks.
Supported Models
MobileNetV2
Image ClassificationResNet50
Image ClassificationINT8 QuantizedBERT-Tiny
Text EmbeddingLlama-3-8B
Text GenerationEnable InferNet
# Add to miner.toml [infernet] enabled = true # Models to support models = ["mobilenetv2", "resnet50"] # Stake for optimistic verification stake = 100 # Maximum concurrent tasks max_tasks = 4
Verification Flow
Execute
Miner runs inference, posts result + state hash
Challenge Window
Fishermen can dispute within challenge period
Bisection
Disputes narrow to single divergent instruction
Resolution
On-chain execution determines truth, loser slashed
Mining Dashboard
Built-in Metrics
# View mining statistics ./target/release/tensor-miner status # Output: # Mining Status: Active # Backend: MLX (Apple M2 Ultra) # Matrix Size: 8192x8192 # Memory Usage: 98.5 GB / 128 GB # Hashrate: 1.2 H/s # Shares Submitted: 847 # Shares Accepted: 842 # Power Draw: ~85W # Temperature: 78°C
Prometheus Metrics
# Enable metrics endpoint [metrics] enabled = true port = 9090 # Available metrics: # po8_miner_hashrate # po8_miner_shares_submitted # po8_miner_shares_accepted # po8_miner_power_watts # po8_miner_temperature_celsius # po8_miner_memory_used_bytes
Mining Rewards
Block Rewards
Base emission for valid TensorChain proofs
InferNet Fees
Task fees from useful inference work
Mixnet Relay
Bandwidth rewards for privacy relay
Profitability Factors
- Hardware efficiency (Joules per valid share)
- Memory bandwidth utilization
- Network difficulty adjustment
- Electricity costs in your region
- InferNet task availability
Ready to Mine?
Set up your node and start contributing to the Po8 network.
