去中心化矿池协议 Stratum V2 概述

币圈资讯 阅读:49 2024-04-22 12:09:49 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

作者:Stratu

Stratum V2 协议套件由 4 个协议组成(作为主体的挖矿协议以及 3 个子协议),为参与比特币挖矿的主体指定了 5 个角色及其通信标准,使用了 3 种类型的通信信道。本文介绍了 Stratum V2 所定义的角色、信道,并总结了每一种子协议的实现。至于技术橡树,请参考 GitHub 上的完整文档。

角色

我们为 Stratum V2 协议套件中的主体定义了 5 种角色,这些主体之间的关系可以用上下游来分类。

挖矿设备(或者,矿工)

计算哈希值的实际挖矿设备。“矿工” 可以指代多种多样的哈希率生产者:从大规模的企业矿场,到再页岩油钻井平台现场偷偷摸摸收集天然气的移动挖矿操作。在描述矿工时,最有用的是描述其跟上游的矿池通信的规模:一个 10PH 的、跟一个水电站合作的矿场,作为一个单元跟矿池通信,虽然在其内部也将工作分给许多台挖矿设备,也可以被认为是一个 “矿工”,只是有别于在街头车库里运行一台 S19 的 “矿工”。如下所述,矿工将自己的哈希率 “提供” 给某个矿池。从 Stratum V2 的角度看,矿工是最下游的角色。

矿池

矿池是一个通信节点,负责协调哈希率并分发挖矿奖励。他们为终端的设备创建工作(job),验证区块和分数(shares),并将发现的区块传播到比特币网络。矿池并不保管、也不控制哈希率。兼容 Stratum 协议的终端设备可以在几分钟内切换矿池。因此,矿池要基于时延、易用性、偿债可靠性以及相关的联网服务来相互竞争,而 Stratum V2 可以大幅提升这里的每一项。可以认为矿池是最上游的角色。矿池可以跟下游的角色(代理或者挖矿设备)开启任意类型的通信信道(见下文)。

代理

代理是矿工和矿池之间的中介,聚合连接并翻译挖矿通信(Sv1->Sv2 或者 Sv2->Sv1)。代理可能会提供额外的功能,包括监控服务或者工作声明优化。矿工和矿池都可以运行代理,而且他们会基于不同的应用场景、出于不同的理由而运行代理。

挖矿代理

Sv2 挖矿代理是挖矿设备与 Sv2 矿池之间的中间人。它接收来自多个设备的挖矿请求、聚合它们然后转发给 Sv2 矿池。它可以跟上游(Sv2 矿池)开启 群/延伸 信道,也可以跟下游(Sv2 挖矿设备)开启标准信道。

翻译代理

翻译代理负责 Sv1 挖矿设备和一个 Sv2 矿池或者挖矿代理之间的通信。它让 Sv1 的设备能跟基于 Sv2 的挖矿基础设施交互,弥合较老的 Sv1 协议和 Sv2 之间的鸿沟。它可以跟上游(Sv2 矿池或者挖矿代理)之间开启拓展新蛋。举个例子,一个矿池可能会运行一个翻译代理,作为初始连接服务,以接收 Sv1 和 Sv2 的连接,然后跟 Sv2 矿工建立直接的标准信道、使用这个代理来翻译与 Sv1 矿工的通信。

工作声明器

工作声明器(JD)是即可属于矿池也可属于矿工的角色,但也可以由任何第三方来运行。它们连接到一个模板供应方,从而能够接收和验证定制化的区块模板。它们是为了实现所谓的 “工作声明协议” 而需要的角色。它们可以通过工作分发协议,进一步分发工作给一个挖矿代理(或者代理)。

工作声明服务端

工作声明服务端(JDS)是矿池端的 JD,负责分配工作声明客户端所需的挖矿工作 token,以创建定制化的工作。它也是(使用工作声明协议)连接到矿池的矿工发现有效区块时,负责为矿池传播区块的实体。

工作声明客户端

工作声明客户端(JDC)是矿工端的 JD,负责从它连接到的模板供应方收取区块模板并创建新的挖矿工作。它向 JDS 声明定制化的工作,以开始挖矿。JDC 也负责启动备用矿池机制,在所声明的工作被 JDS 拒绝时自动切换到后备矿池。在穷尽备用之后,它可以切换成独自挖矿(Solo Mining),直至市场上出现新的安全的矿池。

模板供应方

模板供应方(TP)既可以部署在矿池一边,也可以不受到矿工一边,但也可以由任何第三方来运行。当 TP 部署在矿工一边时,它可以从本地的比特币节点抽取交易。如此一来,矿工就可以创建定制化的区块模板了,而且可以通过工作声明协议向矿池声明定制化的挖矿工作。

子协议

挖矿协议

也叫 “主协议”,是 Stratum V1 的直接后继者。主协议用于挖矿,也是整个协议套件中唯一需要在所有场景中都实现的部分。它用在挖矿设备、代理和矿池服务的沟通中。如果一个 矿工/矿池 并不支持交易选择和挖矿工作声明,这就是唯一需要实现的协议。

信道

协议定义了三种类型的信道:

  • 标准信道:不修改 默克尔路径/coinbase 交易,尽可能简化彼此之间以及跟上游节点的通信。

  • 延伸信道:给出对搜索空间的延伸控制,从而可以实现高级的应用场景(例如,来回翻译 v1 和 V2 消息,难度聚合、定制化搜索空间分割,等等)。

  • 群信道:标准信道的简单集合,在单个连接内开展,从而可以通过一个共同的信道来访问。

工作声明协议

工作声明协议是给矿工(一般来说是一个矿场)使用的,用来向矿池声明一个定制化的区块模板。这种声明的结果可以被复用到矿池的所有终端矿工连接中,从而减少计算强度。换句话说,单个声明可以应用到整个矿场的许多设备上,甚至多个矿场,从而实现更高的效率。这个协议是独立的,以允许矿池在独立的基础设施上中断这些连接,而不影响挖矿协议连接。这个协议是整个协议中的一个独立、可选的基础设施,而且可以由第三方来给矿场提供。这也是整个协议套件最突出的特性,因为它可以推动交易选择权力的去中心化。

模板分发协议

模板分发协议用来协助从 Bitcoin Core 中抽取可以构造下一个区块的信息。它的设计目标是取代 gitblocktemplate(BIP 22 和 23),为那些整合了 Stratum V2 其他方面的人提供更高的效率,而且更易于实现。

工作分发协议

用来将新声明的工作传递给利益相关的节点,既可以是代理,也可以是实际挖矿设备。这个协议是工作声明协议的补充。在矿工并不自建和声明自己的工作(即自选挖矿交易)的时候,工作会直接从矿池分发给代理和终端设备,就像最初的 stratum 协议。但是,这个协议将留给未来的文档指定,因为,当工作声明器成为一个更大的挖矿协议代理的一部分时,分发协议通常是不必要的。


The author's protocol suite consists of three protocols, namely, the mining protocol as the main body and the sub-protocols, which specify three roles and their communication standards for the main body involved in bitcoin mining. This paper introduces the defined role channels and summarizes the implementation of each sub-protocol. As for the technical oak tree, please refer to the complete document Role. We define three roles for the main body in the protocol suite, and the relationship between these main bodies can be classified by upstream and downstream to calculate the hash of mining equipment or miners. The actual mining equipment miners can refer to a variety of mobile mining operations in which producers secretly collect natural gas from large-scale enterprise mines to shale oil drilling platforms. The most useful thing in describing miners is to describe the scale of their communication with the upstream mine pool. A mine that cooperates with a hydropower station communicates with the mine pool as a unit, although it also distributes work to many mining equipment inside, it can also be regarded as a miner, but it is different from a street garage. Miners who run a mine provide their own hash rate to a mine pool as follows. Miners are the most downstream role from the point of view. The mine pool is a communication node responsible for coordinating the hash rate and distributing mining rewards. They create work verification blocks and scores for the terminal equipment and spread the found blocks to the bitcoin network mine pool. The terminal equipment that does not keep or control the hash rate compatibility protocol can switch the mine pool within a few minutes, so the mine pool should be based on time delay, ease of use and debt repayment reliability. And related networking services can compete with each other, which can greatly improve everything here. It can be considered that the mine pool is the most upstream role, and the mine pool can open any type of communication channel with the downstream role agent or mining equipment. See below. The agent is the intermediary between miners and the mine pool to aggregate connections and translate mining communication or the agent may provide additional functions, including monitoring services or job statement optimization. Both miners and the mine pool can run agents, and they will be based on different application fields. The mining agent is the intermediary between the mining equipment and the mining pool. It receives the mining requests from multiple devices, aggregates them and forwards them to the mining pool. It can open the group extension channel with the upstream mining pool or open the standard channel with the downstream mining equipment. The translation agent is responsible for the communication between the mining equipment and a mining pool or mining agent. It allows the equipment to interact with the mining infrastructure based on it to bridge the gap between the older protocols and the mining agent. For example, a mine pool may run a translation agent as the initial connection service to receive the connection with and then establish a direct standard channel with miners. Use this agent to translate the communication with miners. Work declarers can belong to both the mine pool and the miners, but they can also be run by any third party. They are connected to a template supplier so that customized areas can be received and verified. Block templates are the roles needed to realize the so-called work statement protocol. They can further distribute the work to a mining agent or agent through the work distribution protocol. The work statement server is responsible for distributing the mining work required by the work statement client at the mine pool end to create customized work. It is also responsible for spreading the work statement client for the mine pool when miners connected to the mine pool find effective blocks. The customer end is the miner's end, which is responsible for collecting the block template from the template supplier to which it is connected and creating new mining work. It declares customized work to start mining, and is also responsible for starting the backup pool mechanism. When the declared work is rejected, it automatically switches to the backup pool. After exhausting the backup, it can switch to mining alone until a new safe pool template appears in the market. The template supplier can be deployed on the side of the mine pool or not affected by the miners, but it can also be operated by any third party. When deployed on the miner's side, it can extract transactions from local bitcoin nodes, so that miners can create customized block templates, and can declare customized mining sub-protocols to the mine pool through the work statement protocol. The mining protocol is also called the main protocol, which is the direct successor. The main protocol is used for mining and is the only part of the whole protocol suite that needs to be realized in all scenarios. It is used in the communication between mining equipment agents and mine pool services. If a miner's mine pool, It does not support transaction selection and mining work statement, which is the only protocol that needs to be realized. The channel protocol defines three types of standard channels. The Merkel path transaction is simplified as much as possible, and the communication between each other and the upstream nodes is extended. The channel gives extended control over the search space, so that advanced application scenarios such as back-and-forth translation, message difficulty aggregation, customized search space division and so on can be realized. A simple set of standard channels of group channels can be carried out in a single connection. Access the work statement protocol through a common channel. The work statement protocol is used by miners, generally a mine, to declare a customized block template to the mine pool. The results of this statement can be reused in all the terminal miners' connections of the mine pool, thus reducing the computational intensity. In other words, a single statement can be applied to many devices in the whole mine or even multiple mines to achieve higher efficiency. This protocol is independent to allow the mine pool to be in an independent infrastructure. Breaking these connections without affecting the mining protocol connection, this protocol is an independent and optional infrastructure in the whole protocol, and it can be provided to the mine by a third party, which is also the most prominent feature of the whole protocol suite, because it can promote the decentralized template distribution protocol of transaction selection power, which is used to help extract information that can be used to construct the next block. Its design goal is to replace and provide higher efficiency and easier implementation for those who integrate other aspects. The current work distribution protocol is used to transfer the newly declared work to the interested nodes, which can be either the agent or the actual mining equipment. This protocol is a supplement to the work declaration protocol. When miners do not build their own work and declare their own mining transactions, the work will be distributed directly from the mine pool to the agents and terminal equipment, just like the original protocol, but this protocol will be reserved for future documents, because the distribution protocol is usually unnecessary when the work declarer becomes a part of a larger mining protocol agent. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明 网址:https://netpsp.com/?id=62757

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友