Comparison
CashStratum vs plain CKPool
CashStratum keeps CKPool's C engine and adds what Bitcoin Cash operators need. 22 capabilities below are absent or partial upstream. Every row cites the source it was checked against.
- Engine files changed
- 27
- Lines added / removed
- +2,791 / −1,633
- Go operator API
- ~8.4k lines
- Regression scripts
- 16
Comparison snapshot: CashStratum v1.2.5 and CKPool 9578eb6 (October 14, 2026). Excludes vendored secp256k1. Later upstream changes can appear as removals.
Chain
Bitcoin Cash as the target chain
Built for BCH nodes: no segwit rule in getblocktemplate, BCH address handling throughout. Upstream targets Bitcoin (BTC).
src/bitcoin.c:108-110 (gbt_req omits rules; 'BCH has no segwit'); upstream src/bitcoin.c:21 understood_rules={"segwit"}
View source ↗
Payouts
Native CashAddr payout addresses (bitcoincash:, bchtest:, bchreg:)
Miners authorize with a CashAddr; it is checksum-validated and decoded locally.
src/cashaddr_simple.c:137 cashaddr_decode_checked(); src/bitcoin.c:56 bch_classify_address(); upstream: grep -ri cashaddr src → 0 hits
View source ↗Network prefix auto-detected from the node, fail-closed
Mainnet/testnet/regtest prefix is detected over RPC; an unknown chain or RPC failure retries instead of defaulting to mainnet.
src/generator.c:260 detect_cashaddr_prefix(), :281-310; CHANGELOG 1.2.1 'Chain detection fails closed'; upstream: no cashaddr prefix logic
View source ↗Solo payout straight to the miner's address in the coinbase
Both pay the block reward directly to the address the miner authorizes with; CashStratum does it with BCH addresses.
src/stratifier.c:6519-6567 (generator_checkaddr → address_to_txn); upstream has the same solo path for BTC addresses
View source ↗Configurable operator fee as a second coinbase output
poolfee/pooladdress add an operator output (clamped 0–50%, dust-suppressed). Upstream only offers a developer-donation output.
src/stratifier.c:693-740; src/ckpool.c:1754-1764 poolfee clamp; config options poolfee/pooladdress/bchaddress absent upstream
View source ↗Refuses work that would pay nothing
Empty payout scripts and templates without coinbasevalue are rejected rather than producing a coinbase with no payout.
src/bitcoin.c:169-185 (coinbasevalue required); CHANGELOG 1.2.1/1.2.2 Security; test/nodecompat.c; upstream reads missing coinbasevalue as 0
View source ↗
Stats
Per-address round shares and luck
Each miner address tracks its own round and luck, reset for the finder on a block solve.
src/stratifier.c:181 round_shares; :10679-10708 per-user luck; upstream: grep -i luck src/stratifier.c → 0 hits
View source ↗
Rentals
NiceHash and MiningRigRentals detection
Rental services are recognised from the user agent and given a suitable starting difficulty (overridable).
src/stratifier.c:5973-5996; :6810-6816 rental_diff; upstream: grep -i 'nicehash\|rental' src → 0 hits
View source ↗
Difficulty
Pattern-based minimum-difficulty overrides
mindiff_overrides config applies difficulty floors by worker name or user agent, clamped to configured bounds.
src/ckpool.c (mindiff_overrides option); src/stratifier.c:5858 clamp_requested_diff(), :5910; option absent from upstream ckpool.c
View source ↗
Nodes
Bitcoin Cash Node (BCHN)
Reference node for CashStratum.
src/bitcoin.c:108-110; docs/installation.md 'Supported nodes'
View source ↗BCHD and Flowee the Hub
Every RPC carries an id (required by BCHD), coinbaseaux is optional (Flowee), BCHD network names recognised. Community contribution.
src/bitcoin.c:171,181; src/generator.c:281; CHANGELOG 1.2.2; upstream: grep -i 'bchd\|flowee' → 0 hits
View source ↗ZMQ block notifications
Both subscribe to node ZMQ; CashStratum adds a 5-second RPC tip-polling backstop and socket recovery.
src/ckpool.c:1859 zmqblock (upstream src/ckpool.c:1801); CHANGELOG 1.2.1 'Block notifications recover on their own'
View source ↗Multiple node entries with failover
Inherited from CKPool: a list of nodes in the btcd array.
src/ckpool.c:1738 'btcd' array; upstream src/ckpool.c:1726
View source ↗
Blocks
Large-template merkle construction (>65,535 transactions)
Heap-backed merkle branches keep every transaction of a large BCH template; upstream caps template transactions at 65,535.
src/merkle.c cashstratum_merkle_branch(), src/stratifier.c:1581; test/merklebranch.c (65,535 / 65,536 / 300,000 txs); upstream src/stratifier.c:423 MAX_GBT_TXNS 65535
View source ↗Coinbase finality check before block submit
Diagnostic check logs loudly on a non-final coinbase but still submits, so a predicate bug can never cost a block.
src/coinbase_final.c; test/cbfinal.c (20 vectors); upstream: 0 hits
View source ↗
Security
Share-accounting hardening
Rejected/repeated shares no longer inflate hashrate, share logs are append-only, shares without a per-user coinbase are rejected. Upstream separately caps rejected-difficulty totals.
src/stratifier.c 'No user coinbase'; SECURITY-share-inflation.md; docs/security-hardening.md; upstream test/reject_stats.c, src/stratifier_stats.h
View source ↗Pre-auth username hardening
Fixed an out-of-bounds read in address decoding (proven under AddressSanitizer) and sanitises client usernames before logging.
src/cashaddr_simple.c:37,137; src/stratifier.c sanitise_addr(); CHANGELOG 1.2.0 Security; upstream has no CashAddr decoder
View source ↗Strict client framing and difficulty bounds
Connector parses exactly one complete frame; suggest_difficulty and password diff tokens are clamped to configured limits.
src/stratifier.c:5858 clamp_requested_diff(); testing/connector_framing_regression.py, testing/diffpolicy_regression.py; CHANGELOG 1.2.1
View source ↗
Protocol
Stratum V2 (Noise, job declaration, SV1 bridge)
Both ship SV2 behind --enable-sv2; CashStratum carries BCH-specific changes and ported upstream's certificate fixes in 1.2.5.
src/sv2_*.c in both trees; configure.ac:135 (upstream :143); CHANGELOG 1.2.5
View source ↗
Modes
Proxy, passthrough, redirector and node modes
Same modes as CKPool, also installed under cashstratum/csproxy command names.
src/Makefile.am:102-104 (cashstratum, csproxy symlinks); src/ckpool.c:2170; upstream src/Makefile.am:82, src/ckpool.c:2109
View source ↗
Proxy
disableproxy also drops subproxies
Disabling a parent upstream in proxy mode now closes its subproxies and stops recruiting, so failover actually moves.
src/generator.c:1562, :4466; CHANGELOG 1.2.1
View source ↗
Operations
HTTP operator API
Go service exposing /stats, /shares, /coinbase, /find-block, /health, /metrics and log queries, token-authenticated and rate-limited. Upstream offers only the local unix-socket ckpmsg interface.
api/ckpool_api_server.go:2717-2729; docs/operator-api.md; upstream: no api/ directory
View source ↗Public /ping latency probe
Unauthenticated, rate-limited endpoint for measuring regional latency to the pool.
api/ckpool_api_server.go:757 pingMiddleware, :1898 handlePing, :2729; api/ping_test.go
View source ↗Block-find notifier service
Separate notifier with systemd units for block-found alerts.
api/notifier/, api/NOTIFIER.md, api/cashstratum-notifier.service
View source ↗Guided installer, monitor and log-retention tooling
install-cashstratum.sh, csproxy installer, monitor.sh terminal dashboard, systemd log-prune timer.
install-cashstratum.sh; scripts/install-csproxy.sh; monitor.sh; api/cashstratum-logprune.timer; upstream: none of these files
View source ↗
Quality
Regtest end-to-end money gate in CI
Every PR and release mines real BCH regtest blocks and checks payouts (89/89 assertions at 1.2.1); plus unit tests and Go tests.
testing/regtest-e2e.sh; .github/workflows/pr-gate.yml:113-158, release-gate.yml; upstream bitbucket-pipelines.yml (build/unit only, 13 lines)
View source ↗Regression suites beyond unit tests
16 scripted regressions (installer, payouts, share security, notifications, framing); upstream has C unit tests only.
testing/*.py, testing/*.sh (16 scripts); test/cashaddr.c, nodecompat.c, merklebranch.c, cbfinal.c; upstream test/ (17 C files)
View source ↗
Honest differences
Where upstream differs
Bitcoin (BTC) support: segwit, bech32/taproot addresses
CashStratum is BCH-only; segwit is never requested and BTC address types are not accepted.
Developer donation output
Removed in CashStratum (its BTC addresses cannot be encoded on BCH); replaced by an operator-configured fee.
SV2 channel groups (standard/extended group IDs per spec 5.2.3)
Present in upstream src/sv2_strat.c:30-33 with test/sv2_groups.c; newer than CashStratum's rebase.
Rejected-difficulty capping in stats
Upstream src/stratifier_stats.h and test/reject_stats.c cap rejected totals; CashStratum addresses share inflation differently.
Additional SV2 job-declaration and proxy-job tests
Upstream test/sv2_jd_retention.c, sv2_jdc_session.c, sv2_proxy_jobs.c, validate_address.c have no CashStratum counterpart.
CashStratum is a fork of CKPool by Con Kolivas and contributors, licensed GPLv3. Upstream remains the right choice for Bitcoin (BTC) pools. Found an inaccuracy? Open an issue.