What Is Stratum? How Your Miner Talks to a Pool
Stratum is the widely used protocol a Bitcoin miner uses to talk to a pool: the miner keeps a TCP connection open, the pool pushes jobs and the miner sends back shares. This guide decodes a stratum+tcp address, explains the username and password fields on account-based and solo pools, compares plain and TLS connections, and outlines what Stratum V2 changes.
Category: Mining and the Network · Published 2026-10-28
Editorial review complete · technical review pending · sources under review What does this mean?
Editorial review covers clarity and neutrality. Technical, security, and source reviews indicate whether an article's material claims were checked against relevant authoritative material. A source link being available does not by itself mean every claim has been verified. A reviewed status means the article's material claims were examined; it does not mean the article is exhaustive or that future protocol, market, or software changes cannot make it outdated.
The Problem Stratum Solved
Before Stratum existed, miners used an older method called getwork, a JSON-RPC call over HTTP.2 The miner had to keep asking the pool server, "Do you have work for me?" Each answer was a single block header to work on, and because a header holds only a 4-byte nonce, good for about 4 billion hashes, fast miners had to ask dozens or hundreds of times a second.1 As mining hardware got faster, this polling approach created a flood of unnecessary network traffic. Plain getwork had a second weakness: if someone else found a block while your miner was working, your miner wouldn't know until the next time it asked, and it kept grinding on a dead job, wasting electricity. An add-on called long polling, which held a request open until fresh work was ready, patched that.2
Stratum fixed this by flipping the model. Instead of your miner pulling work, the pool server pushes new work to your miner the instant it is available, over a connection that stays open. Each job also carries the pieces your miner needs to build fresh block headers on its own, so it no longer has to ask for every new batch.1 Stratum replaced getwork for pooled mining in late 2012.3 Those two changes made mining dramatically more efficient and reduced wasted effort from stale jobs.
What Stratum Actually Is
Stratum is a lightweight client-server communication protocol designed specifically for mining. Your miner (the client) opens a persistent TCP connection to the pool server.1 That connection stays open the whole time you are mining — it is not a one-shot request like loading a web page.
Under the hood, Stratum uses a simple text-based format called JSON-RPC. Messages are small and human-readable.3 The handshake works like this:
- mining.subscribe — your miner introduces itself and asks to receive jobs. The pool replies with a per-connection value (extranonce1) and the size of a counter (extranonce2) that the miner is free to change.
- mining.authorize — your miner sends its username and password so the pool knows whose hashrate this is and where to send any reward.
- mining.notify — the pool pushes a job to your miner: the previous block's hash, the two halves of the coinbase transaction, the merkle branch, the block version, the network's encoded target (nBits) and the time. Together with the extranonce values, that is everything your miner needs to start hashing.
- mining.submit — when your miner finds a valid share (or, if you are very lucky, a full block solution), it sends that result back to the pool.
The pool can also send mining.set_difficulty at any time to adjust how hard the share target is for your specific miner.3 Faster machines get harder share targets so they do not flood the server: at share difficulty 1, a single 1 TH/s miner would find about 230 shares every second (worked out by us).
Decoding a Stratum URL: stratum+tcp://host:port
When you configure a miner, the pool address field looks something like this:
stratum+tcp://pool.example.com:port
Here is what each piece means:
- stratum — tells your miner to use the Stratum protocol, not plain HTTP or anything else.
- +tcp — specifies that the connection runs over TCP, the standard internet transport layer. This connection is unencrypted (plain text).
- pool.example.com — the hostname (domain name or IP address) of the pool's Stratum server.
- port — the TCP port number, which the pool publishes. Pools choose their own ports, and any port the pool operator configures is valid. Port numbers are just a way to run multiple services on the same server.
You will sometimes see pools list several URLs with different ports. These are usually the same server offering different difficulty tiers or fallback endpoints — not separate pools.
Username, Worker Name, and Password — What They Actually Mean
The Stratum protocol has a username field and a password field in the mining.authorize message.3 What you put there depends entirely on what kind of pool you are connecting to.
On an account-based pool, the username is usually the account name you registered on the pool's website, often followed by a dot and a worker name, and the password is whatever that pool's instructions specify. Because plain Stratum sends it unencrypted, it should never be a password you use anywhere else.
On a solo pool that pays straight to your Bitcoin address, with no account required, the convention is different and simpler:
- Username: your Bitcoin address, optionally followed by a dot and a worker label you invent yourself. Example: bc1qyouraddresshere.rig1. The pool uses your address to know where to send any block reward. The worker label after the dot is just a human-readable name to help you tell your machines apart on the stats page — it has no effect on payouts or odds.
- Password: anything at all — the letter x is the near-universal placeholder. On such a pool there is nothing to authenticate; the password field exists only because the Stratum login message has one. The Bitcoin Wiki notes that the password may be omitted entirely if the server does not require it, and many solo pools simply ignore whatever you type here.3
Plain Stratum (TCP) vs Encrypted Stratum (TLS/SSL)
The standard stratum+tcp connection sends everything — your job data, shares, and credentials — as unencrypted plain text over the internet, and Stratum V1 has no cryptographic authentication either.5 Anyone who can observe your network traffic (your ISP, someone on a shared network, or a malicious router in between) can read those messages. In practice this means:
- Your hashrate and share submissions are visible in transit.
- Because nothing proves a message is genuine, someone who can intercept the connection could also alter it, for example by swapping the payout address in your login or feeding your miner jobs that pay someone else. This is sometimes called hashrate hijacking, and hardening mining against these man-in-the-middle attacks is one of the stated aims of Stratum V2.5
Some pools offer an encrypted alternative, typically labeled stratum+ssl or stratum+tls. This wraps the same Stratum messages inside TLS (Transport Layer Security), the same technology used by HTTPS websites, which is designed to prevent eavesdropping, tampering and message forgery.4 Your shares and credentials are encrypted in transit.
A few honest caveats about TLS Stratum:
- Not all miner firmware supports it — check your hardware's documentation before choosing a TLS endpoint.
- TLS adds a small amount of CPU overhead on both ends, though this is negligible compared to the energy your miner uses for hashing.
- TLS protects the connection between your miner and the pool. It does not protect against a malicious pool itself — choosing a trustworthy pool matters regardless of which transport you use. What mining over TLS protects goes into more detail.
Stratum V2: The Upgrade on the Horizon
The Stratum protocol described above is technically Stratum V1. It has been in use since late 2012 and is still widely used by miners and pools.13 It works, but it has known limitations:
- All traffic is plain text, making it easy to intercept and inspect.
- In V1, the pool operator decides which transactions go into the block template. Individual miners have no say in which transactions go into the block they are mining.1
Stratum V2 is a next-generation replacement that addresses both problems. It is a binary protocol with fixed message framing instead of plain-text JSON, designed to keep data transfers as small as possible,56 and it encrypts its messages with authenticated encryption, so traffic is much harder to spy on or tamper with.7 More significantly, V2 adds an optional job declaration protocol, which lets a miner build its own block template, choosing its own transactions, and declare it to the pool — shifting some power away from pool operators and back toward miners.6 It does not remove the need to trust the pool for payouts.3
Using Stratum V2 needs support at both ends: from your miner's firmware, or from a translation proxy that lets a V1 machine talk to a V2 pool, and from the pool itself.3 If your hardware and pool both support V2, it is worth exploring — but V1 remains perfectly functional for everyday mining. Stratum V1 vs Stratum V2 compares the two in depth.
FAQ
Do I need to understand Stratum to run a miner?
Not deeply — you just need to copy the pool's Stratum URL into your miner's configuration screen, type your username (on a solo pool, usually your BTC address) and a placeholder password like 'x', and save. The protocol itself runs invisibly in the background. Understanding it helps you troubleshoot connection errors and make sense of what your miner is doing, but you do not need to read raw JSON messages.
Why does the password field exist if solo pools ignore it?
The Stratum protocol was designed to serve many types of pools, including account-based pools that may check a password, and the field is part of its mining.authorize message. Solo pools that identify miners by Bitcoin address have no use for a password, so they accept any value — or nothing — in that field. The convention of typing 'x' is simply a widespread habit that avoids leaving the field blank.
What happens if my miner loses its connection to the pool?
Your miner stops receiving new jobs and its shares cannot reach the pool. Most mining firmware automatically tries to reconnect, and you can configure backup pool addresses (Pool 2, Pool 3) so the miner fails over to a secondary server if the primary is unreachable. While it is disconnected, any work it does on its last job is wasted: nothing it finds can be submitted, and once a new block appears that job is stale anyway.
Is stratum+ssl the same thing as HTTPS?
They use the same underlying encryption technology — TLS — but they are not the same thing. HTTPS is TLS wrapped around the HTTP web protocol. Stratum+SSL (or stratum+tls) is TLS wrapped around the Stratum mining protocol. The encryption mechanism is identical in principle; what travels inside it is completely different. One delivers web pages; the other delivers mining jobs and shares.
Can I run my own Stratum server instead of using a pool?
Yes. Solo miners who run a full Bitcoin node can pair software like Bitcoin Core with a local Stratum server and mine without any pool at all. This means your miner talks to your own machine rather than a remote pool server. The trade-off is that you must maintain the node yourself, and you receive a reward only if your miner finds a full valid block on its own — with no shares or partial credit in between.
Key takeaways
- Stratum replaced the older getwork method in late 2012: the pool pushes jobs over an open TCP connection and the miner builds fresh work itself.
- A Stratum session runs on four core messages, mining.subscribe, mining.authorize, mining.notify and mining.submit, with mining.set_difficulty setting the share target.
- On a solo pool that pays to your address, the username is your Bitcoin address plus an optional worker name, and the password is usually ignored.
- Plain stratum+tcp is unencrypted and unauthenticated; TLS protects the connection but cannot make a dishonest pool honest.
- Stratum V2 is binary and encrypted and can let miners declare their own block templates, but it needs support from both the miner side and the pool.
Sources
- Bitcoin Developer Guide, Mining: the deprecated getwork RPC hands the miner a header with a 4-byte nonce good for about 4 gigahashes, so fast miners needed dozens or hundreds of requests a second; Stratum gives miners what they need to build headers themselves, over a two-way TCP socket, and they cannot inspect or add transactions — Bitcoin Project (developer.bitcoin.org)
- Getwork: a JSON-RPC method sent over HTTP that provides a block header for the miner to solve, and the long-polling extension that holds a request open until new work is ready — Bitcoin Wiki
- Stratum mining protocol: replaced getwork for pooled mining in late 2012; mining.subscribe, mining.authorize (the password may be omitted), the mining.notify fields, mining.set_difficulty for share difficulty and mining.submit; summary of Stratum V2, including translation proxies and the continued need to trust a pool for payouts — Bitcoin Wiki
- RFC 8446, The Transport Layer Security (TLS) Protocol Version 1.3: lets client and server communicate in a way designed to prevent eavesdropping, tampering and message forgery — Internet Engineering Task Force (IETF)
- Stratum V2 specification, Motivation: Stratum V1 is JSON-based and lacks cryptographic authentication; V2 aims to cut data transfers to a minimum and to harden mining against man-in-the-middle attacks on jobs and commands — Stratum V2 project (stratumprotocol.org)
- Stratum V2 specification, Protocol Overview: a binary protocol with fixed message framing, and the Job Declaration Protocol a miner uses to declare its own block template with a pool — Stratum V2 project (stratumprotocol.org)
- Stratum V2 specification, Protocol Security: authenticated encryption (AEAD) for all client-server messages, set up with a Noise-based handshake — Stratum V2 project (stratumprotocol.org)