编译运行独立Zcash CPU挖矿程序 - Standalone CPU Miner


  • administrators

    Zcash团队的Str4d最近已经更新了矿池挖矿需要的CPU Miner客户端程序。如下步骤可以编译测试这个程序,提前做好这方面的功课,可以为将来加入矿池挖矿有帮助。

    假设你的Linux已经安装了官方的Zcash如果没有就去按照官网步骤装好,那么接下来可以建立一个新的目录来运行独立程序。

    cd ~
    git clone https://github.com/str4d/zcash.git zcash_standalone_miner
    cd zcash_standalone_miner
    git checkout standalone-miner
    ./zcutil/build.sh -j$(nproc)

    编译完成后,确保本机的zcashd没在运行否则同样的配置.zcash文件夹下.lock错误,

    cd ~/zcash
    ./src/zcash-cli stop
    可以停止运行

    回到你的zcash_standalone_miner目录运行

    ./src/zcash-miner -stratum=stratum+tcp://37.139.4.95:1337 -user=my_user -password=my_pswd -printtoconsole -debug=pow -testnet

    看到如下9轮计算的字样就说明成功了:

    Zcash Miner version v1.0.0.0-9c342b2 (2016-09-28 00:41:55 +1300)
    ZcashMinerThread started
    Running Equihash solver with nNonce = 0000000000000000000000000000000000000000000000000000000000000001
    Generating first list
    Round 1:

    • Sorting list
    • Finding collisions
      Round 2:
    • Sorting list
    • Finding collisions
      Round 3:
    • Sorting list
    • Finding collisions
      Round 4:
    • Sorting list
    • Finding collisions
      Round 5:
    • Sorting list
    • Finding collisions
      Round 6:
    • Sorting list
    • Finding collisions
      Round 7:
    • Sorting list
    • Finding collisions
      Round 8:
    • Sorting list
    • Finding collisions
      Final round:
    • Sorting list
    • Finding collisions
      Found 2 partial solutions
      Culling solutions
    • Checking solution against target...Found solution satisfying the server target
    • Checking solution against target...Found solution satisfying the server target
    • Number of invalid solutions found: 0
      Running Equihash solver with nNonce = 0000000000000000000000000000000100000000000000000000000000000001

    Ctrl+C要按三次,退出程序,会有报错,没关系,大家等Str4d接下来的日子修好改好了 :)

    将来如果有矿池出来,修改37.139.4.95:1337 就可以连接矿池服务器进行挖矿了,矿友们可以早做准备哦 :)


Log in to reply