Mining Academy
- Home
- Academy
- Setup and Launch
What Is Stratum: stratum+tcp, SSL and Pool Ports
What Is Stratum: stratum+tcp, SSL and Pool Ports
Stratum is the network protocol through which mining hardware receives work from a pool and sends back the solutions it finds, called shares. A string like stratum+tcp://enter.rupool.pro:3333 is the address of such a connection: stratum+tcp means a plain connection, stratum+ssl means an encrypted one, and the number after the colon is the port. The protocol affects latency, the rate of rejected shares and connection stability, so every ASIC owner benefits from understanding it.
Why Stratum exists
A mining pool does two things: it assembles a candidate block from transactions and hands out the work of searching for a valid hash. Devices need a simple, light way to receive that work and return results. Historically the getwork protocol was used for this, but it was inefficient: every job needed a separate request, and as ASIC speeds grew, the load on servers became unmanageable.
Stratum solved this differently. A device opens one long-lived connection, and the pool pushes new jobs whenever a new block appears or the transaction set is updated. The device receives the base of the job and iterates through the allowed range of values by itself, without asking the server for each variant. That saves traffic, reduces pool load and shortens the delay between a new block appearing on the network and miners starting to work on the next one.
How a session works
Under the hood Stratum is an exchange of short JSON messages over a TCP connection. A typical sequence looks like this.
- Connection and subscription. The ASIC connects to the pool's host and port and sends a subscription request (
mining.subscribe). The pool replies with session parameters. - Authorization. The device sends a username and password (
mining.authorize). For RuPool the username issubaccount_name.worker_nameand the password can be anything, for examplex. More on naming is in the article on worker names and subaccounts. - Job. The pool sends a notification (
mining.notify) with the data from which the device builds a block header, and sets the share difficulty (mining.set_difficulty). - Submitting solutions. Every time the device finds a hash that meets the share difficulty, it sends it to the pool (
mining.submit). The pool validates the share and replies: accepted or rejected. - Refresh. As soon as a new block appears on the network, the pool broadcasts a new job and the device abandons the old one.
A share is not a block. It is a solution that is as hard as the pool needs in order to count your contribution, but far easier than the network difficulty. The pool estimates your hashrate and credits your reward from the number and difficulty of accepted shares.
A word on share difficulty. The pool does not ask a device to send every "almost valid" hash: a sensible share difficulty differs for a weak and a powerful ASIC. Set it too low and the channel fills with unnecessary messages; set it too high and statistics become patchy because shares arrive rarely. That is why pools adjust it automatically to each device's speed (a mechanism called variable difficulty, or vardiff) and announce the new value via mining.set_difficulty. You do not need to configure this, but it explains why the hashrate chart on the pool fluctuates during the first minutes after start-up while the difficulty settles.
Anatomy of a connection address
Take stratum+tcp://enter.rupool.pro:3333 as an example.
stratum+tcp://is the scheme: Stratum over plain TCP, without encryption.enter.rupool.prois the server name. The auto-select address sends you to the stratum nearest to you; regional addresses let you choose a location manually:msk2-ru.enter.rupool.pro(Moscow),nsk-ru.enter.rupool.pro(Novosibirsk),hel-fi.enter.rupool.pro(Helsinki),ala-kz.enter.rupool.pro(Almaty).3333is the port. Each algorithm has its own port because different stratum servers sit behind them.
Some firmware completes the scheme itself, so you enter only host and port in the URL field. If the connection fails, first check that you did not mix up the port for the algorithm.
RuPool ports
| Algorithm | Coins | Main TCP | Fallback TCP | SSL |
|---|---|---|---|---|
| SHA-256 | BTC | 3333 | 8888, 443, 25 | 999 |
| Scrypt | LTC + DOGE | 3334 | 8889, 444, 26 | 998 |
For Bitcoin you connect to an address like stratum+tcp://enter.rupool.pro:3333, and for Litecoin and Dogecoin to stratum+tcp://enter.rupool.pro:3334. Dogecoin is mined together with Litecoin, so there is no separate stratum for it. More on the Bitcoin pool is on the BTC mining pool page. Fallback ports exist for cases where an ISP or a corporate firewall blocks non-standard ports: port 443 is open almost everywhere because it carries HTTPS traffic, whereas port 25 (mail) is blocked by some ISPs, so keep several options in reserve.
TCP or SSL: which to use
A plain TCP connection sends data in clear text. For mining itself this is not a disaster: what travels over the network is jobs and shares, not money or keys. Still, an open channel has two drawbacks. First, any node along the route, including your ISP or the network owner, can read and modify the traffic, so encryption reduces the risk of tampering. Second, some providers throttle or block unencrypted traffic on non-standard ports.
SSL (stratum+ssl) encrypts the channel. The price is a small extra load and a few milliseconds to establish the connection. Not every older firmware supports encrypted Stratum: if your ASIC does not accept the stratum+ssl scheme, you will have to stay on TCP. If the firmware supports SSL, you can make it the primary channel and keep TCP as a fallback. For connecting devices step by step, see how to connect an ASIC to a pool.
Stratum V2 deserves a mention: a newer version of the protocol with a binary format and built-in encryption. It is being developed as an open standard, but support across hardware and pools is still uneven, so check current information with your firmware vendor.
Latency and rejected shares
The most common practical problem is rejected shares. A pool rejects a share in two main cases.
- Stale share. The device found a solution for a job that is no longer current, because a new block appeared on the network and the pool sent out a new job. The higher the latency, the longer the ASIC keeps working on the old job and the higher the share of stale submissions.
- Invalid share. A wrong hash, a malformed submission, work that failed verification. Causes include firmware bugs, unstable overclocking or a faulty hash board.
Latency is the sum of distance to the server, the quality of the last mile and channel load. The difference between a 10 ms and a 150 ms ping can show up in statistics, especially when the pool issues new jobs often. That is why regional addresses exist: pick the stratum with the lowest ping, not simply the closest on the map. Selection criteria, including server location, are covered in how to choose a mining pool.
A normal rejected-share rate is small, usually from fractions of a percent up to one or two percent. If you see much more, check in order: ping and packet loss to the server, stability of the farm's internet link, ASIC temperature and operating mode, and the firmware version. Do not draw conclusions from a single data point: compare statistics on the device and on the pool over several hours.
Common connection problems
- The device shows "Dead" or "Disconnected". Check the address, port and algorithm, and whether the ASIC itself has internet access (DNS, gateway).
- No connection on port 3333 only. Try a fallback port: 8888, 443 or 25.
- The worker does not appear in your account. Check the username format
subaccount_name.worker_nameand allowed characters: Latin letters, digits and underscore. - The connection drops every few minutes. An unstable link or overloaded router; a wired connection and a separate route for the farm help.
How to check that the connection works correctly
Open the ASIC's log or status tab: the pool should show the status "Alive", and the accepted-share counter (Accepted) should be growing. Then open your pool account and make sure the worker has appeared and its hashrate is shown. The calculated hashrate on the pool does not settle immediately but after a few tens of minutes, so do not draw conclusions from the first minutes.
FAQ
Do I need to install anything for Stratum to work?
No. The protocol is already built into ASIC firmware and into GPU mining software. All you need is the address, port, username and password.
Is stratum+tcp safe?
It works for exchanging jobs and shares, but the channel is not encrypted. If your firmware supports stratum+ssl, use it as the primary and keep TCP as a fallback.
Why do I have so many stale shares?
Most often because of latency or packet loss to the server. Try the regional address with the lowest ping, a wired connection and up-to-date firmware.
Can I enter several pool addresses in one ASIC?
Yes. Most devices accept three pools: if the primary is unreachable, the ASIC switches to the next. A good practice is to enter different ports or regions of the same pool.
How does the BTC stratum differ from the LTC stratum?
In the port and the algorithm: SHA-256 (BTC) uses port 3333, Scrypt (LTC and DOGE) uses port 3334. The host is the same.