Over a persistent TCP connection, the pool sends mining jobs and a pool target; the miner assembles the coinbase and header, searches nonce space and submits shares. The protocol defines neither the payout method nor Bitcoin consensus rules.
Stratum V1 is an application layer between a pool and mining hardware or a proxy. It is not part of Bitcoin peer-to-peer consensus, does not decide block validity, and does not define payout accounting such as PPS, FPPS or PPLNS. [Bitcoin Wiki — Stratum mining protocol] [Braiins — Past and future of mining protocols]
Legacy getwork delivered small units of work through repeated RPC polling. In 2012 Marek Palatinus proposed a persistent connection where the server pushes a new job immediately; beneath it, a pool commonly obtains a block template through getblocktemplate. [Original Stratum mining protocol announcement] [Braiins — Past and future of mining protocols] [BIP 22 — getblocktemplate fundamentals]
A miner normally sends mining.subscribe and receives session data, extranonce1 and the extranonce2 size. mining.authorize associates an account or worker name, but its password is not server authentication and does not turn plaintext TCP into an encrypted channel. [Bitcoin Wiki — Stratum mining protocol] [Hardening Stratum research paper]
mining.notify carries job_id, the previous block hash, two coinbase parts, Merkle branches, version, nBits, nTime and clean_jobs. The clean_jobs flag tells a device whether to discard earlier jobs; it does not certify the candidate as a valid block. [Bitcoin Wiki — Stratum mining protocol]
The miner inserts extranonce1 and its chosen extranonce2 between the coinbase parts, hashes the transaction and folds in the Merkle branches to get a Merkle root. With prevhash, version, nBits, nTime and nonce it builds the 80-byte header for an ASIC. [Bitcoin Wiki — Stratum mining protocol] [Bitcoin Developer Guide — Pooled Mining]
mining.set_difficulty establishes an easier pool target used to measure work; vardiff may change it to keep share arrivals practical. A hash below the pool target is a share, not a block, unless it also meets Bitcoin’s stricter network target. [Bitcoin Wiki — Stratum mining protocol] [Bitcoin Developer Guide — Pooled Mining]
mining.submit sends worker name, job_id, extranonce2, nTime and nonce; version rolling can add a sixth field. The pool reconstructs and checks the result. It may reject it as duplicate, low difficulty or stale after a tip or job change. [Bitcoin Wiki — Stratum mining protocol] [BIP 310 — Stratum protocol extensions]
Original V1 had no general safe capability-negotiation mechanism. Draft BIP 310, assigned in 2018, adds mining.configure, a version-rolling mask, minimum-difficulty and subscribe-extranonce; extensions require acknowledgement and support varies by implementation. [BIP 310 — Stratum protocol extensions]
V1 is commonly carried over unencrypted TCP, so without another protection layer it provides no authenticated endpoint and permits interception or hashrate hijacking. Pools usually choose the block template, while full nodes enforce Bitcoin consensus and miners retain their ASICs. [Hardening Stratum research paper] [Galaxy Research — Future of Bitcoin mining protocols]
Stratum V2 uses binary framing, a cryptographically protected channel and separated roles; Job Declaration can enable miner transaction choice. A V1/V2 translator or a V2 label alone proves no such choice. Check endpoint identity, firmware, latency, rejects, failover and template policy. [Stratum V2 Mining Protocol specification] [Braiins Academy — Stratum V2 Manual]
For the clearest picture, read this entry together with Bitcoin, Mining, Mining Pool, Braiins, Braiins Pool, Marek “Slush” Palatinus. The reverse links also lead from Marek “Slush” Palatinus, Braiins Pool, Stratum V2.