Creating portable plots with MadMax plotter - ecochia/ecochia-wiki GitHub Wiki

What is it?

madMAx43v3r's chia plotter is widely known for its superior plotting speed when compared to the chia client built-in plotting engine. There is a newer version that supports portable plots - that's the plot type you need to create if you want to jump into our pool http://ecochia.io

This document will cover some basics and the installation of the chia-plotter, as well as an example on usage and additional information where available.

You can find additional information at the plotter repo: https://github.com/madMAx43v3r/chia-plotter/

Prerequisites

  • A Linux machine - this example uses Ubuntu Server 20.04 LTS
  • Necessary access rights to install required packages, create users, set access rights ...
  • About 20 minutes of time
  • A working installation of the chia client, up and synced (see https://www.chia.net/). Binding to the pool will not work if the wallet is not synced.
  • The chia client version must support pool plots (currently only in development build!)

Installation

Create a user for plotting (Optional)

If you haven't already, create a user for your plotting needs. We strongly recommend creating a fresh user for tools that have to do with your crypto projects. We will create a user identified by 'plotter'. If your machine is reachable by a public IP, you might want to block this user from directly logging in.

sudo adduser plotter $ sudo usermod -L plotter    

Install some required tools:

sudo apt-get install -y libsodium-dev cmake g++ git build-essential

Switch to the user and cwd into the correct home directory:

sudo su plotter
cd
git clone -b pool-puzzles https://github.com/madMAx43v3r/chia-plotter.git

The output should look like this:

Cloning into 'chia-plotter'...
remote: Enumerating objects: 2092, done.
remote: Counting objects: 100% (946/946), done.
remote: Compressing objects: 100% (408/408), done.
remote: Total 2092 (delta 697), reused 612 (delta 537), pack-reused 1146
Receiving objects: 100% (2092/2092), 786.22 KiB | 4.23 MiB/s, done.
Resolving deltas: 100% (1196/1196), done.

Enter the directory and install requirements and the tool

git submodule update --init

./make_devel.sh

This command will produce a lot of output while compiling. In the end, you should get a message indicating the compilation was successful:

[...]
[ 98%] Built target relic_s
[ 98%] Built target gmock_main
[ 98%] Built target UnitTests_bech32
[ 99%] Built target bls
[100%] Built target chia_plot

Try to call the program and get the usage help information:

./build/chia_plot --help

If you can see the following line in the output, you have successfully built the chia-plotter version compatible with pool plots:

-c, --contract arg   Pool Contract Address (64 chars)

Getting your keys sorted and jumping in the EcoChia pool

With the binary in place, it is time to check for the data required to create plots that fit your chia keys. To get those keys, execute the following commands (you can choose any region you want to connect - find all available here https://ecochia.io):

chia plotnft create -u https://europe.ecochia.io -s pool

It can take a little while until the transaction is confirmed. Once it is, executes:

chia plotnft show

Find the P2 singleton address (pool contract address) and save it for later - it should look something like this:

P2 singleton address (pool contract address for plotting): xch1[...]err

The other required key is the "Farmer public key". Execute the following statement to get it:

chia keys show

Note the Farmer public key and save it for later. Ignore the "Pool public key"! It is not the droid you're looking for.

If you want to set an Alias for the https://europe.ecochia.io pool, use the following command to get your Launcher ID:

chia plotnft show

Attention: You must put "0x" in front of your Launcher ID when using it in your next command, so it looks like "0x5178df...."!

chia plotnft get_login_link -l "Launcher ID"

Follow the weblink you receive and change the Alias there as you desire.

Time to plot!

Plotting will require two fast storage devices, used as temp1 and temp2. Typically these are NVMEs or SSDs. If your computer has at least 128GB of RAM and you do not plot in parallel, you can use a RAMdisk to wear down the disks a lot less. You can create a RAMdisk by using:

sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o rw,size=110G tmpfs /mnt/ramdisk

This is only temporary, so if you want the RAMdisk to be available after reboots, you have to modify your /etc/fstab file and add the lines:

Note: The RAMdisk is absolutely optional! But having two temp directories is not. While they can be on the same device, it is strongly recommended to use two different devices on a fast controller with high I/O available.

For the plotting command, the following flags and paths have to specified:

Flag Description
-n 1 How many plots to create (-1 = unlimited)
-r 16 Number of threads to use for plotting (depends on your system)
tmpdir First temporary directory
tmpdir2 Second temporary directory
finaldir Path to copy the final plot to
-c The pool contract address (P2 singleton)
-f The farmer public key

Example:

cd /home/plotter/chia-plotter/build
./chia_plot -n 1 -r 16  --tmpdir /mnt/temp1/ --tmpdir2 /mnt/temp2/ --finaldir /mnt/final/farm/ -c xch1[...]err -f b9012[...]649b 

Note: The keys in the above example have been shortened!

The plotting should be in progress now. Depending on your setup, this may take from 30 minutes to several hours or even longer (when plotting on HDDs). Be patient until the process is done and the plot has been moved to its final destination. Once it is done, your chia client will show the plot in the GUI, in your pool overview.