Chia Network

The following page was built and tested on Linux!

There are public nodes for Chia, HDDCoin, STAI and BPX Network where you can try connecting to if experiencing connection issues: Zyzonix - Public Blockchain Nodes

To install the Chia-Blockchain software from a repository on Debian, add Chia's official repository:

1. Install required packages:

apt-get install ca-certificates curl gnupg

2. Get the repositories GPG key:

curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg

3. Paste repository URL to sources list:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/debian/ stable main" | sudo tee /etc/apt/sources.list.d/chia.list > /dev/null

Sourced from github.com - chia-network


It is possible to start Chia-Blockchain and forks of it automatically after system startup through a system service on Linux. This guide shows how to add a system service for Chia under /etc/systemd/system/:

1. Create the service file:

nano /etc/systemd/system/chia.service

2. Paste the content:

The content of the service file depends on the way you installed Chia-Blockchain and on what you would like to run automatically (Node, Timelord, …)

If installed chia via .deb package use this content:

[Unit]
Description=Chia Blockchain Node Autostart
Wants=network-online.target
After=network.target network-online.target
StartLimitIntervalSec=0
 
[Service]
Type=forking
Restart=always
RestartSec=1
User=root
ExecStart=/usr/bin/chia start farmer -r
ExecStop=/usr/bin/chia stop all -d
 
[Install]
WantedBy=multi-user.target

Otherwise if installed chia from source:

[Unit]
Description=Chia Blockchain Node Autostart
Wants=network-online.target
After=network.target network-online.target
StartLimitIntervalSec=0
 
[Service]
Type=forking
Restart=always
RestartSec=1
User=root
Environment=PATH=/usr/local/chia-blockchain/venv/bin:${PATH}
ExecStart=/usr/bin/env chia start farmer -r
ExecStop=/usr/bin/env chia stop -d all
 
[Install]
WantedBy=multi-user.target 

You can edit the line ExecStart if you wish to start something different than Node or Timelord, use chia start –help to view all possible start arguments.

For example to start Node and Timelord edit ExecStart and change it to (only works when installed from source):

ExecStart=/usr/bin/env stai start farmer timelord -r

This services were tested for Chia-Blockchain, Stai-Blockchain and HDDCoin Network.


At least 512GB RAM is required for RAM plotting.

This section show how to create plots in RAM, which is extremely fast and doesn't wear out NVMe's like disk plotting does. Also with older hardware (from 2014) it is possible to create plots in under 30 min.

Remind that this guides uses the official bladebit plotter from Chia that is only able to plot k32, if you wish to plot bigger plots have a look at one section below!

Nevertheless it is recommended to have a NVMe or SATA SSD installed where the plot can be saved after plotting. Otherwise the time of writing the plot to a hard disk would make this way of plotting very expensive because server hardware clearly consumes more energy than other hardware.

The best way of RAM plotting is plotting while moving a already plotted other plot to a hard disk. So when shutting down the plotting machine keep one plot on the SSD storage, this plot can be moved to the a HDD next time while plotting a new plot in RAM after the next startup.

To create plots in RAM use this command:

chia plotters bladebit ramplot -r <count-of-threads> -c <contract_NFT-only> -n <number-of-plots-to-be-plotted> -d </path/to/SSD>

Parameters:

Parameter Setting Example
-d Destination path to temporary SSD storage (NVMe/SATA) /mnt/SSD1
-r Threads to use (Depends on CPU) 250
-n Count of plots to plot 4
-c Contract ID (if plotting NFT plot) (starts with xch…) <contract>

First create a “static” tmpfs with ramdisk in /etc/fstab though adding the following line:

ramdisk  /ramdisk  tmpfs  defaults,size=495G,x-gvfs-show  0  0

Adjust the value of size on your needs! There should always be some space left for the OS!

After updating the fstab file run the following command to mount the tmpfs for the current session, from now on the OS will mount it automatically after each boot.

mount -a

Finally you can use the default Chia plotter to create the plots. Remind that it will be faster than on a NVMe but much slower than bladebit!

chia plots create -k33 -b200000 -c <contact-id> -t /ramdisk/ -d </path/to/final/directory> -r <count-of-threads> -x

  • blockchain/chia-network.txt
  • Last modified: 2023/08/01 21:26
  • by Zyzonix