Run a Node & Start Mining
Join the FractalAI network as a miner. Generate Julia set fractals, earn FRAI rewards, and help secure a post-quantum blockchain.
Testnet Live
How Proof of Fractal Work Mining Works
Generate
Node creates a Julia set fractal challenge
Analyze
Compute fractal dimensions & metrics
Score
Closer to golden ratio (φ=1.618) = higher score
Validate
Network verifies the fractal proof
Reward
Miner receives FRAC block reward
Hardware Requirements
CPU
Any modern x86_64 processor. Fractal mining is CPU-based, more cores = faster blocks.
RAM
Memory for block processing, state storage, and P2P networking.
Storage
RocksDB storage for blocks, state, and transaction history.
Network
P2P port (30303/TCP) must be accessible. Stable connection with low latency preferred.
OS: Ubuntu 22.04+ / Debian 12+ (recommended) — also works on macOS and Windows (WSL2)
Rust: Version 1.85.0 specifically (newer versions have a wasmer compatibility issue)
Build tools: gcc, pkg-config, libssl-dev, clang
Step-by-Step Installation
1Install System Dependencies
sudo apt update && sudo apt install -y \
build-essential pkg-config libssl-dev git clang2Install Rust 1.85.0
# Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
# Install and set Rust 1.85.0 (REQUIRED - newer versions break wasmer)
rustup install 1.85.0
rustup default 1.85.0
# Verify
rustc --version
# Should output: rustc 1.85.0Important: Rust versions above 1.85 removed __rust_probestack which the WASM VM (wasmer 4.2) still references. Using Rust 1.86+ will cause a linker error. Always use rustup default 1.85.0.
3Clone and Build
# Clone the repository
git clone https://github.com/johnInarti/FRACTAL-AI.git
cd FRACTAL-AI/blockchain
# Build in release mode
cargo build --release
# Verify the binary
./target/release/fractal-node --help4Create Your Miner Wallet
You need a wallet address to receive mining rewards. Create one from the FractalAI web app:
Option A: Web Wallet
- 1. Go to fractalai.net.co/wallet
- 2. Click "Create New Wallet"
- 3. Set a password and save your keyfile
- 4. Copy your address (starts with
0x)
Option B: Quick CLI
5Initialize and Start Mining
# Create data directory
sudo mkdir -p /var/lib/fractal/data-testnet
sudo chown $USER:$USER /var/lib/fractal/data-testnet
# Initialize the testnet chain (creates genesis block)
./target/release/fractal-node testnet init
# Get the seed node's current Peer ID (run this first!)
curl -s http://159.223.197.61:9545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_getNodeInfo","params":[],"id":1}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['result'])"
# Set environment variables
export FRACTAL_BOOTSTRAP_NODES="/ip4/159.223.197.61/tcp/30303/p2p/PASTE_PEER_ID_HERE"
export FRACTAL_DATA_DIR="/var/lib/fractal/data-testnet"
# Start mining! (replace YOUR_ADDRESS with your wallet address)
./target/release/fractal-node \
--rpc-port 9545 \
testnet start \
--mining \
--coinbase YOUR_ADDRESSINFO Mining started with N threads INFO Mined block #1 score=XXXXX difficulty=XX time=XXms
6Run as a System Service (Production)
# Create the service file
sudo tee /etc/systemd/system/fractal-miner.service > /dev/null << 'SERVICEFILE'
[Unit]
Description=FractalAI Miner Node
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=YOUR_USERNAME
WorkingDirectory=/home/YOUR_USERNAME/fractal-ai/blockchain
Environment="FRACTAL_BOOTSTRAP_NODES=/ip4/159.223.197.61/tcp/30303/p2p/PASTE_PEER_ID"
Environment="FRACTAL_DATA_DIR=/var/lib/fractal/data-testnet"
ExecStart=/home/YOUR_USERNAME/fractal-ai/blockchain/target/release/fractal-node --rpc-port 9545 testnet start --mining --coinbase YOUR_ADDRESS
Restart=always
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
SERVICEFILE
# Replace YOUR_USERNAME, PASTE_PEER_ID, and YOUR_ADDRESS above, then:
sudo systemctl daemon-reload
sudo systemctl enable fractal-miner
sudo systemctl start fractal-miner
# Check that it's running
sudo systemctl status fractal-miner
sudo journalctl -u fractal-miner -f --no-pager✓Verify Your Node
# Check node health
curl -s http://localhost:9545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_health","params":[],"id":1}' | python3 -m json.tool
# Expected output:
# {
# "block_height": 12345, <-- Should increase
# "mining": true, <-- Must be true
# "peer_count": 1, <-- Connected to seed node
# "status": "ok"
# }
# Check your balance (mining rewards)
curl -s http://localhost:9545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["YOUR_ADDRESS","latest"],"id":1}'
# Get testnet FRAC from faucet
curl -s http://159.223.197.61:9545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_faucet","params":["YOUR_ADDRESS",100],"id":1}'Mining Rewards
Under Modelo 3, miners earn FRAI tokens (100 per block) as the sole mining reward. FRAC has zero new emission and is purely deflationary. Block scores are calculated using fractal quality metrics — the closer your fractal's Hausdorff dimension is to the golden ratio (φ = 1.618033...), the higher your score.
Score = Hausdorff(35%) + Correlation(20%) + Similarity(30%) + Spectrum(15%)
Golden Ratio Bonus: up to 1.5x if Hausdorff is within 5% of φ (1.618)
Max Score: 1,000,000
Min Score for Valid Block: 1,000 (testnet) / varies (mainnet)Troubleshooting
Build fails with "__rust_probestack" error
You are using Rust > 1.85. Run: rustup default 1.85.0 and rebuild.
Node starts but block_height stays at 0
Delete the data directory and re-initialize: rm -rf /var/lib/fractal/data-testnet && ./target/release/fractal-node testnet init
peer_count is 0
Check that: (1) Port 30303 TCP is open in your firewall, (2) The Peer ID in FRACTAL_BOOTSTRAP_NODES is current (it changes on seed node restart), (3) Run the curl command from Step 5 to get the latest Peer ID.
"No head block - call init() first"
The database is corrupted or from an old version. Delete the data directory and run testnet init again.
Mining is very slow / high CPU
Testnet mining should be fast (2-10ms per block). If blocks take longer, ensure you pulled the latest code with the optimized solve() function.
Ecosystem Applications
These applications are already integrated with FractalAI. Users create wallets directly in each app.
FincAI
Personal finance AI assistant
- AI financial advisor
- Budget tracking
- Receipt scanning
- Investment goals
KpitApp
Venture OS management platform
- DAO governance
- Treasury management
- 8 smart contracts
- 7 AI agents
EngagedNet
Social network with AI agents
- AI agent NFTs
- Audio rooms
- Tournaments
- Post-quantum wallet
Quick Reference - Useful RPC Commands
# Node health check
curl -s http://localhost:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_health","params":[],"id":1}'
# Get block height
curl -s http://localhost:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# Get your balance
curl -s http://localhost:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["YOUR_ADDR","latest"],"id":1}'
# Get node info (peer count, chain ID, mining status)
curl -s http://localhost:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_getNodeInfo","params":[],"id":1}'
# Get current mining challenge details
curl -s http://localhost:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_getChallenge","params":[],"id":1}'
# Get network statistics
curl -s http://localhost:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_getNetworkStats","params":[],"id":1}'
# Request testnet FRAC from faucet
curl -s http://159.223.197.61:9545 -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"fractal_faucet","params":["YOUR_ADDR",100],"id":1}'