Reference implementation of Subspace Farmer for Subspace Network Blockchain.
We recommend following the general farming instructions that explain how to run both the farmer and node together.
A Rust toolchain is required to compile this repository, but there are some extra dependencies for the farmer.
protoc
is required for libp2p
.
automake
,libtool
and pkg-config
on Linux/macOS or CMake on Windows for hwlocality-sys
(if numa
features is
enabled, it is by default), also LLVM/Clang is necessary.
sudo apt-get install automake libtool pkg-config llvm clang protobuf-compiler
- Install via Homebrew:
brew install automake libtool llvm protobuf
- Add
llvm
to your~/.zshrc
or~/.bashrc
:
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
- Activate the changes:
source ~/.zshrc
- Verify that
llvm
is installed:
llvm-config --version
Then build the farmer using Cargo:
cargo build --profile production --bin subspace-farmer
target/production/subspace-farmer --version
Commands here assume you installed native binary, but you can also easily adapt them to using with Docker.
Use --help
to find out all available commands and their options:
target/production/subspace-farmer --help
target/production/subspace-farmer farm \
--reward-address st... \
path=/path/to/farm,size=100G
st...
should be replaced with the reward address taken from Polkadot.js wallet (or similar), /path/to/farm
with location where you want to store plot and 100G
replaced with desired plot size.
This will connect to local node and will try to solve on every slot notification, while also plotting all existing and new history of the blockchain in parallel.
NOTE: You need to have a subspace-node
running before starting farmer, otherwise it will not be able to start
target/production/subspace-farmer benchmark audit /path/to/farm
target/production/subspace-farmer info /path/to/farm
target/production/subspace-farmer scrub /path/to/farm
target/production/subspace-farmer wipe /path/to/farm
This would wipe plots in the OS-specific users local data directory.