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 stable toolchain (1.75.0 or later)
rustup toolchain install stable --component rustfmt clippy# 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 | Plot file generator (v1, low-VRAM fallback) |
| pocx_plotter_v2 | Plot file generator (v2, GPU-fused pipeline, recommended; requires โฅ 3 GiB GPU memory) |
| 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 chains (pools or local nodes)
chains:
- name: 'primary_pool'
rpc_transport: http # http | https
rpc_host: 'pool.example.com'
rpc_port: 8080
rpc_auth:
type: none # none | user_pass | cookie
# username: 'miner'
# password: 'secret'
block_time_seconds: 120
submission_mode: pool # pool | wallet
# Optional per-account quality overrides
# accounts:
# - account: '0123456789abcdef...'
# target_quality: 500000
# Plot file directories - all drives containing .pocx plot files
plot_dirs:
- 'D:\'
# - '/mnt/plots' # Linux example
# Performance settings
cpu_threads: 0 # 0 = auto-detect
hdd_use_direct_io: true
show_progress: trueSee pocx_miner/miner_config.yaml for the complete reference (cookie auth, HTTPS pools, multi-chain setups).
For comprehensive documentation, see the Wiki:
- Plotter Guide - Complete guide to plot file generation
- Miner Guide - Mining configuration and operation
- Aggregator Guide - Mining proxy configuration and setup
- 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