====== 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: [[user:zyzonix#public_blockchain_nodes|Zyzonix - Public Blockchain Nodes]]** ===== Install Chia-Blockchain from Repository ===== To install the [[https://chia.net/|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 [[https://github.com/Chia-Network/chia-blockchain/wiki/INSTALL|github.com - chia-network]]// ------- ===== Auto start Chia-Blockchain on system startup ===== 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 [[https://github.com/Chia-Network/chia-blockchain|Chia-Blockchain]], [[https://github.com/STATION-I/stai-blockchain|Stai-Blockchain]] and [[https://github.com/HDDcoin-Network/hddcoin-blockchain|HDDCoin Network]]. ------- ===== Plotting in RAM (Linux) ===== 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. ==== Using bladebit ==== **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 -c -n -d **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...'') | '''' | ==== Using tmpfs ==== First create a "static" ''tmpfs'' with [[https://wiki.debian.org/RamDisk|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 -t /ramdisk/ -d -r -x -------