Behind the green dot on the Miner screen lies a remarkably simple protocol: newline-delimited JSON messages over a single outbound TCP socket.
1. The handshake: subscribe → suggest_difficulty → authorize
Upon connecting to public-pool.io:21496 or solo.ckpool.org:3333, SandraMine sends three JSON-RPC calls. The pool returns your unique extranonce1 (session ID) and extranonce2 byte length.
→ {"id":1,"method":"mining.subscribe","params":["SandraMine/0.5.0"]}
← {"id":1,"result":[[...],"08000002",4],"error":null}
→ {"id":3,"method":"mining.suggest_difficulty","params":[1.0]}
→ {"id":2,"method":"mining.authorize","params":["bc1q...sm-pc","x"]}
← {"id":2,"result":true,"error":null} 2. Receiving work (mining.notify) and building the coinbase
The pool never sends every transaction — only coinb1, coinb2, and the Merkle branch siblings. That lets your miner roll extranonce2 to create billions of unique headers locally without asking the pool again.
Whenever a new Bitcoin block is mined worldwide, the pool pushes mining.notify with clean_jobs = true. SandraMine bumps an atomic job_gen so CPU and GPU threads immediately pivot and avoid stale work.
3. Submitting a share (or a winning block!)
Whenever a hash beats pool_diff, the client sends mining.submit with just 5 fields: worker, job_id, extranonce2, ntime, and nonce. If that hash also beats net_diff, the pool broadcasts the full block and the coinbase pays your BTC address directly.
- The pool never sees your private key — only the payout script for your public address.
- On public-pool, extranonce1 doubles as the sessionId in its stats API, which fleet.rs uses to distinguish machines.