|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## [0.9.1] - 2026-03-19 |
| 4 | + |
| 5 | +### Added (untested — implemented, needs live validation) |
| 6 | +- **BIP 152 compact blocks** — full send/receive path, SipHash-based short |
| 7 | + IDs, block reconstruction from mempool, wtxidrelay negotiation (BIP 339). |
| 8 | + LevelDB pruning of evicted shares. 20 new tests. |
| 9 | +- **AutoRatchet V36→V37** — autonomous share version transition state machine |
| 10 | + with voting, activation thresholds, and rollback safety. 23 new tests. |
| 11 | +- **Redistribute V2** — graduated boost, hybrid mode, threshold-based |
| 12 | + activation, opt-in per miner. 19 new tests. |
| 13 | +- **Naughty share punishment** — ancestor propagation + head scoring penalty |
| 14 | + for misbehaving share chains. |
| 15 | +- **Merged coinbase consensus verification** — 7-step chain verification |
| 16 | + prevents merged mining reward theft. `merged_payout_hash` verified in |
| 17 | + `share_check()`. |
| 18 | +- **Canonical merged coinbase** — PPLNS coinbase with THE state root anchoring |
| 19 | + in merged chain blocks (DOGE, etc.). |
| 20 | +- **Merged PPLNS compatibility** — 3-tier address normalization matching |
| 21 | + Python p2pool for cross-pool interop. |
| 22 | +- **Found block persistence** — Layer +2 persistent storage with proper |
| 23 | + blockchain acceptance verification via RPC. |
| 24 | +- **THE checkpoint consumer** — store, verify against blockchain, prune |
| 25 | + orphaned checkpoints on startup. REST API endpoints for checkpoint queries. |
| 26 | +- **THE coinbase state commitment** — unified share retention policy with |
| 27 | + THE state root embedded in coinbase scriptSig. |
| 28 | +- **Coinbase builder** — dynamic scriptSig layout with `--coinbase-text` |
| 29 | + operator customization and THE metadata embedding. |
| 30 | +- **Private sharechain identity** — `--network-id` / `--chain-id` / |
| 31 | + `--chain-prefix` for isolated pool networks. Secure tagged-hash chain |
| 32 | + fingerprint (8-byte SHA256d, collision-free). |
| 33 | +- **Startup modes** — `--genesis`, `--wait-for-peers`, `--startup-mode |
| 34 | + auto|genesis|wait` for flexible bootstrapping. |
| 35 | +- **DOGE P2P header sync** — always active when P2P port configured, |
| 36 | + independent SPV chain for merged mining verification. |
| 37 | +- **Merged mining coins** — added support for PEP, BELLS, LKY, JKC, SHIC, |
| 38 | + DINGO (chain IDs and address formats). |
| 39 | +- **Phase 6: DigiByte** — Scrypt parent chain config for DGB as alternative |
| 40 | + parent chain (embedded SPV for LTC/DOGE). |
| 41 | +- **Stratum extensions** — ASICBoost (version-rolling), NiceHash/MRR |
| 42 | + compatibility, address separator parsing. |
| 43 | +- **Mining OS integration** — HiveOS, MinerStat, RaveOS deploy templates |
| 44 | + and flight sheet configs. |
| 45 | +- **Dashboard API extensions** — warnings endpoint, merged chain payouts, |
| 46 | + daemon health tracking with contact-lost detection. |
| 47 | +- **API reference documentation** — comprehensive REST endpoint docs. |
| 48 | + |
| 49 | +### Fixed |
| 50 | +- **Share PoW invalid (CRITICAL)** — p2pool rejected all c2pool shares as |
| 51 | + "share PoW invalid". Two root causes found and fixed: |
| 52 | + 1. Coinbase scriptSig mismatch: `compute_ref_hash_for_work` omitted the |
| 53 | + 32-byte THE state_root that `build_coinbase_parts` appends to the |
| 54 | + coinbase scriptSig, causing ref_hash divergence. |
| 55 | + 2. Segwit merkle branches not frozen: `txid_merkle_link` branches and |
| 56 | + `wtxid_merkle_root` changed between GBT updates. Shares from older |
| 57 | + jobs used stale branch data. Now frozen at template time through |
| 58 | + RefHashResult → JobEntry → JobSnapshot → ShareCreationParams pipeline. |
| 59 | +- **Variable shadowing (CRITICAL)** — `std::string gbt_block_nbits` at line |
| 60 | + 920 of stratum_server.cpp shadowed the outer variable, causing ALL frozen |
| 61 | + share fields (absheight, bits, max_bits, etc.) to be zero. |
| 62 | +- **verify_share block target** — used `share.m_bits` (share target) instead |
| 63 | + of `share.m_min_header.m_bits` (block target) for `merged_payout_hash`, |
| 64 | + causing ~100-200x weight difference in PPLNS distribution. |
| 65 | +- **ref_stream segwit_data** — `PossiblyNoneType` serialization: c2pool |
| 66 | + skipped `segwit_data` when None (0 bytes) while p2pool always serializes |
| 67 | + default (33 bytes). Fixed to always serialize. |
| 68 | +- **Share field drift** — ref_hash computed at template time, but share |
| 69 | + fields recomputed at submit time from different tracker state. Fixed by |
| 70 | + freezing absheight, abswork, far_share_hash, timestamp, bits, max_bits, |
| 71 | + merged_payout_hash at template time and passing through job snapshot chain. |
| 72 | +- **LevelDB lock conflict** — EnhancedNode and NodeImpl both opened the same |
| 73 | + LevelDB database. EnhancedNode now defers to NodeImpl. |
| 74 | +- **Persist path mismatch** — EnhancedNode used "testnet", NodeImpl used |
| 75 | + "litecoin_testnet". Unified to coin-prefixed path. |
| 76 | +- **Crash during share logging** — `share.ACTION({...})` after |
| 77 | + `m_tracker.add(share)` accessed moved variant. Log BEFORE add. |
| 78 | +- **Boost.Log rotation** — `keywords::target` moved debug.log to logs/. |
| 79 | + Removed target keyword to keep debug.log at `~/.c2pool/debug.log`. |
| 80 | +- **"from localhost:0"** log for LevelDB-loaded and downloaded shares. |
| 81 | + Database shares now show "from database", downloaded shares show peer addr. |
| 82 | + |
| 83 | +### Added |
| 84 | +- **p2pool-style share logging** — "Received share: hash=X height=Y from |
| 85 | + SOURCE", "Processing N shares from SOURCE...", "GOT SHARE!", and |
| 86 | + "P2Pool: N shares in chain (M verified/N total) Peers: P" status line. |
| 87 | +- **Share creation counters** — periodic logging of calls/guard_blocked/ |
| 88 | + pow_failed/created every 60 seconds. |
| 89 | +- **Crash handler** — catches SIGSEGV/SIGABRT, writes backtrace to |
| 90 | + `/tmp/c2pool_crash.log`. Also `std::set_terminate()` handler. |
| 91 | +- **Startup banner** — framed MIT license warning in LOG_WARNING. |
| 92 | +- **hash_link unit tests** — 11 tests including production-path coinbase |
| 93 | + round-trip verification. Added to CI build targets. |
| 94 | +- **Share cross-check** — runs `share_init_verify` on self-created shares |
| 95 | + before broadcasting; prevents sending shares peers would reject. |
| 96 | +- **Faster initial sync** — batch size scaled with O(chain_length) walk cost. |
| 97 | + |
| 98 | +### Changed |
| 99 | +- Stratum `nbits` field now sends GBT block difficulty (not share target). |
| 100 | + Miners put this in the 80-byte header nBits field. |
| 101 | +- Share chain guard: only blocks on null prev_share_hash (removed wrong |
| 102 | + verified >= 100 guard that prevented share creation). |
| 103 | + |
3 | 104 | ## [0.7.0] - 2026-03-12 |
4 | 105 |
|
5 | 106 | ### Added |
|
0 commit comments