light-ckpool-solo-stats-viewer

?? CKPool Solo Mining Stats & H.A.N.T.I. Prediction

A lightweight, self-hosted statistics dashboard for CKPool (Solo Bitcoin Mining). Features a custom difficulty prediction algorithm based on local node data. Live version - https://88x.pl/btcnode/

? Key Features

?? Architecture

? Installation

Prerequisites

Setup

  1. Clone the repository:
    git clone [https://github.com/YOUR_USERNAME/btcnode.git](https://github.com/YOUR_USERNAME/btcnode.git)
    cd btcnode
    
  2. Configure common.php: Edit the file to match your environment:
    $bitcoinCliPath = '/usr/bin/bitcoin-cli';
    $bitcoinCliUser = 'bitcoin'; // User running bitcoind
    
  3. Configure paths in parser.php & prediction_parser.php: Set the log directories:
    $usersDir = '/var/log/ckpool/users/';
    $poolDir = '/var/log/ckpool/pool/';
    
  4. Set Permissions: Ensure the web user (e.g., www-data or web1) has write access to the ./data directory.

  5. Setup Cron Jobs: Add the following to your crontab (crontab -e):
    # Main Stats Parser (Every 3 minutes)
    */3 * * * * /usr/bin/php /path/to/btcnode/parser.php >/dev/null 2>&1
    
    # H.A.N.T.I. Prediction Parser (Every 3 hours)
    0 */3 * * * /usr/bin/php /path/to/btcnode/prediction_parser.php >/dev/null 2>&1
    

? H.A.N.T.I. Logic (Hybrid Network Trend Intelligence)

The v7 “Solaris” iteration calculates network difficulty adjustments by:

  1. Fetching block times for the last 432 blocks (approx. 3 days) from the local node.
  2. Calculating the Realized Hashrate based on this window.
  3. Projecting the remaining time of the current epoch using this realized hashrate.
  4. Applying a weighted correction based on BTC price action (Price down = Hashrate pressure down).
  5. Comparing the result with Mempool.space API as a sanity check.

? License

MIT License. Free to use for any Solo Miner!