Ubuntu installing Chia harvester (miner)

Article link

numberclassificationArticles and linksintroduceauthorSource classificationWriting dateCollection date
R1reference resourcesHPoolLargest Chia ore pool2021-06-04
R2reference resourcesChia official website2021-06-04
R3reference resourcesChia official browser2021-06-04
R4reference resourcesCHIA CLI Commands Reference2021-06-06
R5reference resourcesHow to setup a Chia Harvester on Ubuntu2021-05-042021-07-01
R6reference resourcesFarming on many machines2021-06-042021-07-02
T1skillP diagram of Ubuntu 20 Qiya Expresswaychia_plot multithreaded P-graphThis blog2021-06-122021-06-12

Installation of Chia coin harvester in cluster mode

The advantage of cluster mining is that each node does not need to run a complete Qiya node, which requires high network and CPU, increases the consumption of CPU and network resources, and of course, consumes more power.
This paper introduces the mining cluster method of Ubuntu as a mining node. The following is the network topology.
The local host can be windows or Linux. The host sends the Ca (Certificate Authorization) file to the mining node, and then generates the certificate of the mining node to cluster mining.

1. Install Kia main program chia

sudo apt-get update
sudo apt-get upgrade -y

# Install Git
sudo apt install git -y

# Checkout the source and install
git clone https://github.com/Chia-Network/chia-blockchain.git -b latest --recurse-submodules
cd chia-blockchain

sh install.sh

. ./activate

reference resources INSTALL On Ubuntu - Kia official website

2. Obtain the host CA file

Through the CA (certificate authentication) file, you can and authorize other machines to join the cluster with this machine as the host.
The CA file for Linux is located in

~/.chia/mainnet/config/ssl/ca

The CA file for Windows is located at

C:\User\yourusername\.chia\mainnet\config\ssl\ca

The following figure illustrates the location under windows.

3. Copy the ca folder found in the previous step to the Linux miner

Using scp or ftp

#scp mode
scp -r ca\ user@192.168.1.xx:~/

4. Generate cluster certificate

On the Ubuntu mining machine, use the CA file of the host to generate the cluster certificate. After the certificate is generated, the CA folder copied from the host can be deleted for security.

cd chia-blockchain 
#Activate Chia
. ./activate 
#Generate certificate for cluster
chia init -c ~/ca

5. Configure Linux miner and start cluster mining

Note: if the ca folder is not under ~ / ca, please modify it yourself. Pay attention to turn off UPNP, otherwise there will be problems if there are multiple wallets locally.

5.1 configure miner

#Stop all chia services running in the background
chia stop all -d
#Configure host IP
chia configure --set-farmer-peer 192.168.1.xx:8447
#Close UPNP
chia configure --enable-upnp false

After configuration, you can check the following files

~/.chia/mainnet/config/config.yaml

harvester:farmer_ Peer: does the host configuration point to the IP address of the host? If not, it needs to be modified manually.

harvester:
  chia_ssl_ca:
    crt: config/ssl/ca/chia_ca.crt
    key: config/ssl/ca/chia_ca.key
  farmer_peer:
    host: 192.168.1.xx (Main.Machine.IP)
    port: 8447

tips: how to add a plot file Subordinate commands can import the plot folder
chia plots add -d /yourplotfolder/

5.2 start mining services

# Start mining service
chia start harvester -r
# Stop mining services
chia stop harvester

6. Verify whether the mining is normal

Since the farmland file on the mining machine cannot be displayed on the interface of the host at present, it is necessary to modify the log level of the host (default WARNING) to DEBUG. Then restart the host node (wallet program) and check the host log ~ / chia/mainnet/log/DEBUG. Log, if the following information appears, it indicates that the mining machine is mining normally in linux.

[time stamp] farmer farmer_server   : DEBUG   -> new_signage_point_harvester to peer [harvester IP address] [peer id - 64 char hexadecimal]
[time stamp] farmer farmer_server   : DEBUG   <- farming_info from peer [peer id - 64 char hexadecimal] [harvester IP address]
[time stamp] farmer farmer_server   : DEBUG   <- new_proof_of_space from peer [peer id - 64 char hexadecimal] [harvester IP address]

You can search the mining machine IP to find the above information.

Added by frikus on Sun, 23 Jan 2022 14:37:39 +0200