PoCX is a high-performance Proof-of-Capacity (PoC) cryptocurrency mining framework written in Rust. It provides tools for plot generation, mining, verification, and testing for PoC-based blockchains.
Proof of Capacity is an eco-friendly consensus algorithm that uses pre-computed plot files stored on hard drives to participate in blockchain consensus. Unlike energy-intensive Proof-of-Work mining, PoC mining consumes minimal electricity after the initial plotting phase.
- 🚀 High Performance: SIMD-optimized cryptographic operations (SSE2/AVX/AVX2/AVX512)
- 🎮 GPU Acceleration: OpenCL support for faster plotting
- ⛓️ Multi-Chain Ready: Support for multiple PoC blockchains
- 🔒 Enhanced Security: Helix-resistant format prevents storage reduction attacks
- ⚡ Scalable PoW: Adjustable proof-of-work difficulty (X1, X2, X4, ...)
- 📊 Built-in Testing: Mock blockchain for development and testing
- 💻 Cross-Platform: Windows, Linux, macOS support
# Install Rust nightly toolchain
rustup toolchain install nightly --component rustfmt clippy
rustup override set nightly# Clone the repository
git clone https://github.com/PoC-Consortium/pocx.git
cd pocx
# Build all components
cargo build --release
# Create a plot file (example: 10 warps = ~10GB)
./target/release/pocx_plotter -i <your_address> -p /path/to/plots -w 10
# Start mining (requires config.yaml)
./target/release/pocx_miner -c config.yaml| Component | Description |
|---|---|
| pocx_hashlib | Core cryptographic library with SIMD optimizations |
| pocx_address | Address encoding/decoding utilities |
| pocx_plotfile | Plot file I/O with memory-mapped operations |
| pocx_plotter | High-performance plot file generator |
| pocx_miner | Mining client supporting multiple chains |
| pocx_aggregator | Mining proxy aggregating submissions from multiple miners |
| pocx_verifier | Plot file integrity verification tool |
| pocx_protocol | JSON-RPC 2.0 protocol implementation |
| pocx_mockchain | Mock blockchain for testing |
# Mining pools
chains:
- name: "primary_pool"
base_url: "http://pool.example.com:8080"
api_path: "/pocx"
accounts:
- account: "your_account_id"
# Plot file directories
plot_dirs:
- "/path/to/plots1"
- "/path/to/plots2"
# Performance settings
cpu_threads: 8
hdd_use_direct_io: true
show_progress: trueFor comprehensive documentation, see the Wiki:
- Plotter Guide - Complete guide to plot file generation
- Miner Guide - Mining configuration and operation
- Plot Format Specification - Technical format details
- Technical Details - Nonce construction and security analysis
# Run all tests
cargo test --workspace
# Run CI pipeline
./ci/run-ci.sh# Run performance benchmarks
cargo bench --workspaceThe plot format is based on POC2, originally specified by Burstcoin, with enhancements:
- Fixed security vulnerabilities (on-the-fly compression prevention)
- Scalable PoW for plot generation
- SIMD-aligned layout optimizations
- Enhanced compression capabilities
- Miner: Based on PoC-Consortium/scavenger
- Plotter: Based on PoC-Consortium/engraver
We welcome contributions! Please ensure your code:
- Passes all tests (
cargo test --workspace) - Follows Rust formatting (
cargo fmt) - Passes clippy lints (
cargo clippy)
PoCX is released under the MIT License. See LICENSE for details.
Organization: Proof of Capacity Consortium
Project: PoCX - Proof of Capacity neXt Generation