Skip to content

frstrtr/c2pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

c2pool - p2pool rebirth in c++

(started 02.02.2020)

based on Forrest Voight (https://github.com/forrestv) concept and python code (https://github.com/p2pool/p2pool)

Bitcoin wiki page - https://en.bitcoin.it/wiki/P2Pool

Bitcointalk forum thread - https://bitcointalk.org/index.php?topic=18313

Some technical details - https://bitcointalk.org/index.php?topic=457574

🎯 Enhanced C2Pool - Refactored Implementation

C2Pool has been completely refactored with enhanced features and clear terminology separation:

✨ Key Improvements

  • πŸ”„ Share Type Separation - Clear distinction between:
    • mining_shares - From physical miners via Stratum protocol
    • p2p_shares - From cross-node P2Pool communication
  • ⚑ Automatic Difficulty Adjustment (VARDIFF) - Dynamic mining difficulty
  • πŸ“Š Real-time Hashrate Tracking - Accurate performance monitoring
  • πŸ’Ύ Persistent Storage - LevelDB-based sharechain persistence
  • 🌐 Web Interface - JSON-RPC mining interface with monitoring
  • πŸ” Blockchain-specific Address Validation - Multi-coin support
  • πŸ“ˆ Enhanced Statistics - Separated mining vs P2P metrics

πŸ—οΈ Modular Components

  • hashrate/ - Real-time hashrate tracking with mining_share metrics
  • difficulty/ - Automatic difficulty adjustment engine
  • storage/ - Persistent LevelDB sharechain storage
  • node/ - Enhanced C2Pool node implementation
  • archive/ - Legacy code archive (for reference only)

πŸš€ Quick Start

Building

git clone https://github.com/username/c2pool.git
cd c2pool
mkdir build && cd build
cmake ..
make c2pool        # Primary executable (refactored)
make c2pool_enhanced  # Explicit enhanced version

Running

# Integrated mining pool for Litecoin testnet
./c2pool --integrated 0.0.0.0:8084 --blockchain ltc --testnet

# Enhanced sharechain node
./c2pool --sharechain --testnet --port 9333

# Help
./c2pool --help

πŸ“Š Current Implementation

  • Primary Entry Point: src/c2pool/c2pool_refactored.cpp
  • Build Targets: c2pool (primary), c2pool_enhanced (explicit)
  • Legacy Files: Archived in archive/ directory for reference

Build Enhanced C2Pool

mkdir -p build && cd build
cmake ..
make c2pool_enhanced -j4

Run Mining Pool with Web Interface

./src/c2pool/c2pool_enhanced --testnet --integrated 0.0.0.0:8083

Access web interface at: http://localhost:8083

Run Enhanced Sharechain Node

./src/c2pool/c2pool_enhanced --testnet --sharechain

Available Options

./src/c2pool/c2pool_enhanced --help

πŸ“Š Features

  • βœ… Automatic difficulty adjustment (VARDIFF)
  • βœ… Real-time hashrate tracking
  • βœ… Legacy share tracker compatibility
  • βœ… LevelDB persistent storage
  • βœ… JSON-RPC mining interface
  • βœ… WebUI for monitoring

See REFACTORING_SUMMARY.md for detailed technical information.


Donations towards further development of с2pool implementation in C++

PayPal donation:

Donate

image

Telegram

https://t.me/c2pooldev

Discord:

https://discord.gg/yb6ujsPRsv

Install: