Repository navigation
c2pool v0.2.12.10
c2pool v0.2.12.10
This release fixes LTC miners being held at a far too high difficulty after a restart, frees stratum slots held by dead connections, and lets an LTC node restore the pool's found-block history from another node. DASH gets shorter tracker lock holds and a --listen HOST that binds HOST. It builds on v0.2.12.9. Recommended for every LTC node.
Stratum difficulty (all coins)
- No more difficulty runaway after a restart. When many miners connected at once, a burst of easy shares could push a miner's difficulty up ×10 per retarget until the clamp, far above the pool-share target. Such a miner then sent no pool shares at all until it reconnected, which showed as a pool hashrate well below what the farm measures. Now:
- the retarget only times shares mined at the current difficulty;
- the difficulty sent to a miner never exceeds the job's pool-share difficulty, and
mining.set_difficultyis sent before the job; - the hashrate estimate for a new connection uses its real age instead of a fixed 10-minute window.
- Miner password options.
d=Nsets the start difficulty, in the miner's own units.+Nfixes the difficulty for the session, in p2pool's units (on scrypt coins+1sends 65536 to the miner), as in p2pool.
LTC
- Dead stratum connections no longer fill the miner cap. LTC had TCP keepalive, the handshake timeout, the idle reaper and the write-queue cap all off, so sessions whose miner had gone away kept their slot until the cap of 100 refused new miners. Now:
- keepalive and
TCP_USER_TIMEOUTdetect dead peers within about two minutes; - a connection that sends no subscribe within 30 s, or no work for 30 minutes, is closed;
- at the cap, a dead or idle session is freed for the new miner before anyone is refused;
- optional
--max-stratum-connections-per-ip(off by default; IPv6 is counted per /64); - refusals are logged as a summary every 10 s instead of one line per connection.
- keepalive and
- Restore the found-block history:
--import-found-blocks FILE. A node that lost or never had the pool's block list can load it from another node's/recent_blocksand/recent_merged_blocksJSON:curl -s https://<node>/recent_blocks -o blocks.json curl -s https://<node>/recent_merged_blocks -o merged.json c2pool-ltc ... --import-found-blocks blocks.json --import-found-blocks merged.json- Every block is checked against the node's own header chain; a block that is not on it is refused.
- Only missing rows are added; existing rows are never changed.
- Rows are marked "imported". Blocks below the header checkpoint (LTC 3,088,000, DOGE 6,160,000) cannot be checked and are skipped.
- A file must be a regular file of at most 64 MiB.
- Running it again adds nothing that is already there; remove the flag after the first start.
- Share-chain best changes reach miners at once. A clean best-share change now sends new work and re-advertises the best share, without waiting for the next tick.
- A lock bug in the found-block and merged-block hooks is fixed. The startup scan could take the tracker lock it already held.
DASH
--listen HOST:PORTbinds HOST. It bound every interface while the startup line named HOST. Production nodes listening on0.0.0.0are unaffected.- Shorter tracker lock holds. Dropping old share-chain tails is capped at 32 shares per pass, and head heights are cached within a pass. One pass used to hold the tracker for up to 9 s after a share-chain switch.
Upgrade order
Restart one node at a time. Before you restart the next node, wait until the restarted node is back on the live share chain, with the same best share as its peers. Share validation, payouts and the network protocol are unchanged from v0.2.12.9.
Going back to v0.2.12.9 on the same data directory works. One display detail: v0.2.12.9 shows an imported block that names a miner as a local find. If v0.2.12.9 updates such a row (for example its status), the "imported" mark is lost and the row reads as recorded after a later upgrade. No share, payout or block is affected.
Build
c2pool-dashrequires dashbls (see README "Dash: build with BLS"), as in v0.2.12.9.
Known issues
--soloand--custodialremain disabled.- On LTC the pool hashrate is the share chain's non-stale rate. It reads about 10% below what miners measure, so effort reads about 10% low and luck about 10% high, until shares report stale work (#2250).
- DASH Best Share still shows a share target rather than the node's own best hash.
Verify the download
SHA256SUMS is signed with key 99556F8DE6AD66057A1A10EC50AB1379285EFE76:
gpg --verify SHA256SUMS.asc SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS