Skip to content

Instantly share code, notes, and snippets.

@mudassir0909
Created May 13, 2021 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mudassir0909/41ac93c4e6e294d89a92ea70c80458d8 to your computer and use it in GitHub Desktop.
Save mudassir0909/41ac93c4e6e294d89a92ea70c80458d8 to your computer and use it in GitHub Desktop.
Chia plotting automation
# This is for OSX, for others refer https://github.com/Chia-Network/chia-blockchain/wiki/CLI-Commands-Reference
PATH=/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon:$PATH
local DEST_DIR="/Volumes/seagate_ma_0/chia_cli_plots/"
local RAM_USAGE=4000
local THREAD_COUNT=4
local STAGGER=7200 # 2 hours
# Usage:
# chia_plot 5 /Volumes/myssd/
chia_plot() {
echo "Creating $1 plots $2 -> $DEST_DIR (RAM $RAM_USAGE, thread count $THREAD_COUNT)"
chia plots create -k 32 -n $1 -b $RAM_USAGE -r $THREAD_COUNT -t $2 -d $DEST_DIR
}
# Same as above but instead waits for N seconds(specified by the STAGGER above)
# staggered_chia_plot 5 /Volumes/myssd/
staggered_chia_plot() {
echo "Sleeping for $STAGGER seconds 😴..."
sleep $STAGGER && echo "Woke up...☕️" && chia_plot "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment