Skip to content

PoC-Consortium/pocx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

53 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PoCX - A neXt Generation Proof of Capacity Framework

Release License: MIT Rust Website

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.

What is Proof of Capacity?

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.

Key Features

  • ๐Ÿš€ 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

Quick Start

Prerequisites

# Install Rust stable toolchain (1.75.0 or later)
rustup toolchain install stable --component rustfmt clippy

Build & Run

# 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

Project Components

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

Example Configuration

Mining Configuration (miner_config.yaml)

# 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: true

See pocx_miner/miner_config.yaml for the complete reference (cookie auth, HTTPS pools, multi-chain setups).

Documentation

For comprehensive documentation, see the Wiki:

Development

Running Tests

# Run all tests
cargo test --workspace

# Run CI pipeline
./ci/run-ci.sh

Benchmarks

# Run performance benchmarks
cargo bench --workspace

Attribution

Plot Format

The 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

Source Projects

Contributing

We welcome contributions! Please ensure your code:

  • Passes all tests (cargo test --workspace)
  • Follows Rust formatting (cargo fmt)
  • Passes clippy lints (cargo clippy)

License

PoCX is released under the MIT License. See LICENSE for details.

Contact

Organization: Proof of Capacity Consortium
Project: PoCX - Proof of Capacity neXt Generation


About

PoCX - A neXt generation Proof of Capacity Framework

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors