Stratum V2 Mining Pool Protocol - What Is It and How It Works?

22.11.2022

The stratum V2 is a bitcoin mining pool protocol that most miners use as an intermediary to access the bitcoin network. The proof-of-stake mining model requires sophisticated machines and computers to mine new bitcoin and validate transactions. As a result, developers saw a need to work on this. This led to the design of the stratum protocol, which enhances the mining of bitcoin.

This software will enable more miners to have access to mine bitcoin through the provision of improved security. In addition, the stratum V2 protocol will facilitate communication between miners, the network node, and mining pools. The stratum V2 mining pool protocol is being adopted widely. It has been tipped to help make the mining pool layer of Bitcoin more decentralized, ensuring privacy and efficiency for miners.

Stratum V2 Mining Pool Protocol

Stratum V2, the latest update, which is the first in almost a decade, will help prevent hash power from being hijacked by encoding the data transfer between pools and miners. With the release of the stratum V2 protocol, miners can now look for better support for lower-speed and less reliable internet connection. In this article's subsequent sections, we will look at stratum V2 feature by feature. Find out what has changed from V1, why these changes matter, and many more.

Let's Take A Closer At The Stratum Mining V2 Protocol

So what is stratum V2? Stratum V2 is an upgrade to the bitcoin mining stack that aims to assist miners in interacting better with the bitcoin mining pools. This new release has been termed the next-generation standardized protocol for pooled mining.

Stratum Mining Pool is an idea conceived by Braiins to ensure data confidentiality and sensitivity through a robust encryption protocol called AEAD (authenticated encryption with associated data). This makes it hard for any third party to understand the information being passed across; hence, miners are protected from attacks common in V1. Stratum V2 also uses BetterHash, a cryptocurrency miner with no usage or mining fee, to offer more efficiency and security to miners and pool operators.

However, as far as the history of mining is concerned, including bitcoin mining hosting service, the pool operators have always had control over which transactions end up in the blocks that get mined. This system has made miners depend solely on pools simply because they provide miners with work, and the miners will send the finished work back to the pool. The Betterhash, first proposed in 2018 by Matt Corallo, aims to modernize the mining protocol. This new mining protocol brought quality improvement for miners and shifted power back to the miners, ensuring decentralization in the process.

Before we go further with stratum V2, let's look at how stratum mining works. When miners initiate a connection with a mining pool, they send a mining authorization request. If the request is granted, the miner will send a message, which means they can start working on the jobs assigned by the pool.

However, the pool operator would check all block templates, making sure they are valid, and if found invalid, the reward for that miner will be checked and modified accordingly. Unlike in V1, where mining could be delayed, and it is slower to send a full block than an empty block (i.e., blocks that contain no transaction), such is not obtainable in stratum V2 as the miner is free to work on his templates without facing any delay. This makes it possible for mining pools to send full blocks for miners to start working. The need to send an empty block is eliminated in V2 as there is no limitation or delay.

Furthermore, we must not fail to mention the Stratum Mining Proxy. This proxy is connected to an upstream mining pool server and the downstream miners through TCP/IP connections. The proxy's job is to get routine jobs from the mining pool and transmit them to the miners. But there is a shortcoming to this. The transmission operation becomes a bottleneck in terms of performance and scalability when the number of miners increases.

It's important to emphasize that the stratum V2 software is not part of bitcoin's core network but rather an enterprise-grade. An open-source version that was recently released will enable miners to test out this software collectively. Various stratum crypto projects will now be able to interact with one another. Having discussed the nitty-gritty of what is a stratum v2, let's now look at the benefits of this fantastic upgrade.

what is stratum V2

What Are The Benefits Of The Stratum V2 Mining Protocol?

Now that we've been able to answer the question, 'what is stratum V2?' Let's look further at the benefits of this stratum V2 mining protocol.

Let's start with what the primary protocol and the three sub-protocols offer in this V2 upgrade. The mining protocol, the main protocol, is the direct successor to stratum V1. This protocol is used for mining and helps communicate between mining devices, proxies, and pool operators. The other sub-protocols are Job Negotiation Protocol, Template Distribution protocol, and Job Distribution protocol.

The Job Negotiation Protocol, usually provided as a 3rd party service for mining pools, allows pools to end negotiation links independently. In contrast, the template distribution protocol interacts with 'bitcoind,' a segment of the Bitcoin core that allows the Bitcoin protocol to be integrated with other software. The 3rd sub-protocol, the Job distribution pool, is complementary to the job negotiation protocol. It ensures that newly negotiated work is passed to the nodes that can either be proxies or actual mining devices.

In stratum V1, the idea of authenticating if the server the miner uses to connect to the server pool is missing. This loophole opens the system up for what is known as a man-in-the-middle attack. What this means is a third party can sabotage the communication between the miner and the operator. If this happens, the attacker would hijack the hash rate and get away with the miners' rewards.

Stratum V2 was built to prevent this attack by allowing the pool operators to sign partial block templates cryptographically.

Also, in terms of efficiency, the stratum V2 protocol is more efficient than V1, its predecessor. In the stratum V1 mining protocol, text (JSON) is used to communicate, and these texts are readable by the miner. On the stratum V2 mining protocol, binary codes, which are only readable by a computer, are used. This enables faster and cheaper communication, and some data on the protocol level has been eliminated.

The stratum V2 mining protocol has an in-built unit that can be used for multiplexing. This gives hashers (miners) access to independent communication channels, and by doing so, data about machine temperature, voltages of chips, and how their power supply behaves can be shared. This update enables stratum pool miners to provide additional services using this information. This is another cutting edge the stratum V2 mining has over its predecessor.

In addition, another benefit of the stratum bitcoin V2 mining protocol is that it lets the pools guess what the next block could be, i.e., anytime a new block is formed, the pool will, after a few minutes, figure out the transactions that were included in that block. This is usually done to check against double-spending, typically in stratum V1. But this scenario has now been eliminated using the stratum V2 mining protocol.

Stratum Mining Proxy

Similarly, in this V2 protocol, stratum pool users and miners (whoever is selecting the transactions) can make educated guesses about which transactions will be included in the next block. Because of these guesses, they can start work on the next block in the first few seconds. This means the next block will be completed faster, which translates to more blocks being solved as each block takes less time. This also enables the pool to make more money.

In summary, the stratum mining upgrade stratum V2 mining protocol improved security, efficiency, and flexibility. The 'man in the middle attack' has been eliminated regarding security. For efficiency, the system has been enhanced so that the mining pool can get an advantage on the next block using the V2 protocol. Lastly, the flexibility has been improved upon also as new communication channels and various data can be sure of using the stratum V2 mining protocol.

Yes, the Stratum V2 mining protocol is free and open-source.
There is no specified template distribution protocol yet, but it's understood that the new V2 uses a template distribution protocol that is an upgrade to getblocktemplate (BIPs 22 and 23).
There are several servers you can connect your mining device to. However, for a better connection, you can use any location-specific server instead of the general server. You can find the servers in this stratum V2 mining URLs.
(no votes)
Any questions about crypto mining hosting services?