Zilminer: Beta release


#1

Introduction

Dear miners, hope y’all have been mining Zilliqa successfully! I am developing a Zilminer (an ethminer fork) that allows you to mine Zilliqa remotely on both Ubuntu and Windows OS. This Zilminer supports all ethminer’s current features and some new Zilliqa specific features. Zilminer provides you the convenience in mining Zilliqa as it automatically turns on your GPU rigs for GPU mining when it is time for the Zilliqa PoW Window, and pauses them when the CPU is running the pBFT consensus.

Zilminer v0.1.16: Beta release

This release of Zilminer allows Miners to do proxy mining via the Getwork protocol to 1 CPU node or a cluster of CPU nodes with the help of a mining proxy server.

  • For setting up many GPU rigs to 1 CPU node. Please see Option 1 below.
  • For setting up many GPU rigs to many CPU nodes. Please see Option 2 below.

Is it possible to create a GPU cluster?
#2

Option 1: Setting up many GPU rigs to 1 CPU node

The setup architecture is illustrated in the image shown below. All communications between these two parties is via JSON-RPC protocol.

  • The CPU instance will run the Zilliqa client and carry out the pBFT consensus process to receive rewards.
  • The GPU rigs in the GPU cluster will run Zilminer on a separate GPU cluster to do PoW mining and provide PoW solutions directly to the CPU node.

For hooking up several GPU rigs in the GPU cluster to a single CPU node, you will be required to do the following steps:

Step 1. Download the Zilminer software:

Step 2. Download and setup the Zilliqa client on your CPU node:

NOTE: Zilliqa client is currently only supported on Ubuntu 16.04 OS.

You can follow the steps laid out in the Mining guide wiki for either docker or native build to setup your Zilliqa client. However, you will have to edit the constants.xml file in your configuration file for the following parameters instead before launching:

  • Set GETWORK_SERVER_MINE to true.
  • Set GETWORK_SERVER_PORT to the port you will be using to GetWork. (default is 4202)
  • Set the other mining parameters to false.
    <CUDA_GPU_MINE>false</CUDA_GPU_MINE>
    <FULL_DATASET_MINE>false</FULL_DATASET_MINE>
    <OPENCL_GPU_MINE>false</OPENCL_GPU_MINE>
    <REMOTE_MINE>false</REMOTE_MINE>
    

After doing so, you will need to find out your current IP address with the following command and record it down:

curl https://ipinfo.io/ip

Step 3. Setting up the Zilminer clients

Key in the following command in your command prompt:

zilminer -P zil://wallet_address.worker_name@zil_node_ip:get_work_port

NOTE: Change the wallet_address, worker_name, zil_node_ip, and get_work_port accordingly.

  • For wallet_address : You can use the Moonlet Wallet to create a new account with a new Zilliqa address.
  • For worker_name : You can key in any arbitrary worker name you desire.
  • For zil_node_ip : Please key in the IP address of the Zilliqa node you written down.
  • For get_work_port : Please key in the port used in GETWORK_SERVER_PORT. Default is 4202.

#3

Option 2: Setting up many GPU rigs to many CPU nodes

The setup architecture is illustrated in the image shown below. All communications amongst these three parties are via JSON-RPC protocol.

  • The CPUs in the CPU cluster will be running the Zilliqa clients to process transactions and carry out the pBFT consensus to receive rewards.
  • The GPU rigs in the GPU cluster will run the Zilminer software to do the PoW process and provide PoW solutions to CPU cluster via the Mining proxy server.
  • The Mining proxy server will process the mining request from the CPU cluster and handle the Mining Register/Response from the GPU cluster.

For hooking up several GPU rigs to several CPU node, you will be required to do the following steps:

Step 1. Download the Zilminer software on all your GPU rigs

Step 2. Setup your Zilliqa Mining proxy server

NOTE: The Mining proxy server software is only supported on Ubuntu 16.04 OS.

You will need a separate CPU to create this mining proxy server. The recommended setup is to host this proxy server remotely with a GCP or AWS instance. (e.g t2.medium EC2 instance)

Please follow the guide located in this README.md in order to setup the Mining proxy server.

Mining proxy Github repo: https://github.com/DurianStallSingapore/Zilliqa-Mining-Proxy

You will need to obtain the URL of the api_server that you setup here for the next step.

Step 3. Download and setup the Zilliqa client on all your CPU nodes

NOTE: Zilliqa client is only supported on Ubuntu 16.04 OS.

You can follow the Mining guide wiki for either docker or native build to setup your Zilliqa clients on all your CPUs.

The recommended setup will be to create a CPUs cluster using the docker image and handling the CPUs cluster with Kubernetes. A CPU node can be either a GCP or AWS instance. The recommended cloud instance to use for 1 CPU node is a t2.large EC2 instance.

For all your CPU nodes, you will have to edit the constants.xml file in your configuration files for the following parameters before launching:

  • Set REMOTE_MINE to true.
  • Set MINING_PROXY_URL to the URL of your mining proxy server. (e.g. http://127.0.0.1:4202/api)
  • Set the other mining parameters to false.
    <CUDA_GPU_MINE>false</CUDA_GPU_MINE>
    <FULL_DATASET_MINE>false</FULL_DATASET_MINE>
    <OPENCL_GPU_MINE>false</OPENCL_GPU_MINE>
    <GETWORK_SERVER_MINE>false</GETWORK_SERVER_MINE>
    

Step 4. Setting up the Zilminer clients

Key in the following command in your command prompt:

zilminer -P zil://wallet_address.worker_name@proxy_ip:proxy_port/api

NOTE: Change the wallet_address, worker_name, proxy_ip, and proxy_port accordingly.

  • For wallet_address : You can use the Moonlet Wallet to create a new account with a new Zilliqa address.
  • For worker_name : You can key in any arbitrary worker name you desire.
  • For proxy_ip : Please key in the IP address of the proxy api_server.
  • For proxy_port : Please key in the port of the proxy api_server. Default is 4202.

#4

Other useful links

Source Code on Github


#5

Hi, thanks for the miner, but can you provide the windows version based CUDA9.0/9.1 ? thank you!


#6

Great job thanks :wink: @deepgully


#7

it should works with cuda9, could you help to test?


#8

Thanks for the hard work!

by GPU cluster, you mean 1 physical computer with multiple GPUs or can it be multiple physical computers with 1-2 GPUs each.


#9

They can be different physical computers, each housing 6-8 GPUs.


#10

zilminer 0.1.16+commit.6c0e0140.dirty
Build: windows/release/msvc

CUDA Error : Insufficient CUDA driver 9010

not work for cuda 9.0, please compile it with cuda9.0. thanks!


#11

i have setup and run zil node on one google cloud server ( 4 cpu and 15g ram).
and i have 10 GPU rigs, each rig have 6 GPUs. which option i should use?
thanks!


#12

If you only have 1 GCP node to act a Zilliqa node, then you don’t need a proxy server. Therefore, that will be Option 1 for you.


#13

thx for testing, I will build cuda 9 windows version.
I need to setup a new windows virtual machine but my Mac is out of disk, pls waiting for my disk cleaning. :joy:


#14

thanks, to clarify: can each computer have less than 6-8 GPUs

For instance, I have 30 computers, each running 1 powerful GPU. When clustered, i’ll have 30 GPUs.
Is that scenario not acceptable?


#15

Sure, that works too but it is not capital-efficient.


#16

Sorry, I am not making myself clear.
All I want to know is if I can achieve the required hashrate (equivalent to 6-8 GPUs on a single computer aka mining rig) by pooling multiple computers with 1 GPU each using this Zilminer.

If this miner is meant for people with multiple “rigs” with multiple GPUs, that’s a different story.

Thanks for your patience :slight_smile:


#17

what’s your cuda version? you have to upgrade to 9.2


#18

zilminer windows64 build for cuda 9.1 and 9.2, please help to testing
https://drive.google.com/drive/folders/1vSn7JWQS4-2LV78UJ8aNUPqsy3m-Da4d?usp=sharing


#19

With this miner you can mine only in WIndows? Or need Ubuntu a 100%?


#20

How do you do this in the ubuntu terminal?

However, you will have to edit the constants.xml file in your configuration file for the following parameters instead before launching:

*** Set GETWORK_SERVER_MINE to true .**
*** Set GETWORK_SERVER_PORT to the port you will be using to GetWork. (default is 4202 )**
*** Set the other mining parameters to false .**

```
<CUDA_GPU_MINE>false</CUDA_GPU_MINE>
<FULL_DATASET_MINE>false</FULL_DATASET_MINE>
<OPENCL_GPU_MINE>false</OPENCL_GPU_MINE>
<REMOTE_MINE>false</REMOTE_MINE>