以太坊(ETH)Windows系统挖矿

操作系统:Windows10 64位
显卡型号:nVidia GTX1070

步骤一:下载ethminer和eth-proxy

下载挖矿软件ethminer

https://github.com/Genoil/cpp-ethereum/tree/master/releases
下载最新的。当前是ethminer-0.9.41-genoil-1.1.7.zip。

下载挖矿代理eth-proxy

这个不是必须的。不过据说可以提高点效率。对我来说意义是可以减少一些启动ethminer时的参数。
https://github.com/Atrides/eth-proxy/releases
下载最新的eth-proxy-win.zip。

如果无法访问/下载,可以从国内网盘找找。不过最好还是从github下。

步骤二:配置参数

新建一个ETH文件夹,把下载的两个zip包解压到这里。这样就有两个子文件夹了:

ethminer-0.9.41-genoil-1.1.7
eth-proxy

配置eth-proxy

进入eth-proxy文件夹,找到eth-proxy.conf文件,用文本编辑器打开:

###
# Examples of command line for miners:
#
#   ethminer.exe --farm-recheck 200 -G -F http://HOST:PORT/
#   ethminer.exe --farm-recheck 300 -G -F http://HOST:PORT/rig1
#
#   ethminer.exe -G -F http://127.0.0.1:8080/
#   ethminer.exe --farm-recheck 100 -G -F http://192.168.0.33:8080/rig1
#
#  farm-recheck parameter is very individual. Just test different values.
#
#  You can submit shares without workername or
#  You can provide workername:
#   - with url like "/rig1"
#   - or use automatically numbering(integer) based on IP of miner
#
#  Servers:
#    EU-Server:  eth-eu.dwarfpool.com  (France)
#    US-Server:  eth-us.dwarfpool.com  (EastCoast: Montreal,Canada)
#    US-Server:  eth-us2.dwarfpool.com (WestCoast: Las Vegas)
#    RU-Server:  eth-ru.dwarfpool.com  (Moscow)
#    HK-Server:  eth-hk.dwarfpool.com  (Hong-Kong)
#    CN-Server:  eth-cn.dwarfpool.com  (Shanghai)
#    SG-Server:  eth-sg.dwarfpool.com  (Singapore)
#    AU-Server:  eth-au.dwarfpool.com  (Melbourne)
#
###

# Select Ethereum ETH or Expanse EXP
COIN = "ETH"

# Host and port for your workers
HOST = "127.0.0.1"
PORT = 8080

# Coin address where money goes
WALLET = "0x2E87e775471D982BA014112AFF83Ac025f7C1078"

# To donate please use wallet "0xea7263feb7d8a8ab0a11eedd8f1ce04412ab0820"

# It's useful for individually monitoring and statistic
ENABLE_WORKER_ID = True

# On DwarfPool you have option to monitor your workers via email.
# If WORKER_ID is enabled, you can monitor every worker/rig separately.
MONITORING = False
MONITORING_EMAIL = "icyuki@icyuki.com"

# Main pool
POOL_HOST = "eth-hk.dwarfpool.com"
POOL_PORT = 8008

# Failover pool
POOL_FAILOVER_ENABLE = True

POOL_HOST_FAILOVER1 = "eth-sg.dwarfpool.com"
POOL_PORT_FAILOVER1 = 8008

POOL_HOST_FAILOVER2 = "eth-us.dwarfpool.com"
POOL_PORT_FAILOVER2 = 8008

POOL_HOST_FAILOVER3 = "eth-cn.dwarfpool.com"
POOL_PORT_FAILOVER3 = 8008


# Logging
LOG_TO_FILE = True

# Enable debug
DEBUG = False

我们要改的配置是:
本地代理配置:

HOST = "127.0.0.1"
PORT = 8080

如果是单机挖矿,可以填”127.0.0.1″。
如果是局域网内多机挖矿,固定本机局域网IP,填本机的局域网IP。

钱包地址:

WALLET = "0x2E87e775471D982BA014112AFF83Ac025f7C1078"

这是ETH钱包的地址。注意:一定要填自己的,不能照抄或不改,否则就为我或为软件开发者挖了。

矿机标记:

ENABLE_WORKER_ID = True

建议开启,可以区分每个矿机。

监控邮件配置:

MONITORING = False
MONITORING_EMAIL = "icyuki@icyuki.com"

如果想要收到监控邮件的话,把False改成True,填上自己邮箱。
注意:dwarfpool矿池有个“好邮箱”和“坏邮箱”列表,不要用“坏邮箱”。

Bad and dummy email providers
Do not use for monitoring email servers for monitoring listed below

mail.ru
1und1.de
gmx.de/fr...
outlook.com
hotmail.com
live.com
schlund.de
icloud.com
naver.com
mail.com

Good emails

gmail.com
yandex.ru
qq.com
yahoo.com

矿池配置:

# Main pool
POOL_HOST = "eth-hk.dwarfpool.com"
POOL_PORT = 8008

# Failover pool
POOL_FAILOVER_ENABLE = True

POOL_HOST_FAILOVER1 = "eth-sg.dwarfpool.com"
POOL_PORT_FAILOVER1 = 8008

POOL_HOST_FAILOVER2 = "eth-us.dwarfpool.com"
POOL_PORT_FAILOVER2 = 8008

POOL_HOST_FAILOVER3 = "eth-cn.dwarfpool.com"
POOL_PORT_FAILOVER3 = 8008

使用的是DwarfPool矿池。我调整了下顺序。因为国内需要备案的原因,eth-cn.dwarfpool.com目前无法访问。
当然也可以使用别的矿池。建议最好不要用集中算力最大的矿池。

配置完成,保存退出。
运行eth-proxy.exe,会打开一个小黑窗,显示如下:

2017-06-14 00:32:00,380 WARNING proxy # Ethereum Stratum proxy version: 0.0.5
2017-06-14 00:32:00,380 WARNING proxy # Trying to connect to Stratum pool at eth-hk.dwarfpool.com:8008
2017-06-14 00:32:00,380 WARNING proxy # Trying to connect to failover Stratum pool-1 at eth-sg.dwarfpool.com:8008
2017-06-14 00:32:00,381 WARNING proxy # Trying to connect to failover Stratum pool-2 at eth-us.dwarfpool.com:8008
2017-06-14 00:32:00,381 WARNING proxy # Trying to connect to failover Stratum pool-3 at eth-cn.dwarfpool.com:8008
2017-06-14 00:32:00,690 INFO stats # 1 peers connected, state changed 1 times
2017-06-14 00:32:00,691 INFO proxy # Connected to Stratum pool at eth-hk.dwarfpool.com:8008
2017-06-14 00:32:00,734 WARNING proxy # -----------------------------------------------------------------------
2017-06-14 00:32:00,736 WARNING proxy # LISTENING FOR MINERS ON http://127.0.0.1:8080
2017-06-14 00:32:00,736 WARNING proxy # -----------------------------------------------------------------------
2017-06-14 00:32:00,736 WARNING proxy # Wallet: 0x2E87e775471D982BA014112AFF83Ac025f7C1078
2017-06-14 00:32:00,737 WARNING proxy # Worker ID enabled: True
2017-06-14 00:32:00,737 WARNING proxy # Email monitoring disabled
2017-06-14 00:32:00,737 WARNING proxy # Failover enabled: True
2017-06-14 00:32:00,737 WARNING proxy # -----------------------------------------------------------------------
2017-06-14 00:32:00,778 INFO proxy # NEW_JOB MAIN_POOL
2017-06-14 00:32:01,039 INFO stats # 2 peers connected, state changed 1 times
2017-06-14 00:32:01,039 INFO proxy # Connected to Stratum pool at eth-sg.dwarfpool.com:8008
2017-06-14 00:32:01,128 INFO stats # 3 peers connected, state changed 1 times
2017-06-14 00:32:01,130 INFO proxy # Connected to Stratum pool at eth-cn.dwarfpool.com:8008
2017-06-14 00:32:01,753 INFO stats # 4 peers connected, state changed 1 times
2017-06-14 00:32:01,753 INFO proxy # Connected to Stratum pool at eth-us.dwarfpool.com:8008

检查钱包地址是否正确,矿池是否连上了。
NEW_JOB MAIN_POOL表示你接到了新挖矿任务了。

配置ethminer

进入ethminer-0.9.41-genoil-1.1.7文件夹,新建start.bat文件,编辑文件内容:

ethminer.exe --farm-recheck 200 --cl-local-work 256 --cl-global-work 16384 -G -F http://127.0.0.1:8080/work1

–farm-recheck:软件强制更新任务周期,100 – 500,单位是MS;机器少,单台算力100M 以上的话可以设置为100 ;一般机器建议设置为200 ;数值越小拒绝率越低,但是过小会导致机器算力下降。
–cl-local-work :运算位宽,可以是64,128 ,256 ; 默认值为64,越高越好,当设置较高数值闪退时请降低该数值。
–cl-global-work:显卡运算线程数; 该值为一般为8192或者16384。
-G:指定显卡挖矿。
-F:矿池/代理地址。
work1:矿机号,每个矿机一个独立的字符串。仅支持小写字母和数字,不能包含“.”,矿池自动添加矿工不需要在矿池新建。
nVidia GTX1070显卡的话配置到这里就完成了。可以保存退出了。
以下配置我没试过,不保证正确:
如果显存2G或以下,不能挖矿的话,文件内容这么写:

setxGPU_FORCE_64BIT_PTR 0
setxGPU_MAX_HEAP_SIZE 100
setxGPU_USE_SYNC_OBJECTS 1
setxGPU_MAX_ALLOC_PERCENT 100
ethminer.exe --farm-recheck 200 --cl-local-work 64 --cl-global-work 16384 -G -F http://127.0.0.1:8080/work1

如果还不行,就这么写:

setxGPU_USE_SYNC_OBJECTS 1
ethminer.exe --farm-recheck 200 --cl-local-work 64 --cl-global-work 16384 -G -F http://127.0.0.1:8080/work1

AMD显卡的话,这么写:

ethminer.exe --opencl-platform 1 --opencl-device 0 --cl-local-work 256 --cl-global-work 16384 -G -F http://127.0.0.1:8080/work1

运行这个start.bat,就开始挖矿了。
注意一下eth-proxy.exe的输出,过段时间有没有出现这段文字:

eth_submitWork from 'work1' accepted

有就表示work1矿机正常。

一键运行

到上一步,整个挖矿的配置就完成了。不过启动挖矿要进入两个文件夹,点击两次启动程序有些麻烦。我们可以建一个一键运行的.bat文件。
进入ETH文件夹,新建run.bat文件,编辑文件内容:

cd eth-proxy\
start eth-proxy.exe
cd ..\ethminer-0.9.41-genoil-1.1.7\
start ethminer.exe --farm-recheck 200 --cl-local-work 256 --cl-global-work 16384 -G -F http://127.0.0.1:8080/work1

根据自己的实际情况写。保存退出。运行这个run.bat就行了。

挖矿没收到币的可能原因

单机挖矿一天,ETH钱包里却没有收到币?

首先检查你的eth-proxy.conf,里面是否填了自己的钱包地址。别给别人打工了。

如果钱包地址准确无误,看看钱包是否同步了所有区块链。

钱包也没问题,那就是矿池还没分配收入了。

以DwarfPool矿池为例,默认是每挖满1.01ETH、每隔4小时分配一次收入。而单机单显卡挖矿是很慢的,挖满1.01ETH需要很多、很多、很多天。要么等,要么上矿池网站,修改自动发送的最低数量。DwarfPool最低需要挖满0.05ETH。有的矿池最低额度是0.01ETH。

此条目发表在数字货币分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注