Good day friends! So the long-awaited launch of the QuarkChain main network V1.0 codenamed Singularity. The document sets out the main points needed to start the cluster and start mining coins QKC. Read very carefully and with expression!
- Cluster installation and startup
- Getting a mining wallet
- Starting mining on processors
- Start mining on NVIDIA and AMD graphics cards
Installing and running a cluster in Docker
Let’s start installing and running the cluster, it will be necessary for successful mining on both processors and video cards….. write instructions for Docker (start mining Windows 10 Pro, it is also possible to run the cluster on Ubuntu\Linux)
- Recommended hardware specifications for running Docker:
4 cores cpu — from 2.00 Ghz
20-40 Gb HDD (recommended SSD)
Hardware should support virtualization.
- Download Docker (https://www.docker.com/products/docker-desktop) There — Win and Mac
- Installation Docekr Ubuntu\Linux (link to article)
- Install Docker.
- After installing and running Docker, you will have an icon in the bottom right corner of your main monitor.
- Go to the Docker settings and give it — 4 cores, 6-8-16gb DDR, 20-40 Gb HDD (SSD recommended) — memory and processor directly affect the synchronization speed.
- We’ll need a console to manage and monitor, portainer.io with its help we will be able to start and restart our container, sometimes it is necessary (for Ubuntu\Linux it is not required).
Installed with a command from the command line (see the following paragraph for how to run the command line):
docker volume create portainer_data
docker run -d -p 9050:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
- Later in portainer is accessed through the link: http://127.0.0.1:9000/#/home or http://127.0.0.1:9050/#/home
- Open the command line (WinKey+R-then write «cmd» and click run)
- Next will be the executive command line: C:\Users\User>
Now we create a container and pull up the image of the test network to run, write on the command line:
docker run --name clusterqkc -it -p 38291:38291 -p 38391:38391 -p 38491:38491 -p 38291:38291/udp quarkchaindocker/pyquarkchain:mainnet1.0.1
Then press Enter
- Your container is called
clusterqkc– you can change its name to whatever you like
- Сurrent version 1.0.1 (it may change with the coming updates, it is necessary to monitor yourself, I hope that yet) — looking version here: https://hub.docker.com/r/quarkchaindocker/pyquarkchain/tags
Once you have entered the command above, the container is installed and you should see the following:
To proceed to the next step, you need to have a wallet address for mining …
Getting a wallet for mining in the test network
Then go to the site, https://mainnet.quarkchain.io/wallet, where you will be asked to get a new wallet address and its private key (save the private key in a safe place).
You can also use the Metamask browser extension to get the address.(you need to run your Metamask, log in there and get your network address)
For mining, we take with you your Primary Wallet Address — this is the wallet address, without the last 8 characters. (see how highlighted in the screenshot above)
Next, we need to enter your wallet address in the miner, go back to the command line
and I write here the command
QKC_CONFIG=/code/pyquarkchain/mainnet/singularity/cluster_config_template.json python3 quarkchain/tools/miner_address.py 0x00000000000000000000000
where the value
0x000000000000000000000000000 you replace with your address which we took above.
and click Enter
As a result of your input you enter your address in the cluster configuration.
Then we come back here:
This can be done in a new window via the command
docker exec -ti clusterqkc bash, or existing.
We need to change one parameter in the cluster configuration, it is necessary for successful mining in one network, and connecting miners to the cluster.
We enter (you can use different editors):
and in the cluster configuration window that opens, change this value:
"JSON_RPC_HOST": "127.0.0.1" на
save the document, and restart the container with the command:
docker restart clusterqkc
We now have the important step of synchronization of the network (cluster).
To do this, run the command from the command line
python3 quarkchain/cluster/cluster.py --cluster_config /code/pyquarkchain/mainnet/singularity/cluster_config_template.json
Or just from a new command line:
docker exec -it clusterqkc python3 quarkchain/cluster/cluster.py --cluster_config /code/pyquarkchain/mainnet/singularity/cluster_config_template.json
You must have so:
After synchronization, you can run the miner. Synchronization of the cluster is not closed!
Check sync cluster main network QuarkChain
Check the synchronization with the command:
docker exec -it clusterqkc pypy3 quarkchain/tools/stats -i 5 --ip localhost
If you do not pass the synchronization, the launch of miners will be useless. I remind you: First start the cluster and its synchronization, then as in the terminal window with the cluster synchronization check you will have in the Syncing column written False and the current block in the ROOT column will coincide with the ROOT block on the site https://mainnet.quarkchain.io/stats (see Root Chain — string Height), only then you can run the CPU and GPU miner.
Commands to run CPU miners
Commands to run mining on 6 and 7 shards on QKCHASH
Mining on 6 shard
docker exec -it clusterqkc pypy3 quarkchain/tools/external_miner.py --config /code/pyquarkchain/mainnet/singularity/cluster_config_template.json --worker 2 --shard 393217 --host 188.8.131.52
Mining on 7 shard
docker exec -it clusterqkc pypy3 quarkchain/tools/external_miner.py --config /code/pyquarkchain/mainnet/singularity/cluster_config_template.json --worker 2 --shard 458753 --host 184.108.40.206
Table with shard codes to configure mining on the CPU:
|Chain||Shard||Hash Algo||Parameter for external_miner.py|
-- worker — specifies the number of dedicated processes for mining.
-- shard — indicates the shards selected for mining.
Running QuarkChain mining on graphics cards (GPU mining QKC)
Mining in network QuarkChain V1.0, codenamed Singularity on the cards possible on the shards 0 — 5 algorithm ETHASH by using the optimized miner Ethminer (download latest version from GitHub — link to the miner), also available miner Nanopool — which can be downloaded here: https://github.com/nanopool/nanominer.
Ethminer miner settings for NVIDIA cards
(an example of a launcher *.bat -file)
ethminer.exe -U http://220.127.116.11:38391 --shard-id 1 --farm-recheck 200
Ethminer miner settings for AMD cards
(an example of a launcher *.bat — file)
Setx GPU_FORCE_64BIT_PTR 0
Setx GPU_MAX_HEAP_SIZE 100
Setx GPU_USE_SYNC_OBJECTS 1
Setx GPU_MAX_ALLOC_PERCENT 100
Setx GPU_SINGLE_ALLOC_PERCENT 100
ethminer.exe -G http://18.104.22.168:38391 --shard-id 1 --farm-recheck 200 --cl-local-work 256 --cl-global-work 8192
The choice of shard for mining is made by replacing the
--shard-id 1 parameter according to the shard id list below:
|Chain||Shard||Hash Algo||Parameter for Ethminer shard ID|
I hope the manual will be useful, and everyone will take part in the test mining QuarkChain. We all will be happy.