One Port, Two Protocols: How a Mining Pool Tells What You’re Speaking

One Port Two Protocols How a Mining Pool Tells What Youre Speaking

Here’s a small, genuinely clever piece of plumbing that most miners never think about: how does a pool know whether an incoming connection is speaking the old Stratum V1 protocol or the newer V2, before either side has said a word?

The problem it solves

Stratum V2 is a different protocol from V1, not just a new version of the same one. It uses a different framing, a different handshake, and by default, encryption. A miner’s firmware either speaks V1 or it speaks V2, and there’s no version string exchanged up front the way, say, a web browser negotiates HTTPS. If a pool ran V1 on one port and V2 on a separate port, every miner would need to know in advance which port their specific firmware expects, which is a real usability problem for a wide, uncoordinated fleet of hardware from many manufacturers running many firmware versions.

The trick: look at the first byte

A Stratum V1 message is JSON, and JSON messages in this context always start with the character {. A Stratum V2 message starts with a binary Noise protocol handshake, which never produces that byte as its first character. So a pool can open a single port, wait for the first byte of an incoming connection, and route the connection accordingly: see {, treat it as V1 and parse JSON from there on; see anything else, treat it as the start of a V2 Noise handshake and switch decoding modes.

It’s a small trick, but it’s the right kind of small trick: no coordination required between the miner’s firmware and the pool’s operator, no configuration step for the person setting up a rig, and no risk of an outdated device becoming unable to connect just because a pool moved to newer infrastructure. Old firmware keeps working. New firmware gets the newer protocol’s benefits. Neither side has to be told which is which.

What this enables in practice

Because of this detection, a solo miner running years-old firmware and a solo miner running a current V2 stack can point at the exact same address and worker setup instructions, and both just work. That matters more than it sounds like it should for a solo pool specifically, where the audience runs everything from brand-new ASICs to older secondhand hardware still doing useful work. A pool that required separate V1 and V2 endpoints would be quietly pushing older hardware toward whichever port is easier to find, usually V1, and losing the actual point of offering V2 at all.

The honest limit

This detection layer only decides which protocol parser to use. It says nothing about whether the V2 side of that pool implements the full protocol correctly, encrypted handshake and authority-key verification included, or just enough of it to answer the first byte correctly. A pool advertising same-port V1/V2 support has solved a real compatibility problem. Whether its V2 implementation is complete is a separate question, worth asking directly rather than assuming from the port compatibility alone.

Why this small detail rarely gets mentioned

Protocol detection like this is the kind of infrastructure work that, done correctly, is invisible: a miner just connects and it works, with no indication anything clever happened underneath. That invisibility is exactly why it’s worth pointing out explicitly here, since unglamorous plumbing like this rarely gets credit for working, only blame on the rare occasion it doesn’t. The absence of a connection problem is often the best evidence it was built carefully.

NexusPool detects the protocol this way on its main stratum port, so older and newer firmware both connect to the same address without any manual configuration. The underlying detection mechanism gets a fuller technical treatment than fits here, all of it on NexusPool’s protocol documentation. Free, non-custodial software, and the protocol a rig speaks has no bearing on its odds of finding a block, which are set entirely by network difficulty.

Trust nothing. Verify a pool’s V2 claim covers the whole protocol, not just port detection.

About NexusPool: NexusPool is free, non-custodial mining software that auto-detects whether a connecting rig is speaking Stratum V1 or V2, so both connect through the same port without extra configuration. More on how that detection works is available on the technical rundown on NexusPool’s site.

Leave a Reply