Difference between revisions of "MadMax-Plotter - Linux guide"
(Created page with "*<big><big>'''First'''</big></big> A linux machine - this example uses '''Ubuntu Server 20.04 LTS''' Necessary access rights to install required packages, create users, set...") |
|||
(32 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
*<big><big>'''First'''</big></big> | *<big><big>'''First'''</big></big> | ||
A linux machine - this example uses '''Ubuntu Server 20.04 LTS''' | :A linux machine - this example uses '''Ubuntu Server 20.04 LTS''' | ||
Necessary access rights to install required packages, create users, set access rights ... | :Necessary access rights to install required packages, create users, set access rights ... | ||
About 20 minutes of time.. | :About 20 minutes of time.. | ||
:A working installation of the chia client, up and synced (see [https://www.chia.net/ https://www.chia.net/]). | |||
*<big><big>'''Install'''</big></big> | *<big><big>'''Install'''</big></big> | ||
If you haven't already, create a user for your plotting needs. | :If you haven't already, create a user for your plotting needs. | ||
I strongly recommend creating a fresh user for tools that have to do with your crypto projects. | :I strongly recommend creating a fresh user for tools that have to do with your crypto projects. | ||
We will create a user identified by ''''plotter''''. | :We will create a user identified by ''''plotter''''. | ||
''If your machine is reachable by an public IP, you might want to block this user from directly logging in.'' | :''If your machine is reachable by an public IP, you might want to block this user from directly logging in.'' | ||
Line 24: | Line 25: | ||
Install some required tools: | :Install some required tools: | ||
''<code>$ sudo apt-get install -y libsodium-dev cmake g++ git build-essential</code>'' | ''<code>$ sudo apt-get install -y libsodium-dev cmake g++ git build-essential</code>'' | ||
Switch to the user and cwd into the correct home directory: | :Switch to the user and cwd into the correct home directory: | ||
''<code>$ sudo su plotter $ cd $ git clone -b pool-puzzles https://github.com/madMAx43v3r/chia-plotter.git</code>'' | ''<code>$ sudo su plotter $ cd $ git clone -b pool-puzzles https://github.com/madMAx43v3r/chia-plotter.git</code>'' | ||
''<code>Cloning into 'chia-plotter | :The output should look like this: | ||
''<code>Cloning into 'chia-plotter'...''<br> | |||
''remote: Enumerating objects: 2092, done.''<br> | ''remote: Enumerating objects: 2092, done.''<br> | ||
''remote: Counting objects: 100% (946/946), done.''<br> | ''remote: Counting objects: 100% (946/946), done.''<br> | ||
Line 44: | Line 47: | ||
Enter the directory and execute some necessary commands to install requirements and compile the tool: | :Enter the directory and execute some necessary commands to install requirements and compile the tool: | ||
''<code>$ git submodule update --init''<br> | ''<code>$ git submodule update --init''<br> | ||
Line 58: | Line 61: | ||
''$ ./make_devel.sh</code>'' | ''$ ./make_devel.sh</code>'' | ||
This command will produce a lot of output while compiling. In the end, you should get a message indicating the compile was successful: | |||
:This command will produce a lot of output while compiling. In the end, you should get a message indicating the compile was successful: | |||
''<code>[...]''<br> | ''<code>[...]''<br> | ||
Line 65: | Line 69: | ||
Try to call the program and get the usage help information: | :Try to call the program and get the usage help information: | ||
''<code>$ ./build/chia_plot --help</code>'' | ''<code>$ ./build/chia_plot --help</code>'' | ||
If you can see the following line in the output, you have successfully built the chia-plotter version compatible with pool plots: | |||
:If you can see the following line in the output, you have successfully built the chia-plotter version compatible with pool plots: | |||
''<code>-c, --contract arg Pool Contract Address (64 chars)</code>'' | ''<code>-c, --contract arg Pool Contract Address (64 chars)</code>'' | ||
*<big><big>'''Getting your keys and jumping in the pool'''</big></big> | |||
: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: | |||
<code>''$ chia plotnft create -s local''</code> | |||
:It can take a little while until the transaction is confirmed. Once it is, execute: | |||
''<code>$ chia plotnft show</code>'' | |||
:Find the P2 singletom address (pool contract address) and save it for later - it should look something like this: | |||
''<code>P2 singleton address (pool contract address for plotting): xch1[...]err</code>'' | |||
:The other required key is the "Farmer public key". Execute the following statement to get it: | |||
''<code>$ chia keys show</code>'' | |||
:Note the Farmer public key and save it for later. | |||
:'''Ignore the "Pool public key"!''' | |||
:''"It is not the droid you're looking for."'' | |||
*<big><big>'''Time to PLOT!'''</big></big> | |||
: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: | |||
''<code>$ sudo mkdir /mnt/ramdisk $ sudo mount -t tmpfs -o rw,size=110G tmpfs /mnt/ramdisk</code>'' | |||
: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.'' | |||
:'''EXAMPLE:''' | |||
''<code>$ 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</code>'' | |||
: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 it's final destination. | |||
:''Some extra help about the command line switches:'' | |||
*''-n, --count arg - Number of plots to create (default = 1, -1 = infinite)'' | |||
*''-r, --threads arg - Number of CPU threads, please keep in mind, that Windows also requires some threads! (default = 4)'' | |||
*''-t, --tmpdir arg - Temporary directory (recommended to use a directory on the SSD) minimum required free space: ~220 GiB (default = current directory)'' | |||
*''-d, --finaldir arg - Final directory, where the plot will be copied (default = tmpdir)'' | |||
*''-p, --poolkey arg - Pool Public Key (48 bytes)'' | |||
*''-f, --farmerkey arg - Farmer Public Key (48 bytes)'' | |||
*''-c, --contract arg - Pool Contract Address (64 chars)'' | |||
*''-K, --rmulti2 arg - Thread multiplier for P2 (default = 1)'' | |||
Latest revision as of 18:16, 26 July 2021
- First
- 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/).
- Install
- If you haven't already, create a user for your plotting needs.
- I 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 an public IP, you might want to block this user from directly logging in.
$ sudo adduser plotter $ sudo usermod -L plotter
# Optional
- 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 execute some necessary commands to install requirements and compile the tool:
$ git submodule update --init
Submodule 'lib/BLAKE3' (https://github.com/BLAKE3-team/BLAKE3.git) registered for path 'lib/BLAKE3'
Submodule 'lib/bls-signatures' (https://github.com/madMAx43v3r/bls-signatures.git) registered for path 'lib/bls-signatures'
Submodule 'lib/libbech32' (https://github.com/dcdpr/libbech32.git) registered for path 'lib/libbech32'
Cloning into '/home/plotter/chia-plotter/lib/BLAKE3'...
Cloning into '/home/plotter/chia-plotter/lib/bls-signatures'...
Cloning into '/home/plotter/chia-plotter/lib/libbech32'...
Submodule path 'lib/BLAKE3': checked out '037de38bfec4e813ab6189a50cb7c4cbae47268a'
Submodule path 'lib/bls-signatures': checked out 'd9e42922e4a21fe8fc50733b93c16f582022621f'
Submodule path 'lib/libbech32': checked out '954b14fe81602dde0cf5cb6d45208403160fb76c'
$ ./make_devel.sh
- This command will produce a lot of output while compiling. In the end, you should get a message indicating the compile was successful:
[...]
[ 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 and jumping in the 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:
$ chia plotnft create -s local
- It can take a little while until the transaction is confirmed. Once it is, execute:
$ chia plotnft show
- Find the P2 singletom 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."
- 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.
- 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
- 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 it's final destination.
- Some extra help about the command line switches:
- -n, --count arg - Number of plots to create (default = 1, -1 = infinite)
- -r, --threads arg - Number of CPU threads, please keep in mind, that Windows also requires some threads! (default = 4)
- -t, --tmpdir arg - Temporary directory (recommended to use a directory on the SSD) minimum required free space: ~220 GiB (default = current directory)
- -d, --finaldir arg - Final directory, where the plot will be copied (default = tmpdir)
- -p, --poolkey arg - Pool Public Key (48 bytes)
- -f, --farmerkey arg - Farmer Public Key (48 bytes)
- -c, --contract arg - Pool Contract Address (64 chars)
- -K, --rmulti2 arg - Thread multiplier for P2 (default = 1)
source: [Pool.Garden]