Explore the Stratum V2 (Stratum V2), how to achieve the decentralization of Bitcoin mining?

In early November of this year, Slush Pool released the initial technical specification of the Stratum V2 (Stratum V2), which is a new mining protocol on how to improve the cooperation between miners and mining pools to protect the security of the Bitcoin network. This project has been under development for several years and it could have a huge impact on the future of Bitcoin mining.

To help the entire Bitcoin community understand the importance of Stratum V2, Jan Capek and Pavel Moravec of Slush Pool, along with contributors Matt Corallo and Peter Todd, participated in random questions on the Reddit Bitcoin section. Some interesting discussion topics include:

  • How to motivate the widespread adoption of new mining protocols, and possible timelines.
  • The importance of improved security of the V2 protocol compared to the V1 protocol.
  • How Stratum V2 (Stratum V2) improves the key aspect of decentralization in the Bitcoin mining industry.

We have summarized the answers to these questions here.

Expert profile

The development of Stratum V2 was led by the heads-co-founders and co-founders Jan Capek and Pavel Moravec of Slush Pool. Head-Braiins was founded in 2010 and has been operating the Slush Pool mine since 2013. Therefore, they have the ability to design the V2 protocol, thereby solving the biggest problems encountered by some mining pools and miners when using the original protocol.

Matt Corallo has developed Bitcoin for many years, and he has made many contributions to the core of Bitcoin and to countless projects in the Bitcoin ecosystem. He currently works at Square Crypto, and they have also generously sponsored his travel expenses to Prague, allowing him to work with us to develop technical specifications for the V2 agreement.

Peter Todd is another long-term Bitcoin developer who has made a remarkable contribution to Bitcoin Core. He is an applied cryptography consultant. To put it simply, he is a security expert. He uses his valuable insights to help the V2 protocol establish a defense mechanism against man-in-the-middle attacks.

How does the Stratum V2 protocol improve Bitcoin's decentralization?

Q: Stratum V2 (Stratum V2) allows terminal miners to mine on their own blocks instead of mining blocks provided by the mining pool. How does this affect the decentralization of mining? How will the actual performance of this feature differ?

Matt Corallo: Its impact on the decentralization of mining is huge. Instead of working on the centralization of the mining pool, we can now work on the centralization of the actual miner / mine owner. In Matt Corallo's presentation on Consensus Group Centralization, you can find the following table, which explains how it changes the allocation of the hash rate.

In terms of performance, the explanation is more complicated. For miners, when there is an optimized client and a good Internet connection, receiving work from the mining pool may be faster. But for the mining pool, it must be optimized through a lot of work to get better performance.

Q: Are there any incentives for miners to negotiate their own transaction set with the mining pool?

Pavel Moravec: At present, the mining pool acts as an oversized miner. The mining pool controls a large part of the hash rate of the entire mining network. This means that the mining pool can try to prevent (i.e. review) some transactions from entering the blockchain, and the mining pool can also significantly affect the activation process of the Bitcoin Improvement Proposal (BIP), just like the SegWit signal we saw in 2017.

Miners negotiate their own mining areas to prevent this pool of power from concentrating, which is like they are mining alone. At the same time, miners can still enjoy the benefits of reduced Variance in payouts brought by mining in the mining pool.

Q: Does the mining pool have veto power over the validity of the transaction?

Pavel Moravec: In the V2 protocol, the mining pool can always actively refuse the complete block proposed by the miner, but it cannot refuse a single transaction in the block. That is, the verification of the complete block is done by the mining pool. If the mining pool passes the verification, it will reject any block containing invalid transactions.

How does Stratum V2 improve the security of Bitcoin miners and mining pools?

Q: What are the main advantages of using encryption with the V2 protocol?

Peter Todd: Authentication is very important. Without it, an attacker could simply steal the hashing power by directing the hashing power to another mining pool by attempting a man-in-the-middle attack (MITM) to redirect hashing power. Because it is quite slow, public key signature verification is not ideal, so verifying the signature of each message can be very inefficient.

Modern authentication and encryption schemes can provide exactly the required functions: an authentication channel between two parties. One of the more expensive signature operations is used to create shared secrets. Using commonness can make symmetric key authentication schemes faster. a lot of. Modern methods are really fast and well researched, so engineering surprises are unlikely.

In the V1 protocol, an attacker can steal and change the assignment sent by the mining pool before the miner receives the assignment, and then intercept the job submitted by the miner when the miner tries to submit the job to the mining pool-this allows the miner or Mining pools may not be found! V2 has been able to prevent this "hash rate hijacking" attack.

Q: How much does project cost increase with encryption?

Peter Todd: The cost of mining pools to miners will increase by about 5%, which is trivial. For the communication from the miner to the mining pool, it will increase 16 bytes (more than 50%), but it is important to explain the background here. Because even if the encryption process is passed, V2's share submission message is more than 50% shorter than V1. In addition, the total number of transmissions of the V2 protocol has also been reduced. In the end, encryption has not caused more data.

Adoption of layer V2 protocol

Q: Are there any incentives for everyone to upgrade to the V2 agreement?

Jan Capek: For miners, one of the biggest incentives to upgrade to the V2 protocol is the improvement in bandwidth efficiency, so that mining can be performed even under poor Internet connection conditions. At the same time, improvements in bandwidth efficiency also help improve submission efficiency, which in turn reduces miner hash rate variables (this affects miners' rewards in score-based reward systems such as PPLNS). In terms of efficiency, the function of the mining pool to allocate blocks to miners in advance (separated from the 'SetNewPrevHash' message) should be able to eliminate empty block mining. Finally, moving from JSON-based (that is, a human-readable format) code to a fully binary (machine-readable) code base can significantly reduce the size of the transmitted data.

Matt Corallo: Another invaluable incentive is cryptographic verification. If you mine now, your ISP is likely to steal 1% of your hashing power. The encryption in V2 protocol can solve this problem.

Q: What is the timetable for the implementation, deployment and adoption of the new agreement?

Jan Capek: There is an implementation benchmark in the Head-Braiins open source database, and we are still updating it to reflect the latest version of the technical specification. We estimate that it will take at least 3-5 months to resolve various issues before deployment on a large scale. The implementation of the protocol is relatively straightforward. Before directly supporting the implementation of the Stratum protocol, the mining site can now use V1 to V2 translation agents (JSON to binary) and the mining pool can use V2 to V1 agents as new The first phase of the agreement.

The implementation reference is also part of the bOSminer miner software, which is a new miner software we designed to replace the outdated CGMiner.

Questions or feedback?

Stratum V2 may not be the sexiest improvement in the development of the Bitcoin world, but it is an important step for Bitcoin to mature. For pool operators and terminal miners, the benefits are obvious. It's fun to watch new improvements gradually being adopted and think about its future impact on the mining industry. If you have any questions or feedback, please don't hesitate to contact us.