Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
with:
submodules: recursive

- name: Install development headers
run: sudo apt install libsodium-dev
- name: Install dependencies
run: sudo apt install -y libsodium-dev cmake g++ git build-essential

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-g -fmax-errors=1" -DBUILD_BLS_PYTHON_BINDINGS=false
- name: Configure CMake project
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DBUILD_BLS_PYTHON_BINDINGS=false

- name: Build
- name: Build CMake project
run: cmake --build ${{github.workspace}}/build --config Debug

- name: Upload a Build Artifact
- name: Upload build artifact
uses: actions/[email protected]
with:
name: Debug build
Expand All @@ -38,16 +38,16 @@ jobs:
with:
submodules: recursive

- name: Install development headers
run: sudo apt install libsodium-dev
- name: Install dependencies
run: sudo apt install -y libsodium-dev cmake g++ git build-essential

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -D CMAKE_CXX_FLAGS="-O3 -fmax-errors=1" -DBUILD_BLS_PYTHON_BINDINGS=false
- name: Configure CMake project
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBUILD_BLS_PYTHON_BINDINGS=false -DBUILD_BLS_TESTS=false -DBUILD_BLS_BENCHMARKS=false

- name: Build
- name: Build CMake project
run: cmake --build ${{github.workspace}}/build --config Release

- name: Upload a Build Artifact
- name: Upload build artifact
uses: actions/[email protected]
with:
name: Release build
Expand Down
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,21 @@ On a dual Xeon® E5-2650v2<span>@</span>2.60GHz R720 with 256GB RAM and a 3x800G

To make sure the plots are valid you can use the `ProofOfSpace` tool from [chiapos](https://github.com/Chia-Network/chiapos):

```bash
```sh
git clone https://github.com/Chia-Network/chiapos.git
cd chiapos && mkdir build && cd build && cmake .. && make -j8
./ProofOfSpace check -f plot-k32-???.plot [num_iterations]
```

## How to update to latest version

```bash
```sh
cd chia-plotter
git checkout master
git pull
git submodule update --init
./make_devel.sh
./clean_all.sh
./make_release.sh
```

## Future Plans
Expand Down Expand Up @@ -174,25 +175,26 @@ https://github.com/stotiks/chia-plotter/releases
<summary>Arch Linux</summary>

First, install dependencies from pacman:
```bash
```sh
sudo pacman -S cmake libsodium gmp gcc11
```
Then, clone and compile the project:
```bash
```sh
# Checkout the source and install
git clone https://github.com/madMAx43v3r/chia-plotter.git
cd chia-plotter

git submodule update --init
./make_devel.sh
./clean_all.sh
./make_release.sh
./build/chia_plot --help
```
</details>

<details>
<summary>CentOS 7</summary>

```bash
```sh
git clone https://github.com/madMAx43v3r/chia-plotter.git
cd chia-plotter

Expand All @@ -207,15 +209,16 @@ https://github.com/stotiks/chia-plotter/releases
sudo yum install devtoolset-7 -y
# Start using software collections:
scl enable devtoolset-7 bash
./make_devel.sh
./clean_all.sh
./make_release.sh
./build/chia_plot --help
```
</details>

<details>
<summary>Clear Linux</summary>

```bash
```sh
sudo swupd update
sudo swupd bundle-add c-basic devpkg-libsodium git wget

Expand All @@ -233,23 +236,26 @@ https://github.com/stotiks/chia-plotter/releases
cd ~/
git clone https://github.com/madMAx43v3r/chia-plotter.git
cd ~/chia-plotter

git submodule update --init
./make_devel.sh
./clean_all.sh
./make_release.sh
./build/chia_plot --help
```
</details>

<details>
<summary>Ubuntu 20.04</summary>

```bash
```sh
sudo apt install -y libsodium-dev cmake g++ git build-essential
# Checkout the source and install
git clone https://github.com/madMAx43v3r/chia-plotter.git
cd chia-plotter

git submodule update --init
./make_devel.sh
./clean_all.sh
./make_release.sh
./build/chia_plot --help
```

Expand All @@ -261,7 +267,7 @@ https://github.com/stotiks/chia-plotter/releases

Make sure to add buster-backports to your sources.list otherwise the installation will fail because an older cmake version. See the [debian backport documentation](https://backports.debian.org/Instructions/) for reference.

```bash
```sh
# Install cmake 3.16 from buster-backports
sudo apt install -t buster-backports cmake
sudo apt install -y libsodium-dev g++ git
Expand All @@ -270,7 +276,8 @@ https://github.com/stotiks/chia-plotter/releases
cd chia-plotter

git submodule update --init
./make_devel.sh
./clean_all.sh
./make_release.sh
./build/chia_plot --help
```
The binaries will end up in `build/`, you can copy them elsewhere freely (on the same machine, or similar OS).
Expand All @@ -280,7 +287,7 @@ https://github.com/stotiks/chia-plotter/releases
<summary>macOS</summary>

First you need to install the [Brew](https://brew.sh/) package manager and [Xcode](https://apps.apple.com/app/xcode/id497799835) OR [Xcode Command Line Tools](https://developer.apple.com/download/).
```bash
```sh
# Download Xcode Command Line Tools (skip if you already have Xcode)
xcode-select --install

Expand All @@ -290,7 +297,8 @@ https://github.com/stotiks/chia-plotter/releases
git clone https://github.com/madMAx43v3r/chia-plotter.git
cd chia-plotter
git submodule update --init
./make_devel.sh
./clean_all.sh
./make_release.sh
./build/chia_plot --help
```

Expand All @@ -307,18 +315,18 @@ https://github.com/stotiks/chia-plotter/releases
```

Confirm which directory you have on YOUR Mac before applying following commands
```
```sh
# For x86_64 Macs
wget https://raw.githubusercontent.com/facebookincubator/fizz/master/build/fbcode_builder/CMake/FindSodium.cmake -O /usr/local/opt/cmake/share/cmake/Modules/FindSodium.cmake
```
or
```
```sh
# For ARM64 (M1) Macs
wget https://raw.githubusercontent.com/facebookincubator/fizz/master/build/fbcode_builder/CMake/FindSodium.cmake -O /opt/homebrew/Cellar/cmake/*/share/cmake/Modules/FindSodium.cmake
```

If a maximum open file limit error occurs (as default OS setting is 256, which is too low for default bucket size of `256`), run this before starting the plotter
```
```sh
ulimit -n 3000
```
This file limit change will only affect the current session.
Expand Down
3 changes: 2 additions & 1 deletion clean_all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

rm -rf build
set -euxo pipefail

rm -rf build
9 changes: 4 additions & 5 deletions make_debug.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

mkdir -p build
set -euxo pipefail

mkdir -p build
cd build

cmake -D CMAKE_CXX_FLAGS="-g -fmax-errors=1" -DARITH="easy" -DBUILD_BLS_PYTHON_BINDINGS=false ..

make -j8 $@

cmake -DCMAKE_BUILD_TYPE=Debug -DARITH="easy" -DBUILD_BLS_PYTHON_BINDINGS=false ..
cmake --build . --config Debug --parallel 8 -- $@
9 changes: 4 additions & 5 deletions make_devel.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

mkdir -p build
set -euxo pipefail

mkdir -p build
cd build

cmake -D CMAKE_CXX_FLAGS="-g -O3 -fmax-errors=1" -DARITH="easy" -DBUILD_BLS_PYTHON_BINDINGS=false -DBUILD_BLS_TESTS=false -DBUILD_BLS_BENCHMARKS=false ..

make -j8 $@

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DARITH="easy" -DBUILD_BLS_PYTHON_BINDINGS=false ..
cmake --build . --config RelWithDebInfo --parallel 8 -- $@
9 changes: 4 additions & 5 deletions make_release.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

mkdir -p build
set -euxo pipefail

mkdir -p build
cd build

cmake -D CMAKE_CXX_FLAGS="-O3 -fmax-errors=1" -DARITH="easy" -DBUILD_BLS_PYTHON_BINDINGS=false ..

make -j8 $@

cmake -DCMAKE_BUILD_TYPE=Release -DARITH="easy" -DBUILD_BLS_PYTHON_BINDINGS=false -DBUILD_BLS_TESTS=false -DBUILD_BLS_BENCHMARKS=false ..
cmake --build . --config Release --parallel 8 -- $@