From ebecffe911309bad8671b29e9240330b9a40b35f Mon Sep 17 00:00:00 2001 From: xyephy Date: Thu, 18 Apr 2024 14:53:56 +0300 Subject: [PATCH] Improving consistency in Stratum V2 naming --- src/_blog/SRI-roadmap-2023.md | 54 +++++++++++++------------- src/_blog/StratumV2-JN-Announcement.md | 12 +++--- src/docs/index.md | 22 +++++------ src/features.md | 16 ++++---- src/getting-started.md | 8 ++-- src/implementation.md | 22 +++++------ 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/_blog/SRI-roadmap-2023.md b/src/_blog/SRI-roadmap-2023.md index db82cfd..ce3f283 100644 --- a/src/_blog/SRI-roadmap-2023.md +++ b/src/_blog/SRI-roadmap-2023.md @@ -1,6 +1,6 @@ --- -title: " Stratum v2 (SRI) Roadmap - To infinity and beyond " -description: "Today, we’re sharing the (Stratum Reference Implementation) roadmap providing insights into our ongoing work and the project's direction. Additionally, we are publishing the latest progress on Stratum v2 protocol specifications, further emphasizing our commitment to openness and building in public." +title: " Stratum V2 (SRI) Roadmap - To infinity and beyond " +description: "Today, we’re sharing the (Stratum Reference Implementation) roadmap providing insights into our ongoing work and the project's direction. Additionally, we are publishing the latest progress on Stratum V2 protocol specifications, further emphasizing our commitment to openness and building in public." date: "2023-08-03" authors: - Pavlenex @@ -11,7 +11,7 @@ tags: --- -Today, we’re sharing the (Stratum Reference Implementation) **roadmap** providing insights into our ongoing work and the project's direction. Additionally, we are publishing the latest progress on Stratum v2 protocol **specifications**, further emphasizing our commitment to openness and building in public. +Today, we’re sharing the (Stratum Reference Implementation) **roadmap** providing insights into our ongoing work and the project's direction. Additionally, we are publishing the latest progress on Stratum V2 protocol **specifications**, further emphasizing our commitment to openness and building in public. We believe fostering collaboration and transparency in the development process accelerates community involvement and brings us one step closer to our mission - better, more robust, and more decentralized bitcoin mining. @@ -19,11 +19,11 @@ At its core, SRI is a community-driven, open-source project. Our roadmap reflect We welcome you to join us in our mission, start contributing, testing and help us shape the future of bitcoin mining. -## 📖 Stratum v2 specification +## 📖 Stratum V2 specification -The specification is the heart of any protocol. The Stratum v2 specification, meticulously maintained by an independent open-source working group [formed](https://www.cnbc.com/2022/10/11/bitcoin-mining-software-overhaul-stratum-v2-promoted-by-block-braiins.html) in October 2022, is pivotal in defining the functionality. Since its inception, the specs have undergone several updates to enhance security, performance, flexibility, and simplicity. +The specification is the heart of any protocol. The Stratum V2 specification, meticulously maintained by an independent open-source working group [formed](https://www.cnbc.com/2022/10/11/bitcoin-mining-software-overhaul-stratum-v2-promoted-by-block-braiins.html) in October 2022, is pivotal in defining the functionality. Since its inception, the specs have undergone several updates to enhance security, performance, flexibility, and simplicity. -The main goal is to **stabilize** the specification, **formalize** the proposal procedures, and make them **accessible** to anyone interested in improving the Stratum v2. +The main goal is to **stabilize** the specification, **formalize** the proposal procedures, and make them **accessible** to anyone interested in improving the Stratum V2. The table below summarizes the changelog of notable specs updates. @@ -37,7 +37,7 @@ The table below summarizes the changelog of notable specs updates. ### Noise handshake improvement -One of our first updates is improving the noise handshake. The Stratum v2 protocol updates refine the authenticated key agreement through a three-step process, **enhancing security and communication efficiency**. This includes, an exchange of keys, followed by an Elliptic Curve Diffie-Hellman (ECDH) operation, encryption algorithm negotiation and server authentication through a signature noise message. +One of our first updates is improving the noise handshake. The Stratum V2 protocol updates refine the authenticated key agreement through a three-step process, **enhancing security and communication efficiency**. This includes, an exchange of keys, followed by an Elliptic Curve Diffie-Hellman (ECDH) operation, encryption algorithm negotiation and server authentication through a signature noise message. ### Using Bitcoin Core cryptographic primitives @@ -51,13 +51,13 @@ Previously, 'future_job' indicated whether a job related to a future or the last This update enhances the message framework by incorporating the security layer into the stratum framing itself, thus eliminating the need for redundant frame-length information and improving protocol efficiency. In the previous framework, individual frame lengths were revealed in the TCP traffic, creating potential vulnerabilities. -The new framework encrypts the Stratum v2 payload in byte chunks of maximum 65519 bytes and v2 header in 22 bytes forming AEAD ciphertexts, effectively concealing and protecting the frame length field and facilitating implementation of large-message encoding. This change **streamlines the parsing process**, making the TCP-transcript fully uniform and random looking. +The new framework encrypts the Stratum V2 payload in byte chunks of maximum 65519 bytes and v2 header in 22 bytes forming AEAD ciphertexts, effectively concealing and protecting the frame length field and facilitating implementation of large-message encoding. This change **streamlines the parsing process**, making the TCP-transcript fully uniform and random looking. ### Renaming Job Negotiator to Job Declarator In response to community feedback regarding a protocol formerly known as **"Job Negotiator"**, we are announcing a naming update to clarify its purpose and functionality. -This protocol is one of the most critical features of Stratum v2. In combination with a template provider, it allows miners or an independent third party to select transactions, decentralizing bitcoin pool infrastructure. +This protocol is one of the most critical features of Stratum V2. In combination with a template provider, it allows miners or an independent third party to select transactions, decentralizing bitcoin pool infrastructure. Over time, we've observed confusion surrounding the term "negotiation," as it may imply a back-and-forth process between miners and pools to determine block content. We want to stress that this is not the case. Instead, the miner declares transactions to the pool, which can then choose to accept or decline them. There is no ongoing communication concerning block content between parties. @@ -67,39 +67,39 @@ Provided that all miners run standardized software this could mean that the **en With this in mind, we’re **renaming the Job Netogiation to Job Declaration protocol**. -## 👷‍♂️ Stratum v2 implementations +## 👷‍♂️ Stratum V2 implementations -Thus far, there have been two adoption paths for the Stratum v2 protocol: +Thus far, there have been two adoption paths for the Stratum V2 protocol: -- Stratum v2 implementation by Braiins -- SRI (Stratum v2 Reference implementation) +- Stratum V2 implementation by Braiins +- SRI (Stratum V2 Reference implementation) -Both implementers, Braiins, and SRI, are part of the SV2 working group and share the goal of fostering a collaborative environment to support and encourage the broader adoption of Stratum v2. The remaining of the article will focus on the reference implementation, SRI, exploring its current status and future direction. +Both implementers, Braiins, and SRI, are part of the SV2 working group and share the goal of fostering a collaborative environment to support and encourage the broader adoption of Stratum V2. The remaining of the article will focus on the reference implementation, SRI, exploring its current status and future direction. ### 🛣️ Stratum Reference Implementation Roadmap -In October 2022, we launched our SRI’s [first update](https://twitter.com/StratumV2/status/1579805619351326722?s=20), which allowed miners to run Stratum v1 firmware and connect to an SV2 compatible pool. Few months afterwards, [a new update](https://twitter.com/StratumV2/status/1646542195233640454?s=20) allowed miners to select transactions, democratizing block selection. +In October 2022, we launched our SRI’s [first update](https://twitter.com/StratumV2/status/1579805619351326722?s=20), which allowed miners to run Stratum V1 firmware and connect to an SV2 compatible pool. Few months afterwards, [a new update](https://twitter.com/StratumV2/status/1646542195233640454?s=20) allowed miners to select transactions, democratizing block selection. Currently we’re working on our **third major update**, below is an overview on what to expect in the future. ![SRI Roadmap](/assets/SRI-roadmap-2023.png) -The third update represents our **“Now”** column on our roadmap, and aims to be completed in the next few months. It builds on all previous updates with more features, enhanced security performance and better flexibility. Most importantly the new update, should set the milestone for easier Stratum v2 integrations into existing pools. Miners and mining pools are encouraged to test out our [previous update](https://stratumprotocol.org/blog/stratumv2-jn-announcement/) and provide feedback in the meanwhile. +The third update represents our **“Now”** column on our roadmap, and aims to be completed in the next few months. It builds on all previous updates with more features, enhanced security performance and better flexibility. Most importantly the new update, should set the milestone for easier Stratum V2 integrations into existing pools. Miners and mining pools are encouraged to test out our [previous update](https://stratumprotocol.org/blog/stratumv2-jn-announcement/) and provide feedback in the meanwhile. **Our always evolving roadmap is available on [Miro](https://miro.com/app/board/uXjVM8FOwSE=/?share_link_id=902364718672), and also on [GitHub](https://github.com/orgs/stratum-mining/projects/5) for anyone to review and provide feedback. If you’re interested in joining our contributors team, hop on to [Discord](https://discord.gg/fsEW23wFYs).** ### Message Generator - interoperability suite -As the Stratum v2 protocol gains popularity, we anticipate the emergence of various adoption paths. However, it is imperative that these implementations adhere closely to the specified standards. Deviation from the protocol specifications could yield catastrophic consequences, potentially resulting in significant profit loss. +As the Stratum V2 protocol gains popularity, we anticipate the emergence of various adoption paths. However, it is imperative that these implementations adhere closely to the specified standards. Deviation from the protocol specifications could yield catastrophic consequences, potentially resulting in significant profit loss. -Because of this, we developed an interoperability suite called **Message Generator** (or MG), which is essential in ensuring that all implementations are following the specs, and are able to test against each other. The tool allows anyone developing Stratum v2 based software to run a series of predefined tests in different configurations to ensure compatibility. +Because of this, we developed an interoperability suite called **Message Generator** (or MG), which is essential in ensuring that all implementations are following the specs, and are able to test against each other. The tool allows anyone developing Stratum V2 based software to run a series of predefined tests in different configurations to ensure compatibility. -MG is stateful, meaning it can save a value of an Sv2 message received by the tested software to be sent later in another message. The logic of the stateful MG makes it easier to implement arbitrary actions on MG, allowing the MG to send Sv2 messages where the fields' values are randomly chosen by the software, rather than the user. This represents a form of property-based testing. Currently, the implementation of arbitrary for MG is still a work in progress. +MG is stateful, meaning it can save a value of an SV2 message received by the tested software to be sent later in another message. The logic of the stateful MG makes it easier to implement arbitrary actions on MG, allowing the MG to send SV2 messages where the fields' values are randomly chosen by the software, rather than the user. This represents a form of property-based testing. Currently, the implementation of arbitrary for MG is still a work in progress. The following are the next steps for MG: - Implement arbitrary functionality - Write additional MG tests -- Extend MG support to Sv1 messages +- Extend MG support to SV1 messages ### 👩‍💻SRI Stack @@ -108,11 +108,11 @@ Thus far, SRI’s architecture bundled some of the roles together. We’ve reali We’re now working on refactoring those roles, that would allow us to have: - **SV2 pool** that doesn’t have built in job-declaration - **SV2 mining-proxy** that does downstream aggregation/load balancing. -- **Translator-proxy** that does Sv1 to Sv2 translation +- **Translator-proxy** that does SV1 to SV2 translation - **Job-declarator-client** that does job declaration - **Job-declarator-server** that accepts or declines jobs and does block propagation -#### Stratum v2 Pool +#### Stratum V2 Pool The ability for **existing pools** to easily **integrate SV2** is our highest priority. This requires that we develop an HTTP API. Certain mining pools aim to monitor their clients' mining devices in order to display a malfunctioning device, or generally showcase additional data on their web app. This can be easily achieved by tracking the shares submitted by each device. We’re working on adding this in the form of an extension to the SRI, as a **monitoring-extension**. @@ -143,7 +143,7 @@ Next, we’ll be adding **noise handshake encryption**, and **framing** improvem We would like to thank everyone who has reviewed the PR thus far, and would like to invite more developers to take a look at it and provide feedback. -After those updates are added, we will be **converting PR from draft to ready to review**. Hopefully after enough reviews and community consensus, the PR gets merged into the bitcoin core codebase. Meanwhile, miners wanting to help test and use the sv2 template provider can use our patched version. +After those updates are added, we will be **converting PR from draft to ready to review**. Hopefully after enough reviews and community consensus, the PR gets merged into the bitcoin core codebase. Meanwhile, miners wanting to help test and use the SV2 template provider can use our patched version. #### Proxies @@ -152,16 +152,16 @@ All miners use proxies to aggregate connections and save on bandwidth. In SRI we - Translation Proxy - SV2 Proxy -**Translation proxy** is something we worked on and deployed in October 2022. It allows miners running sv1 firmware to connect to an SV2 pool, by converting messages from SV1 to SV2 and vice versa. This means that miners don’t have to update firmware to use Stratum v2. Translation proxy has been tested and stabilized. +**Translation proxy** is something we worked on and deployed in October 2022. It allows miners running sv1 firmware to connect to an SV2 pool, by converting messages from SV1 to SV2 and vice versa. This means that miners don’t have to update firmware to use Stratum V2. Translation proxy has been tested and stabilized. One of our goals in the future is to develop a **pure SV2 proxy**, that would aggregate connections from mining devices running SV2 firmware. Further improving mining-proxy means that we would be adding **web-ui** for easier management of devices by the miners at some point in the future. #### Benchmarking -It’s not an unknown fact that miners by nature are very rational actors in the ecosystem. With that in mind, their actions are usually profit-driven. To ensure Stratum v2 adoption, we’ve started developing a testing & benchmarking suite which would allow industry to easily compare Stratum v2 performance against Stratum v1 in different mining scenarios. Such tool should provide data that will help miners evaluate profitability and performance and make an informed decision. We will be documenting benchmarking results in the form of a report/case-study and sharing it with the industry. +It’s not an unknown fact that miners by nature are very rational actors in the ecosystem. With that in mind, their actions are usually profit-driven. To ensure Stratum V2 adoption, we’ve started developing a testing & benchmarking suite which would allow industry to easily compare Stratum V2 performance against Stratum V1 in different mining scenarios. Such tool should provide data that will help miners evaluate profitability and performance and make an informed decision. We will be documenting benchmarking results in the form of a report/case-study and sharing it with the industry. The benchmarking suite will include: -- Dockerized roles for both Stratum v1 and Stratum v2; +- Dockerized roles for both Stratum V1 and Stratum V2; - Possibility to benchmark protocols in regtest, testnet and possibly mainnet; - Possibility to easily benchmark different configurations permitted by SRI stack; - Web UI to easily interact with the benchmarking suite; @@ -173,6 +173,6 @@ In the future, as our contributors base grows, we’re hoping to kick-start the #### Contributors -As you may have noticed, Stratum v2 and SRI will aim to have a lot of new features, improvements and big plans. We could never develop software without our community who has been actively helping us by testing the software and providing feedback. Thank you for your efforts. +As you may have noticed, Stratum V2 and SRI will aim to have a lot of new features, improvements and big plans. We could never develop software without our community who has been actively helping us by testing the software and providing feedback. Thank you for your efforts. We’re a small team of contributors with big dreams, to make that happen, **we need more people to join us in our mission** of decentralizing and improving bitcoin mining and we’re welcoming anyone interested in contributing to join us on [Discord](https://discord.gg/fsEW23wFYs). diff --git a/src/_blog/StratumV2-JN-Announcement.md b/src/_blog/StratumV2-JN-Announcement.md index d080234..aedc80b 100644 --- a/src/_blog/StratumV2-JN-Announcement.md +++ b/src/_blog/StratumV2-JN-Announcement.md @@ -1,6 +1,6 @@ --- title: " New SRI update with Job Negotiator - allowing miners to select transactions " -description: "A new update of Stratum v2 is available.The new update allows miners to select transactions via a new sub-protocol and their node. We’re inviting miners, pools, firmware makers, and the community to check out our getting started guide and pilot test the software!" +description: "A new update of Stratum V2 is available.The new update allows miners to select transactions via a new sub-protocol and their node. We’re inviting miners, pools, firmware makers, and the community to check out our getting started guide and pilot test the software!" date: "2023-04-14" authors: - Pavlenex @@ -23,7 +23,7 @@ Heigh-ho, Heigh-ho* --- -After months of coding in our dusty mines, we’re ready to ship a new Stratum v2 reference implementation (SRI) update! +After months of coding in our dusty mines, we’re ready to ship a new Stratum V2 reference implementation (SRI) update! The new update allows miners to select transactions via a new sub-protocol and their node. This is a major milestone in democratizing transaction selections in pooled mining and decentralizing bitcoin! @@ -32,7 +32,7 @@ The new update allows miners to select transactions via a new sub-protocol and t **Please submit your feedback after testing [via this form](https://docs.google.com/forms/d/1is27h37PtsXtXC9zSbweNfxcyEtHzATjdJphIy8hArw/).** -SRI’s flexible stack offers various components when setting up a configuration that suits your needs. As an early adopter, we recommend testing the mining device with Stratum v1 firmware, connecting to an SV2 pool via Translation Proxy. Miners will run their own template provider (bitcoind) with the max fee policy. Within the translation proxy sits a Job Negotiator that runs a sub-protocol responsible for distributing miner’s templates to the pool. +SRI’s flexible stack offers various components when setting up a configuration that suits your needs. As an early adopter, we recommend testing the mining device with Stratum V1 firmware, connecting to an SV2 pool via Translation Proxy. Miners will run their own template provider (bitcoind) with the max fee policy. Within the translation proxy sits a Job Negotiator that runs a sub-protocol responsible for distributing miner’s templates to the pool. ![Config D](/assets/config-d.svg) @@ -40,7 +40,7 @@ While there are various configurations to explore, testing the configuration, wh ## What is a Job Negotiator? -With the current mining protocol - Stratum v1, the pools use their template providers to dispatch work to the miners. As a result, mining pools are the central point of failure and potential weak spot when it comes to censoring certain transactions by excluding them from the template. +With the current mining protocol - Stratum V1, the pools use their template providers to dispatch work to the miners. As a result, mining pools are the central point of failure and potential weak spot when it comes to censoring certain transactions by excluding them from the template. A Job Negotiator, in combination with a template provider, gives the responsibility back to miners or an independent third party to provide a new template (select transactions), thereby making bitcoin pool infrastructure more decentralized. @@ -86,13 +86,13 @@ With the next update, we will add a fallback functionality that would allow mine In addition, we will add ways for pools to spot-check the validity of blocks and a few other improvements, like enhancing the encryption and ensuring we're following the latest changes in the spec. Most importantly, we hope to open a pull request for template provider in Bitcoin Core. -We'd like to thank Stratum v2 supporters, implementers, and all contributors, without whom SRI wouldn't be possible. Please donate to our [crowdfunding page](https://opensats.org/projects/stratumv2) hosted by OpenSats Foundation and Swan to support our development efforts. +We'd like to thank Stratum V2 supporters, implementers, and all contributors, without whom SRI wouldn't be possible. Please donate to our [crowdfunding page](https://opensats.org/projects/stratumv2) hosted by OpenSats Foundation and Swan to support our development efforts. ![Supporters](/assets/stratum-v2-supporters.png) If you’re a company willing to directly support the work of developers by providing a direct grant and being featured on our website, please [get in touch](mailto:stratumv2@gmail.com). We will connect you with our contributors in need of funding. -[Join our Discord](https://discord.gg/UHckbC7x58) to engage with the Stratum v2 community. +[Join our Discord](https://discord.gg/UHckbC7x58) to engage with the Stratum V2 community. We’re excited to [hear your feedback](https://docs.google.com/forms/d/1is27h37PtsXtXC9zSbweNfxcyEtHzATjdJphIy8hArw/prefill). diff --git a/src/docs/index.md b/src/docs/index.md index 37f50c8..6b3dd93 100644 --- a/src/docs/index.md +++ b/src/docs/index.md @@ -2,35 +2,35 @@ pageHeading: Roles and Protocols --- -# Stratum v2 Overview +# Stratum V2 Overview -The Stratum v2 Protocol Suite consists of [4 protocols](#sub-protocols) (the main Mining Protocol and 3 sub-protocols) which specify the communication standards among [5 roles](#roles) for Bitcoin Mining entities, through the use of 3 types of communication [channels](#channels). This section defines the roles, channels, and provides a summary of each sub-protocol's implementation. For technical specifications, please refer to the full documentation on [Github](https://www.github.com/stratum-mining/sv2-spec). +The Stratum V2 Protocol Suite consists of [4 protocols](#sub-protocols) (the main Mining Protocol and 3 sub-protocols) which specify the communication standards among [5 roles](#roles) for Bitcoin Mining entities, through the use of 3 types of communication [channels](#channels). This section defines the roles, channels, and provides a summary of each sub-protocol's implementation. For technical specifications, please refer to the full documentation on [Github](https://www.github.com/stratum-mining/sv2-spec). ## Roles -We define 5 roles for entities in the Stratum v2 Protocol Suite, which can be classified as either downstream or upstream in relation to each other. +We define 5 roles for entities in the Stratum V2 Protocol Suite, which can be classified as either downstream or upstream in relation to each other. ### Mining Devices or Miners -The actual mining machines which compute hashes. Miners may refer to a wide variety of hashrate producers; from large-scale corporate mining farms to wildcat mobile mining operations capturing flare gas on a temporory shale drilling site. Miners are most usefully referred to at the scale they communicate upstream to a pool: a 10PH mining farm colocated with a hydro dam that communicates as a single unit to the pool and splits its work internally may be thought of as a single 'miner', separate from the 'miner' operating a single S19 in his garage down the street. Miners "point" their hashrate at a Pool, defined below. From a Stratum v2 perspective, they are considered the most downstream roles. +The actual mining machines which compute hashes. Miners may refer to a wide variety of hashrate producers; from large-scale corporate mining farms to wildcat mobile mining operations capturing flare gas on a temporory shale drilling site. Miners are most usefully referred to at the scale they communicate upstream to a pool: a 10PH mining farm colocated with a hydro dam that communicates as a single unit to the pool and splits its work internally may be thought of as a single 'miner', separate from the 'miner' operating a single S19 in his garage down the street. Miners "point" their hashrate at a Pool, defined below. From a Stratum V2 perspective, they are considered the most downstream roles. ### Pools -Pools operate as communication nodes to coordinate hashrate and distribute mining rewards. They create jobs for end-mining devices, validate blocks and shares, and propagate found blocks to the Bitcoin Network. Pools do not custody or control hashrate. End-mining devices compatible with the Stratum protocol can switch between pools in minutes. Pools therefore compete for hashrate based on latency, ease-of-use, payout reliability, and associated networking services, all of which Stratum v2 can significantly improve. They are considered the most upstream roles. Pools can open any kind of communication channels (as defined below) with downstream roles (Proxies or Mining Devices). +Pools operate as communication nodes to coordinate hashrate and distribute mining rewards. They create jobs for end-mining devices, validate blocks and shares, and propagate found blocks to the Bitcoin Network. Pools do not custody or control hashrate. End-mining devices compatible with the Stratum protocol can switch between pools in minutes. Pools therefore compete for hashrate based on latency, ease-of-use, payout reliability, and associated networking services, all of which Stratum V2 can significantly improve. They are considered the most upstream roles. Pools can open any kind of communication channels (as defined below) with downstream roles (Proxies or Mining Devices). ### Proxies -Proxies are intermediaries between Miners and Pools that aggregate connections and translate mining communications from Sv1->Sv2 or Sv2->Sv1. Proxies may optionally provide additional functionality including monitoring services or job declaration optimizations. Both Miners and Pools can run Proxies, and they will do so for various reasons depending on the use-case. +Proxies are intermediaries between Miners and Pools that aggregate connections and translate mining communications from SV1->SV2 or SV2->SV1. Proxies may optionally provide additional functionality including monitoring services or job declaration optimizations. Both Miners and Pools can run Proxies, and they will do so for various reasons depending on the use-case. #### Mining Proxy -The Sv2 Mining Proxy acts as an intermediary between the mining devices and the Sv2 Pool. It receives mining requests from multiple devices, aggregates them, and forwards them to the Sv2 Pool. It can open group/extended channels with upstream (the Sv2 Pool) and standard channels with downstream (Sv2 Mining Devices). +The SV2 Mining Proxy acts as an intermediary between the mining devices and the SV2 Pool. It receives mining requests from multiple devices, aggregates them, and forwards them to the SV2 Pool. It can open group/extended channels with upstream (the SV2 Pool) and standard channels with downstream (SV2 Mining Devices). #### Translation Proxy -Translator Proxy is responsible for translating the communication between Sv1 actual Mining Devices and an Sv2 Pool or Mining Proxy. It enables Sv1 devices to interact with Sv2-based mining infrastructure, bridging the gap between the older Sv1 protocol and Sv2. It can open extended channels with upstream (the Sv2 Pool or Mining Proxy). -For example, a Pool might run a Translator Proxy as its initial connection service to accept both Sv1 and Sv2 connections, establishing direct standard channels with the Sv2 miners and using the proxy to translate messages with the Sv1 miners. +Translator Proxy is responsible for translating the communication between SV1 actual Mining Devices and an SV2 Pool or Mining Proxy. It enables SV1 devices to interact with SV2-based mining infrastructure, bridging the gap between the older SV1 protocol and SV2. It can open extended channels with upstream (the SV2 Pool or Mining Proxy). +For example, a Pool might run a Translator Proxy as its initial connection service to accept both SV1 and SV2 connections, establishing direct standard channels with the SV2 miners and using the proxy to translate messages with the SV1 miners. ### Job Declarators @@ -53,7 +53,7 @@ Template Providers (TPs) are roles which can be Pool-side and Miner-side, but th ### Mining Protocol -Also known as the "Main Protocol", this is the direct successor to Stratum v1. The main protocol is used for mining and the only part of the full protocol stack that needs to be implemented in all scenarios. It is used for communication between Mining Devices, Proxies, and Pool Services. If a miner/pool does not support transaction selection and declared mining jobs, this is the only required protocol. +Also known as the "Main Protocol", this is the direct successor to Stratum V1. The main protocol is used for mining and the only part of the full protocol stack that needs to be implemented in all scenarios. It is used for communication between Mining Devices, Proxies, and Pool Services. If a miner/pool does not support transaction selection and declared mining jobs, this is the only required protocol. #### Channels The protocol defines three types of communication channels: @@ -69,7 +69,7 @@ The Job Declaration Protocol is used by a miner, typically a mining farm, to dec ### Template Distribution Protocol -The Template Distribution Protocol is used to facilitate the extraction of the information about the next block from Bitcoin Core. It is designed to replace getblocktemplate (BIPs 22 and 23) with a more efficient and easier-to-implement solution for those incorporating other aspects of Stratum v2 into their systems. +The Template Distribution Protocol is used to facilitate the extraction of the information about the next block from Bitcoin Core. It is designed to replace getblocktemplate (BIPs 22 and 23) with a more efficient and easier-to-implement solution for those incorporating other aspects of Stratum V2 into their systems. ### Job Distribution Protocol diff --git a/src/features.md b/src/features.md index ca2f694..c3cc55f 100644 --- a/src/features.md +++ b/src/features.md @@ -4,7 +4,7 @@ pageHeading: SV2 in Detail # Features -Stratum v2 offers superior security, flexibility, and performance. This section details the motivations and technical descriptions behind V2's protocol design decisions. +Stratum V2 offers superior security, flexibility, and performance. This section details the motivations and technical descriptions behind V2's protocol design decisions. ## Bandwidth Consumption @@ -36,13 +36,13 @@ Any pool can (and should) take advantage of this benefit to reduce inefficiency ## Job Distribution Latency -Sv2 separates mining prevhash and future job, vs the combined message in Sv1 which forces pools to send empty blocks to communicate a prevhash. Sv2 pools can send jobs to workers ahead of time for future blocks, even before the prior block has been found. Pools send the latest prevhash in a space opitimized message, starting the end-device mining on the next block in a single 32-byte message. +SV2 separates mining prevhash and future job, vs the combined message in SV1 which forces pools to send empty blocks to communicate a prevhash. SV2 pools can send jobs to workers ahead of time for future blocks, even before the prior block has been found. Pools send the latest prevhash in a space opitimized message, starting the end-device mining on the next block in a single 32-byte message. #### Technical Description -Pools distribute jobs to miners with predefined data blocks and variable data for end-device miner handling. In Stratum V1, the predefined data includes the prevhash (i.e. hash of the most recently found valid block) and the Merkle root for the transaction set to be included in the current block. These two data fields aren’t seperable in Sv1, forcing a heavy (slow) data transfer necessary to distribute new jobs on new block (with a new prevhash) propagation. +Pools distribute jobs to miners with predefined data blocks and variable data for end-device miner handling. In Stratum V1, the predefined data includes the prevhash (i.e. hash of the most recently found valid block) and the Merkle root for the transaction set to be included in the current block. These two data fields aren’t seperable in SV1, forcing a heavy (slow) data transfer necessary to distribute new jobs on new block (with a new prevhash) propagation. -Stratum V2 segregates the prevhash from the rest of the predefined block data, allowing independent sends of block data prior to finding a new prevhash. The new prevhash message is sent on its own on finding a valid block; the transmission occurs much faster because the message doesn’t include the heavier data. Stratum v2 miners begin work on new blocks faster than Stratum v1 miners. +Stratum V2 segregates the prevhash from the rest of the predefined block data, allowing independent sends of block data prior to finding a new prevhash. The new prevhash message is sent on its own on finding a valid block; the transmission occurs much faster because the message doesn’t include the heavier data. Stratum V2 miners begin work on new blocks faster than Stratum V1 miners. #### Motivation & Impact @@ -54,7 +54,7 @@ SV2 uses a binary encoding for messages, eliminating redundant and unnecessary n #### Technical Description -The Sv2 Protocol has fixed message framing and is precisely defined, eliminating Sv1's interpretation errors. See 'Framing' for details. +The SV2 Protocol has fixed message framing and is precisely defined, eliminating SV1's interpretation errors. See 'Framing' for details. #### Motivation & Impact @@ -80,11 +80,11 @@ Attackers can implement the above attacks undetected. Stratum V2 uses authentica ## Eliminate Empty Block Mining -Stratum v1 incentivizes 'blind mining', where end-devices temporarily mine on an empty block, without any transactions, while calculating the next block candidate's block template. Sv2 eliminates the blind bining incentive by making full-block propagation equally efficient to empty block propagation. +Stratum V1 incentivizes 'blind mining', where end-devices temporarily mine on an empty block, without any transactions, while calculating the next block candidate's block template. SV2 eliminates the blind bining incentive by making full-block propagation equally efficient to empty block propagation. #### Technical Description -Stratum v1 incentivizes pools to send empty blocks containing the new prevhash, as these messages will arrive faster than a message containing a full block. Separating these two messages in Stratum V2 lets pools send full blocks to miners before the new prevhash message. The miners' end-devices are prepared to start working on a new (full) block before the previous block has been found, and only require the next prevhash message to begin mining. Since this prevhash message is the same size (i.e. takes the same amount of time to arrive) regardless of whether or not the pool has sent an empty block or a full block, there is no longer an incentive to mine on empty blocks. +Stratum V1 incentivizes pools to send empty blocks containing the new prevhash, as these messages will arrive faster than a message containing a full block. Separating these two messages in Stratum V2 lets pools send full blocks to miners before the new prevhash message. The miners' end-devices are prepared to start working on a new (full) block before the previous block has been found, and only require the next prevhash message to begin mining. Since this prevhash message is the same size (i.e. takes the same amount of time to arrive) regardless of whether or not the pool has sent an empty block or a full block, there is no longer an incentive to mine on empty blocks. #### Motivation & Impact @@ -92,7 +92,7 @@ As long as the incentive to mine on empty blocks exists, there is a nonzero chan ## Job Selection -Miners can choose their own work and mine their chosen transaction set in Sv2, further decentralizing mining. Decentralized block template construction is implemented separately from the main mining protocol and is optional for pools and miners. +Miners can choose their own work and mine their chosen transaction set in SV2, further decentralizing mining. Decentralized block template construction is implemented separately from the main mining protocol and is optional for pools and miners. #### Technical Description diff --git a/src/getting-started.md b/src/getting-started.md index fcca7dc..4db991f 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -2,9 +2,9 @@ pageHeading: Getting Started --- -# Getting Started with running SRI - Stratum v2 reference implementation +# Getting Started with running SRI - Stratum V2 reference implementation -This document aims to assist users in deploying the SRI software stack efficiently. Stratum v2 as a protocol is flexible, and allows users to run multiple configurations. In the getting started guide, we’re focusing on running [roles](https://stratumprotocol.org/docs/#roles) which allow miners to construct their own block templates. +This document aims to assist users in deploying the SRI software stack efficiently. Stratum V2 as a protocol is flexible, and allows users to run multiple configurations. In the getting started guide, we’re focusing on running [roles](https://stratumprotocol.org/docs/#roles) which allow miners to construct their own block templates. ![SRI ](/assets/Sri-AllRoles.png) @@ -22,7 +22,7 @@ There are two primary ways to use all roles: ## I Getting Started - The easiest way -**Objective**: Give Stratum v2 a try, mine blocks on the testnet with minimal setup. +**Objective**: Give Stratum V2 a try, mine blocks on the testnet with minimal setup. - Community-hosted roles used: SV2 Pool, testnet Template Provider, and Job Declarator Server. - Self-hosted roles to run: Job Declarator Client (JDC) and Translator Proxy. @@ -170,7 +170,7 @@ Translation Proxy tProxy logs ### Monitor for mined blocks on Testnet -If you didn’t change anything in the configuration files present in every role subdirectory, the valid block mined will be recognized by the string `Stratum v2 SRI Pool (0x5374726174756d2076322053524920506f6f6c)` inserted into the scriptSig of the coinbase tx input. +If you didn’t change anything in the configuration files present in every role subdirectory, the valid block mined will be recognized by the string `Stratum V2 SRI Pool (0x5374726174756d2076322053524920506f6f6c)` inserted into the scriptSig of the coinbase tx input. A way to look for it is to check the address `tb1qa0sm0hxzj0x25rh8gw5xlzwlsfvvyz8u96w3p8` since the default coinbase output is configured to be a P2WPKH built with a public key = `036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075` diff --git a/src/implementation.md b/src/implementation.md index 62289f1..c2ba947 100644 --- a/src/implementation.md +++ b/src/implementation.md @@ -6,20 +6,20 @@ pageHeading: Reference Implementation The [SV2 Reference Implementation](https://www.github.com/stratum-mining/stratum) provides: -A robust set of Stratum V2 (Sv2) primitives as Rust library crates for anyone to expand the protocol or implement a role. +A robust set of Stratum V2 (SV2) primitives as Rust library crates for anyone to expand the protocol or implement a role. For example: -- Pools supporting Sv2 -- Mining-device/hashrate producers integrating Sv2 into their firmware +- Pools supporting SV2 +- Mining-device/hashrate producers integrating SV2 into their firmware - Bitcoin nodes implementing Template Provider to build the blocktemplate The above Rust primitives as a C library available for use in other languages via FFI. -A set of helpers built on top of the above primitives and the external Bitcoin-related Rust crates for flexible implementations of the Sv2 roles. +A set of helpers built on top of the above primitives and the external Bitcoin-related Rust crates for flexible implementations of the SV2 roles. -An open-source implementation of a Sv2 proxy for miners. +An open-source implementation of a SV2 proxy for miners. -An open-source implementation of a Sv2 pool for mining pool operators. +An open-source implementation of a SV2 pool for mining pool operators. ## Native Support @@ -27,16 +27,16 @@ The Reference Implementation's modular design supports use in 3rd party software ### Miner Use-Cases -- Sv1 Miners can use the proxy (roles/sv2/mining-proxy) to connect with a Sv2-compatible pool. +- SV1 Miners can use the proxy (roles/sv2/mining-proxy) to connect with a SV2-compatible pool. -- Sv1 mining farms mining to a Sv2-compatible pool gain some of the security and efficiency improvements Sv2 offers over Stratum V1 (Sv1). The Sv1<->Sv2 miner proxy does not support all the features of Sv2, but works as a temporary measure before upgrading completely to Sv2-compatible firmware. (The Sv1<->Sv2 translation proxy implementation is a work in progress.) +- SV1 mining farms mining to a SV2-compatible pool gain some of the security and efficiency improvements SV2 offers over Stratum V1 (SV1). The SV1<->SV2 miner proxy does not support all the features of SV2, but works as a temporary measure before upgrading completely to SV2-compatible firmware. (The SV1<->SV2 translation proxy implementation is a work in progress.) ### Pool Use-Cases -- Pools supporting Sv2 can deploy the open source binary crate (roles/pool) to offer their clients (miners participating in said pool) an Sv2-compatible pool. +- Pools supporting SV2 can deploy the open source binary crate (roles/pool) to offer their clients (miners participating in said pool) an SV2-compatible pool. -- The Rust helper library provides a suite of tools for mining pools to build custom Sv2 compatible pool implementations. +- The Rust helper library provides a suite of tools for mining pools to build custom SV2 compatible pool implementations. -- The C library provides a set of FFI bindings to the Rust helper library for miners to integrate Sv2 into their existing firmware stack. +- The C library provides a set of FFI bindings to the Rust helper library for miners to integrate SV2 into their existing firmware stack. For further detailed documentation on how to deploy the reference implementation for one of the above use-cases or integrate, see the README on [Github](https://www.github.com/stratum-mining/stratum) or join our developer community on [Discord](https://discord.gg/fsEW23wFYs).