# SKN CRB Direct Miner (v1.0.0)

For a **single PC that mines directly to the pool** - no CRB Stratum Proxy,
no gateway/school-server setup needed. If you're setting up a whole lab of
PCs behind one gateway instead, use **CRB Lab Miner** (also on
cereblix.sinarlink.com/download) - that one is for the no-internet-per-PC,
one-shared-identity case. This one is for **one PC, its own address, real
internet access**.

This is `skn-crb-engine` - the exact same mining engine already bundled
inside the SKN Miner CRB desktop app and Android APK, just packaged here as
a plain command-line tool for people who don't want the full GUI app.
Connects straight to the pool's getwork/submitwork API
(`cereblix.sinarlink.com/api`) over HTTPS - no proxy, no LAN gateway, no
special setup beyond your own CRB address.

## Why you downloaded a folder and not just one .exe

This is a **command-line tool** - if you double-click the raw
`skn-crb-engine-windows-amd64.exe` by itself with no arguments, it just
prints a usage message and exits. That's expected, not a crash. Always
launch mining through `crb-direct-miner.bat` (Windows) or
`crb-direct-miner.sh` (Linux), which supply the required arguments for you
and keep it running - never the raw `skn-crb-engine-*` file directly.

## Setup (Windows)

1. Copy this whole folder anywhere, e.g. `C:\crb-direct-miner\`.
2. Edit `crb-direct-miner.bat` in Notepad: set `CRB_ADDRESS` to **your own**
   `crb1...` address (required - this is who gets paid). Optionally change
   `WORKER` (a name for this PC), `THREADS`, and `MODE` (`pplns` or `solo`).
3. Double-click `crb-direct-miner.bat` to run. Want it running with
   **absolutely no visible window** (not even a brief flash) instead? Edit
   `crb-direct-miner-hidden.vbs` (same settings, near the top) and
   double-click THAT instead - logs go to `skn-crb-engine.log` in the same
   folder either way.
4. **To run automatically on startup**: press `Win+R`, type
   `shell:startup`, press Enter, then drag a shortcut to whichever file you
   used (`.bat` or `.vbs`) into that folder.

## Setup (Linux)

```sh
chmod +x crb-direct-miner.sh
# edit CRB_ADDRESS (and optionally WORKER/THREADS/MODE) at the top first
./crb-direct-miner.sh
```

For unattended background use on Linux, run it under `nohup`, `screen`,
`tmux`, or a systemd unit as you normally would - the script's own restart
loop already handles the engine restarting itself if it ever exits.

## Running hidden (Windows) - genuinely no window, not even briefly

Use `crb-direct-miner-hidden.vbs` (edit `CRB_ADDRESS` near the top first).
It launches the engine directly with a hidden window style via Windows
Script Host - unlike a `.bat` file (which always opens a console for at
least a moment, even if something inside it tries to hide afterward),
double-clicking a `.vbs` never shows any window at all. Logs still go to
`skn-crb-engine.log` next to the binary.

Note there's no auto-restart-on-crash for the hidden process (unlike the
visible `.bat`, which loops and restarts it); if that matters for
unattended use, pair it with Task Scheduler set to relaunch on failure and
run the same command the `.vbs` uses, or just use the normal
visible-window `.bat`.

## PPLNS vs Solo

- `pplns` (default): rewards split proportionally among all miners -
  smaller payouts, but regular.
- `solo`: 100% of the block reward goes to you if you find one - only
  worth it at higher hashrate, since the odds of finding a block alone are
  low otherwise. Same tradeoff as the desktop app's PPLNS/Solo toggle.

## Threads

Default is 4 - raise it for more hashrate on multi-core CPUs (each thread
gets slightly slower as more run at once, but total throughput goes up).
Don't set it above your CPU's logical core count.

## Source

This is `skn-crb-engine`, SKN Pool's own NeuroMorph CPU miner - the same
binary bundled inside the SKN Miner CRB desktop app and Android APK, just
run here as a standalone command-line tool instead of from inside a GUI.
