Skip to content

Releases: frstrtr/c2pool

c2pool v0.1.1-alpha

13 Apr 14:44
2e2e81b

Choose a tag to compare

c2pool v0.1.1-alpha Pre-release
Pre-release

Changelog

[0.1.1-alpha] - 2026-04-13

Stability (Critical)

  • Fix tracker data race — IO-thread callbacks (PPLNS, ref_hash, sharechain window) accessed the share tracker without holding the shared lock while clean_tracker modified it on the compute thread. This use-after-free caused corrupted chain walks, allocating 10+ GB in seconds and triggering the kernel OOM killer. All hot-path callbacks now use shared_lock(try_to_lock).
  • Fix UTXO prune startup freezeprune_undo() looped from height 0 on every restart (6.1M iterations for DOGE). Now skips already-pruned range and batches to 500 records per call.
  • Fix memory leaksm_pplns_per_tip (unbounded map, now evicts at 200), m_rate_buckets (per-IP, now cleans after 1 hour), m_pplns_precompute_thread (detach broke re-spawn guard, now uses atomic flag).
  • External watchdog thread — separate std::thread detects event loop freezes (>30s unresponsive) and RSS limit breaches. Dumps heartbeat diagnostics, writes crash log, and aborts for core dump. Catches failures that the in-process watchdog timer cannot (since it freezes with the event loop).
  • RSS memory watchdog — checks process RSS every 10 seconds. Aborts cleanly before the kernel OOM killer sends uncatchable SIGKILL. Configurable via rss_limit_mb (default 4000 MB).

Cross-Platform

  • Windows build support — full MSVC 2022 compatibility: portable mul128_shift (no __uint128_t), reserved keyword renames (near/far), /bigobj for large TUs, Windows-specific config_path(), platform guards for /proc and sysconf.
  • Windows crash diagnostics — SEH exception handler writes MiniDump (.dmp) with thread stacks and data segments for WinDbg analysis. 8 MB stack for deep PPLNS recursion.
  • Windows installer — Inno Setup script with VC++ Runtime bundling, firewall rules (ports 9326/9327/8080/9333/22556), Start Menu shortcuts. Portable ZIP also available.
  • macOS build support — Apple Clang / libc++ compatibility: mutex-based atomic<shared_ptr> fallback, Boost 1.88-1.90 API fixes (expires_after, resolver::begin, boost::process v1/v2).
  • macOS DMG packagescreate-dmg.sh builds distributable .dmg with bundled libsecp256k1 (install_name_tool fixup for @executable_path). Both x86_64 and arm64 architectures.
  • CI pipeline — GitHub Actions: Linux (Ubuntu 24.04, GCC 13), macOS arm64 (Homebrew), Windows (MSVC 2022, Conan). CodeQL security analysis.

Documentation

  • Build guidesdoc/build-unix.md, doc/build-macos.md, doc/build-windows.md with tested configurations, embedded SPV running instructions, SHA256 verification.
  • macOS arm64 cross-compile guide — secp256k1 from source, cmake toolchain, DMG packaging.
  • KNOWN_ISSUES.md — open issues and platform limitations.

Changed

  • Dashboard directory validated at startup (log error if path broken).
  • CI CodeQL uses Release build (avoids LevelDB C++20 scoped enum bug).
  • Releases are manual (removed CI auto-publish job).

[0.12.0] - 2026-04-07

Milestone

  • Sharechain Transparency Explorer — Windows Defragmenter-style canvas visualization of the full sharechain window (8640 mainnet / 400 testnet shares) with interactive PPLNS treemaps, animated hover effects, and V36 upgrade pressure for miners.

Added

  • Defrag sharechain viewer — canvas grid where each share is a colored cell. Colors: blue (this node), green (verified), gray (unverified), yellow (orphan), red (dead), purple (pool fee), teal (V36 signaling). Gold/cyan/orange borders for LTC/DOGE/twin block solutions.
  • PPLNS Distribution treemap — interactive squarified treemap on dashboard and share detail pages. Shows per-miner LTC % and DOGE % with clickable addresses (Blockchair). V35-only miners shown desaturated with "NO DOGE" labels and red borders.
  • Animated hover effects — share cells enlarge 2.5x with white glow and spring animation. PPLNS treemap cells scale with brightness boost. Chain structure cells (Best Share, Verified Heads, Tails) as colored squares with tooltips.
  • Rich share tooltips — hash, absolute + relative height, miner address, hashrate, difficulty, age, version + desired version, coinbase tag, stale status, V36 signaling tags, LTC/DOGE block solution badges.
  • Block solution banners — share detail page shows prominent banners for block solutions: gold (LTC), cyan (DOGE), orange pulsing (LEGENDARY twin). Blockchair links, confirmations, block reward.
  • Modern share.html — complete redesign matching dashboard dark theme. Card layout with navigation, share data, local data, block header, generation TX, V36 metadata, full PPLNS treemap with DOGE payouts and version tags.
  • /sharechain/window enhanced — compact JSON keys, human-readable miner addresses, is_block_solution flag, desired_version, coinbase ASCII tag (longest 10+ char run with letters), DOGE discovered blocks.
  • /web/share/<hash> endpoint — full share lookup via set_share_lookup_fn callback. Returns p2pool-compatible JSON with block solution detection, DOGE block info, LTC confirmations.
  • V36? column in Current Payouts — green checkmark (V36), teal arrow (signaling), red X (V35 only, no DOGE).
  • Time axis — left-side hour labels on defrag grid showing share age per row.
  • WoW quality colors — Best Share: Epic purple glow. Twin blocks: Legendary orange pulse.

Changed

  • "My Shares" / "Mine" renamed to "This Node" throughout.
  • Share explorer section renamed to "Sharechain Transparency Explorer".
  • Donation field removed from tooltips (always 0 in V36+).

[0.9.5] - 2026-03-27

Milestone

  • Embedded DOGE merged mining — first DOGE block accepted on testnet4alpha via pure embedded SPV P2P. Zero daemon dependencies for LTC+DOGE mining.

Added

  • Embedded LTC SPV node (--embedded-ltc) — HeaderChain with LevelDB persistence, P2P header sync, MWEB HogEx carry-forward, mempool with conflict detection. Blocks accepted on LTC testnet.
  • Embedded DOGE SPV node (--embedded-doge) — AuxPoW header parser, DigiShield v3 difficulty, random subsidy via Mersenne Twister (boost-compatible), auto-generated --merged DOGE:98 spec.
  • DOGE-compatible P2P protocol — protocol version 70015, no NODE_WITNESS/NODE_MWEB, no sendcmpct v2, no feefilter, MSG_BLOCK instead of MSG_MWEB_BLOCK for DOGE peers.
  • AuxPoW header parserparse_doge_headers_message() extracts 80-byte base headers from DOGE extended P2P format (2000 headers/batch).
  • Isolated network modedisable_discovery for testnet4alpha: single-peer operation, no addr crawl, no emergency refresh.
  • DNS seed discovery — async DNS resolution with fixed seed fallback for both LTC and DOGE networks.
  • Addrman hardening — network group dedup, tried/new table separation, anchor peer persistence.
  • Block version from chain tip — derives BIP9/AuxPoW version bits from tip header instead of hardcoded constants.
  • Block hex logging — saves merged block hex to /tmp/c2pool_doge_block_*.hex for manual verification.

Fixed

  • Heap corruption in refresh_work() — two threads (embedded header callback + stratum submit) racing through build_coinbase_parts(). Fixed with try_lock serialization.
  • SIGSEGV #1: StratumSession timer use-after-free — timer callbacks held raw this pointer. Fixed with weak_from_this().
  • SIGSEGV #2: JobSnapshot map reference invalidated — copy by value instead of holding map reference.
  • DOGE coinbase overpay — testnet4alpha uses random rewards (Mersenne Twister seeded from prevHash), not fixed 500k DOGE. Implemented exact Dogecoin Core subsidy calculation.
  • DOGE AuxPoW version mismatch — committed block hash used version without AuxPoW bit (0x100), causing AuxPoW proof check failure. Both commit and submit now use identical version.
  • DOGE header sync stall — empty locator sent genesis hash causing peer to skip genesis block. Fixed: empty locator triggers genesis-inclusive response.
  • DOGE AuxPoW PoW validation — scrypt validation on AuxPoW blocks fails because PoW is on parent chain. Skip scrypt for AuxPoW heights.
  • O(n^2) header syncrebuild_height_index() on every header. Incremental update for linear chain.
  • bits=0 after checkpoint — chain too short for retarget. Fallback to pow_limit.
  • BIP9 version bits — hardcoded BLOCK_VERSION=4. Derive from chain tip.
  • NODE_MWEB not advertised — peers ignored MSG_MWEB_BLOCK requests. Added to version services.
  • Equal-work chain reorg — testnet min-difficulty blocks have equal work. Switch tip on equal work at same height.
  • Deadlock on reorg — tip-changed callback inside HeaderChain mutex. Deferred PendingTipChange.
  • Stale mempool transactions — never removed confirmed txs. Added remove_for_block + conflict detection.

[0.9.2] - 2026-03-20

Security

  • fix: Share target validation — Reject shares where target > max_target (matching p2pool-merged-v36 v0.14-alpha fix). Closes latent vulnerability present since p2pool inception.
  • fix: Bootstrap share target — Use hardest chain bits during bootstrap instead of MAX_TARGET. Prevents easy-share flooding when joining existing networks.

Bug Fixes

  • fix: PPLNS desired_weight cap — V36 exponential decay now uses unlimited desired_weight (2^288 - 1). The cap truncated the PPLNS window to ~2 shares on testnet, causing single-miner payouts.
  • fix: merged_payout_hash consensus — Walk VERIFIED chain only (not raw chain) to exclude c2pool's own unverified shares. Defer check until verified depth >= CHAIN_LENGTH. Fixes consensus divergence with p2pool peers.
  • fix: Share difficulty (desired_target) — Pass MAX_TARGET (clipped to pool share difficulty) instead of block difficulty. Block difficulty made shares 2634x too hard, causing c2pool's miner to contribute negligible PPLNS weight.
  • fix: PPLNS race condition — Recompute PPLNS from frozen prev_share in `build_c...
Read more

v0.1.0-alpha

12 Apr 13:10
ed737a1

Choose a tag to compare

v0.1.0-alpha Pre-release
Pre-release

c2pool v0.1.0-alpha — First Public Alpha

p2pool rebirth in C++. Decentralized Litecoin mining pool with Dogecoin merged mining.

Features

  • Full p2pool v36 protocol compatibility — joins existing p2pool network
  • Embedded SPV nodes — no litecoind or dogecoind required
  • Responsive web dashboard with PPLNS treemap, sharechain explorer, miner stats
  • Startup status page — real-time sync progress with LTC/DOGE SPV counters and ETA
  • Block explorer (Python) — bundled and auto-started via start.sh
  • Automatic difficulty adjustment for Scrypt ASICs
  • Merged mining (LTC + DOGE) with built-in merged mining manager
  • LevelDB persistent share storage
  • Recent checkpoints for fast initial sync (LTC: 3,088,000 / DOGE: 6,160,000)
  • voidbind.com bootstrap seed node for sharechain + coin peer discovery

What's New (since initial alpha)

UTXO Bootstrap Pipeline — Critical fix: cold start went from 4+ hours to ~2 minutes

  • Previous: tip block poisoned best_height, all bootstrap blocks silently dropped
  • Now: ordered block buffer with sliding window, timer-based stall detection
  • LTC: 289 blocks in ~20s, DOGE: 1400+ blocks in ~2.5 min

Coin Peer Discovery

  • /api/coin_peers endpoint — any c2pool node shares verified LTC/DOGE peers
  • HTTP peer fallback — new nodes fetch peers from seed nodes when DNS seeds fail
  • Updated DOGE fixed seeds (all previous seeds were dead)
  • Discovery chain: DNS seeds → fixed seeds (60s) → HTTP seeds (90s)

Dashboard & Loading Page

  • Instant redirect to dashboard when ready (was stuck on loading page)
  • Server routes / directly to dashboard on warm restart
  • Auto-detect public IP via ifconfig.me (stratum URL shows real IP)
  • Build-time version from git tags (shows exact commit)
  • Explorer nav button auto-detects port 9090

Explorer Integration

  • JSON-RPC adapter: Python explorer talks to c2pool as if it were a daemon
  • Accepts both JSON-RPC 1.0 and 2.0
  • getblockchaininfo, getblockhash, getblock, getmempoolinfo, getrawmempool

Download & Verify

VERSION="0.1.0-alpha"
wget https://github.com/frstrtr/c2pool/releases/download/v${VERSION}/c2pool-${VERSION}-linux-x86_64.tar.gz
wget https://github.com/frstrtr/c2pool/releases/download/v${VERSION}/c2pool-${VERSION}-linux-x86_64.tar.gz.sha256
sha256sum -c c2pool-${VERSION}-linux-x86_64.tar.gz.sha256

Tarball SHA256: 1fe4c90d80e9dd1ff61dc88e971779550ce6c974bc38e0981e701dd698bae618
Binary SHA256: 392ad1d5974cedebf4df3c0fb50cb839a0ed6407594bde120fa6884cdb365f37

Quick Start (Ubuntu 22.04 / 24.04)

tar xzf c2pool-${VERSION}-linux-x86_64.tar.gz
cd c2pool-${VERSION}-linux-x86_64
cp config/c2pool_mainnet.yaml.example config/c2pool_mainnet.yaml
./start.sh config/c2pool_mainnet.yaml

Point miners at stratum+tcp://YOUR_IP:9327 with your LTC address as username.

Dashboard: http://YOUR_IP:8080
Explorer: http://YOUR_IP:9090

First Start

On first launch c2pool syncs embedded LTC/DOGE SPV chains and downloads the p2pool sharechain. A status page shows real-time progress:

  • Syncing blockchain headers (fast — starts from checkpoint)
  • Downloading and verifying shares from p2pool peers
  • Building UTXO set (LTC: ~20s, DOGE: ~2.5 min)

First start takes 3-5 minutes total. Subsequent starts load from LevelDB cache in ~5 seconds.

Port Forwarding

Port Protocol Purpose Required
9326 TCP P2P sharechain Yes
9327 TCP Stratum mining Yes
8080 TCP Web dashboard Optional
9333 TCP LTC P2P (embedded SPV) Recommended
22556 TCP DOGE P2P (embedded SPV) Recommended

Package Contents

  • c2pool — main binary (8.7 MB, stripped release build)
  • start.sh — launches c2pool + block explorer
  • explorer/explorer.py — Python block explorer (auto-started)
  • web-static/ — dashboard, loading page, classic view, share explorer
  • lib/ — bundled shared libraries (libleveldb, libsecp256k1, libsnappy)
  • config/ — example YAML configs (mainnet + testnet)
  • c2pool.service — systemd unit file
  • INSTALL.md — full installation guide with build-from-source instructions

Requirements

  • Ubuntu 22.04 or 24.04 (x86_64)
  • 2 GB RAM minimum, 4 GB recommended
  • Python 3 (for block explorer, included in Ubuntu)
  • Public IP or port forwarding for P2P (9326) and stratum (9327)

Known Limitations (Alpha)

  • First cold start takes 3-5 minutes (SPV sync + share verification)
  • DOGE DNS seeds are all dead — uses hardcoded fallback peers
  • No automatic update mechanism

Warning

Alpha release for testing and early adoption. Monitor your node. Report issues at https://github.com/frstrtr/c2pool/issues.

v0.0.1 (legacy pre-release)

05 May 19:47

Choose a tag to compare

Pre-release

Legacy pre-release build (May 2024). Use v0.1.0-alpha or later for current builds.

Original note: Need to install: apt install libleveldb-dev