Skip to content

CPU Mining

Solo mining PoT-O challenges using native CPU computation.

Overview

CPU mining is the simplest way to start participating in PoT-O consensus. Your machine directly fetches challenges from the validator, computes proofs, and submits results.

Getting Started

1. Get a Challenge

Request a new challenge from the validator:

bash
curl -X POST https://pot.rpc.gateway.tribewarez.com/challenge \
  -H "Content-Type: application/json" \
  -d '{"slot": 12345, "slot_hash": "abcdef..."}'

The response contains:

  • challenge_id - Unique identifier for this challenge
  • operation_type - Type of tensor operation (e.g., matmul, conv, etc.)
  • input_tensor - The tensor to optimize
  • difficulty - Current network difficulty
  • mml_threshold - Maximum compression ratio allowed
  • path_distance_max - Maximum neural path distance

2. Compute and Submit

Your miner software executes the tensor operation, finds a valid nonce, and submits the proof:

bash
curl -X POST https://pot.rpc.gateway.tribewarez.com/submit \
  -H "Content-Type: application/json" \
  -d '{
    "proof": {
      "challenge_id": "...",
      "challenge_hash": "...",
      "tensor_result_hash": "...",
      "mml_score": 0.72,
      "path_signature": "...",
      "path_distance": 3,
      "computation_nonce": 42,
      "computation_hash": "...",
      "miner_pubkey": "your_solana_pubkey"
    }
  }'

3. Check Status

Monitor your mining progress:

bash
# Get network status
curl https://pot.rpc.gateway.tribewarez.com/status

# Get your miner stats
curl https://pot.rpc.gateway.tribewarez.com/miners/your_solana_pubkey

Difficulty Scaling

Difficulty adjusts dynamically based on slot height. Higher difficulty means:

FactorImpact
MML ThresholdTighter compression constraints (lower max ratio)
Path DistanceSmaller Hamming distance tolerance for neural paths
Nonce SpaceMore iterations needed to find valid proof

Optimization Tips

CPU Selection

  • Multi-core CPUs benefit most from parallel challenge solving
  • Intel and AMD x86-64 recommended for best performance
  • ARM (M1/M2 Mac) supported but may be slower

Memory Usage

  • Tensor operations require temporary memory for intermediate results
  • Typical challenge fits in 2-8 GB RAM
  • Monitor memory pressure during intense mining periods

Thermal Management

  • Extended mining generates significant CPU heat
  • Ensure adequate cooling (good airflow, thermal paste)
  • Consider throttling (mining fewer challenges) to extend hardware life

Power Efficiency

  • CPU mining uses 100-400W depending on core count and frequency
  • Consider electricity costs vs. PoT-O rewards
  • GPU mining may be more efficient (see GPU Mining)

Troubleshooting

Challenge Fetch Fails

  • Verify network connectivity to pot.rpc.gateway.tribewarez.com
  • Check if validator is running: curl https://pot.rpc.gateway.tribewarez.com/health
  • Ensure your Solana pubkey is registered

Proof Submission Rejected

  • Verify mml_score meets current mml_threshold
  • Check that path_distancepath_distance_max
  • Confirm challenge_hash matches the challenge you received

Low Hash Rate

  • Verify CPU isn't thermally throttled
  • Check background processes consuming CPU
  • Consider optimizing tensor computation algorithm

Example: Minimal CPU Miner

python
#!/usr/bin/env python3
import requests
import hashlib
import json
from solders.keypair import Keypair

VALIDATOR_URL = "https://pot.rpc.gateway.tribewarez.com"

def mine():
    keypair = Keypair()
    pubkey = str(keypair.pubkey())
    
    # Get challenge
    resp = requests.post(f"{VALIDATOR_URL}/challenge", json={
        "slot": 12345,
        "slot_hash": "abcdef..."
    })
    challenge = resp.json()
    
    # Compute proof (simplified)
    tensor_result = compute_tensor_operation(challenge["input_tensor"])
    tensor_hash = hashlib.sha256(str(tensor_result).encode()).hexdigest()
    
    # Find valid nonce
    for nonce in range(1000000):
        mml_score = compute_mml(tensor_result)
        if mml_score <= challenge["mml_threshold"]:
            break
    
    # Submit proof
    proof = {
        "challenge_id": challenge["id"],
        "challenge_hash": challenge["hash"],
        "tensor_result_hash": tensor_hash,
        "mml_score": mml_score,
        "path_signature": "sig...",
        "path_distance": 3,
        "computation_nonce": nonce,
        "computation_hash": hashlib.sha256(str(nonce).encode()).hexdigest(),
        "miner_pubkey": pubkey
    }
    
    resp = requests.post(f"{VALIDATOR_URL}/submit", json={"proof": proof})
    return resp.json()

if __name__ == "__main__":
    result = mine()
    print(json.dumps(result, indent=2))

Next Steps

TribeWarez Blockchain Ecosystem