Skip to content

新版 getwork ​

原始发布页

打开来源页面
查看 1 个交叉存档

我将重新设计的 m0mchil 版 getwork 上传到了 SVN rev 189(版本 31601)

m0mchil 的外部比特币矿工构想解决了很多问题。GPU 编程还不成熟,也很难编译,而我不想给构建过程添加额外的依赖项。getwork 让这些问题可以分别解决,针对不同硬件和操作系统使用不同程序。另外,服务器集群可以只运行一个比特币节点,其余服务器只运行 getwork 客户端,这也很方便。

接口有几处改动:

getwork [data] 如果未指定 [data],则返回用于计算的格式化哈希数据: "midstate":对数据前半部分进行哈希后预先计算的哈希状态 "data":区块数据 "hash1":用于第二次哈希的格式化哈希缓冲区 "target":小端序哈希目标值 如果指定了 [data],则尝试解出区块,成功时返回 true。[data] 与 "data" 字段中返回的 128 字节区块数据相同,但 nonce 已被更改。

注意: - 提交一个可能命中的结果时,它不会返回工作,只有不带参数调用时才会返回。 - block 字段已拆分为 data 和 hash1。 - data 为 128 字节,其中包括已经由 midstate 进行哈希的前半部分。 - hash1 始终相同,但为方便起见仍包含在内。 - 已禁用 "ThreadRPCServer method=getwork" 的日志记录,否则日志中会有太多无用内容。

英文原文 ​

展开英文原文

I uploaded a redesign of m0mchil's getwork to SVN rev 189 (version 31601)

m0mchil's external bitcoin miner idea has solved a lot of problems. GPU programming is immature and hard to compile, and I didn't want to add additional dependencies to the build. getwork allows these problems to be solved separately, with different programs for different hardware and OSes. It's also convenient that server farms can run a single Bitcoin node and the rest only run getwork clients.

The interface has a few changes:

getwork [data] If [data] is not specified, returns formatted hash data to work on: "midstate" : precomputed hash state after hashing the first half of the data "data" : block data "hash1" : formatted hash buffer for second hash "target" : little endian hash target If [data] is specified, tries to solve the block and returns true if it was successful. [data] is the same 128 byte block data that was returned in the "data" field, but with the nonce changed.

Notes: - It does not return work when you submit a possible hit, only when called without parameter. - The block field has been separated into data and hash1. - data is 128 bytes, which includes the first half that's already hashed by midstate. - hash1 is always the same, but included for convenience. - Logging of "ThreadRPCServer method=getwork" is disabled, it would be too much junk in the log.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。