C2pool
C2pool: decentralized, DoS-resistant, Hop-Proof PoW mining pool.
Install / Use
/learn @frstrtr/C2poolREADME
c2pool — P2Pool rebirth in C++
C++ reimplementation of forrestv/p2pool targeting the V36 share format with Litecoin + multi-chain merged mining (DOGE, PEP, BELLS, LKY, JKC, SHIC). DigiByte Scrypt support planned as an additional parent chain.
Bitcoin wiki: https://en.bitcoin.it/wiki/P2Pool Original forum thread: https://bitcointalk.org/index.php?topic=18313
First merged-mined DOGE block: #6135703 (2026-03-23) — decentralized LTC+DOGE merged mining via P2Pool V36, cross-validated with c2pool on shared share chain
First daemonless DOGE block: (2026-03-27) — DOGE block accepted on testnet4alpha via embedded SPV P2P, no dogecoind RPC needed
Quick start
# 1 — prerequisites (Ubuntu 24.04)
sudo apt-get install -y g++ cmake make libleveldb-dev libsecp256k1-dev python3-pip
pip install "conan>=2.0,<3.0" --break-system-packages
conan profile detect --force
# 2 — clone and build
git clone https://github.com/frstrtr/c2pool.git
cd c2pool && mkdir build && cd build
conan install .. --build=missing --output-folder=. --settings=build_type=Debug
cmake .. --preset conan-debug
cmake --build . --target c2pool -j$(nproc)
# 3 — run (zero config)
./src/c2pool/c2pool
That's it. No litecoind, no dogecoind, no config file. The node starts in integrated P2P pool mode with embedded LTC and DOGE SPV nodes, connects to p2pool sharechain peers via hardcoded bootstrap hosts, and waits for shares before opening stratum to miners.
Miners connect to stratum and set their LTC payout address as the username
(p2pool convention). No --address flag needed.
Full step-by-step guide: doc/build-unix.md
Operating modes
c2pool has four operating modes. The default is a full P2P pool — no flags required.
| Mode | CLI flag | P2P sharechain | Coinbase payouts | Use case |
|------|----------|:-:|---|---|
| Integrated | (default) | yes | PPLNS from sharechain | Decentralized pool node |
| Solo | --solo | no | Proportional by miner hashrate | Private pool for own ASICs |
| Custodial | --custodial | no | 100% to --address | Hosted pool, off-chain accounting |
| Sharechain | --sharechain | yes | (no mining) | P2P relay node only |
Legacy --standalone mode (minimal stratum + RPC daemon, no embedded SPV) is available for backwards compatibility.
Startup examples
# Default: full P2P pool, embedded SPV, wait for peers
./c2pool
# Same, with explicit address for node-owner fee
./c2pool --address YOUR_LTC_ADDRESS --fee 1
# Solo pool for own miners (no sharechain, proportional payouts)
./c2pool --solo
# Custodial pool (all coinbase to operator, stratum for accounting)
./c2pool --custodial --address YOUR_LTC_ADDRESS
# With external LTC daemon instead of embedded SPV
./c2pool --no-embedded-ltc \
--coind-address 127.0.0.1 --coind-rpc-port 9332 \
--rpcuser user --rpcpassword pass
# Testnet
./c2pool --testnet
# With config file
./c2pool --config config/c2pool_mainnet.yaml
# Full option reference
./c2pool --help
Feature matrix
| Feature | Integrated | Solo | Custodial | Sharechain |
|---------|:---:|:---:|:---:|:---:|
| Embedded LTC SPV | on | on | on | -- |
| Embedded DOGE SPV | on | on | on | -- |
| Stratum server | yes | yes | yes | -- |
| VARDIFF | yes | yes | yes | -- |
| P2P share exchange | yes | -- | -- | yes |
| PPLNS payouts | yes | -- | -- | -- |
| Proportional payouts | -- | yes | -- | -- |
| Single-address coinbase | -- | -- | yes | -- |
| Merged mining (DOGE etc.) | yes | yes | yes | -- |
| Web dashboard + REST API | yes | yes | yes | -- |
| Per-worker accounting | yes | yes | yes | -- |
| --address required | no | no | yes | no |
| --fee supported | yes | yes | -- | -- |
| Redistribute modes | yes | -- | -- | -- |
| ShareTracker / LevelDB | yes | -- | -- | yes |
| Think loop / monitoring | yes | -- | -- | -- |
Payout model by mode
| Mode | Who gets paid | How amounts are calculated |
|------|---------------|---------------------------|
| Integrated | All miners in PPLNS window | Share weight from sharechain (decentralized consensus) |
| Solo | Connected stratum miners | Proportional to real-time hashrate from RateMonitor |
| Custodial | Node operator only | 100% of block reward to --address; miners tracked in /stratum_stats |
In integrated and solo modes, miners set their payout address as
their stratum username (e.g., LcAddress.worker1). The address appears
directly in coinbase outputs. --address is optional — it serves as the
node operator's fee destination and fallback when no miners are connected.
In custodial mode, miner stratum usernames are used for accounting only
and never appear in coinbase outputs. The backoffice polls /stratum_stats
for per-worker hashrate, accepted shares, and connection time.
Defaults
Running c2pool with no arguments is equivalent to:
--integrated --embedded-ltc --embedded-doge --wait-for-peers
--header-checkpoint 3079000:862daf...
--doge-header-checkpoint 6140000:743b7e...
| Setting | Default | Override |
|---------|---------|----------|
| Operating mode | Integrated P2P pool | --solo, --custodial, --sharechain, --standalone |
| LTC backend | Embedded SPV (DNS seeds) | --no-embedded-ltc (requires RPC daemon) |
| DOGE backend | Embedded SPV | --no-embedded-doge (disables merged mining) |
| LTC bootstrap | Block 3,079,000 | --header-checkpoint HEIGHT:HASH |
| DOGE bootstrap | Block 6,140,000 | --doge-header-checkpoint HEIGHT:HASH |
| Startup mode | Wait for peers (persist=true) | --genesis or --startup-mode auto |
| Coin daemon | Not required | --coind-address / --coind-rpc-port |
| --address | Optional (miners use stratum username) | Required only for --custodial |
| --fee | 0% | -f 1 (1% to --address) |
| Stratum port | 9327 | -w PORT |
| P2P port | 9326 | --p2pool-port PORT |
| Web port | 8080 | --web-port PORT |
Testnet overrides
On --testnet, mainnet SPV checkpoints are automatically cleared (testnet
uses a different chain). Ports shift to testnet defaults (P2P 19326,
stratum 19327).
Peer discovery and sharechain bootstrap
The sharechain P2P layer discovers peers from multiple sources:
| Source | Config | Priority |
|--------|--------|----------|
| CLI seed nodes | -n HOST:PORT (repeatable) | Highest |
| YAML config | seed_nodes: list | Appended to CLI |
| ~/.c2pool/ltc/pool.yaml | bootstrap_addrs: (auto-generated, persists learned peers) | Medium |
| Hardcoded bootstrap hosts | ml.toom.im, usa.p2p-spb.xyz, + 9 IPs | Fallback |
With startup_mode: wait (default), the node waits until peers deliver
shares before opening stratum. This matches p2pool's PERSIST=True behavior.
| Startup mode | CLI flag | Behavior |
|-------------|----------|----------|
| wait (default) | --wait-for-peers | Wait for peers to deliver shares, then mine |
| genesis | --genesis | Create first share immediately (new chain) |
| auto | --startup-mode auto | Wait 60s for peers, then genesis |
Merged mining
LTC and DOGE have built-in embedded SPV nodes (enabled by default). Other chains need their daemon running externally.
| Coin | chain_id | Backend | --merged example |
|------|----------|---------|---------------------|
| DOGE | 98 | Embedded SPV | auto-configured |
| PEP | 63 | External | PEP:63:127.0.0.1:29377:user:pass |
| BELLS | 16 | External | BELLS:16:127.0.0.1:19918:user:pass |
| LKY | 8211 | External | LKY:8211:127.0.0.1:9916:user:pass |
| JKC | 8224 | External | JKC:8224:127.0.0.1:9770:user:pass |
| SHIC | 74 | External | SHIC:74:127.0.0.1:33863:user:pass |
| DINGO | 98 | External | Cannot run with DOGE (same chain_id) |
DOGE merged mining activates automatically when --embedded-doge is on (default).
External daemons use createauxblock/submitauxblock RPC.
DigiByte Scrypt is planned as a second parent chain (--net digibyte),
running its own P2Pool sharechain network.
Ports
| Port | Purpose | |------|---------| | 9326 | P2Pool sharechain (peer-to-peer) | | 9327 | Stratum mining | | 8080 | Web dashboard + REST API |
Configuration
CLI arguments always take priority over YAML values.
# Use a YAML config file
./c2pool --config config/c2pool_mainnet.yaml
See config/c2pool_mainnet.yaml (mainnet) and config/c2pool_testnet.yaml (testnet) for complete examples with all options documented.
Configuration reference
| CLI flag | YAML key | Default | Description |
|----------|----------|---------|-------------|
| --integrated | integrated | true | Full P2P pool mode |
| --solo | solo | false | Solo pool (no sharechain) |
| --custodial | custodial | false | Custodial pool (single-address coinbase) |
| --sharechain | sharechain | false | P2P node only (no mining) |
| --standalone | -- | false | Legacy solo (RPC daemon, no embedded SPV) |
| --embedded-ltc | embedded_ltc | true | Embedded LTC SPV node |
| --no-embedded-ltc | | | Disable embedded LTC, use RPC daemon |
| --embedded-doge | embedded_doge | true | Embedded DOGE SPV for merged mining |
| --no-embedded-doge | | | Disable embedded DOGE |
| --net | -- | litecoin | Blockchain: litecoin, bitcoin, dogecoin |
| --testnet | testnet | false | Enable testnet mode |
| --config FILE | -- | -- | YAML config file path |
| --address | solo_address | -- | Node operator payout address (optional) |
| --give-author | donation_percentage | 0.1 | Developer fee % (p2pool default: 0.5%) |
| -f / --fee | node_owner_fee | 0 | Node
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
