Instead of running a terminal instance for the farmer, and running another terminal instance for the node, now you can run a SINGLE terminal instance to farm!
- Download the executable from releases
- In your terminal, change your directory to where you download the file for example: if you downloaded your file to your
Downloads
folder,cd Downloads
. - We will address your executable name as
pulsar
, change the below commands accordingly to your full executable name. - Run
./pulsar init
-> this will initialize your config file, which will store the necessary information for you to farm. - Run
./pulsar farm
-> this will start farming. Yes, it is that simple! Enjoy! 🎉
wipe
-> This is a dangerous one. If you want to delete everything and start over, this will permanently delete your plots and your node data (this will not erase any rewards you have gained, don't worry).info
-> This will show info for your farming.
In some instances, you may want to move the farming process to the background. Tools like screen
and tmux
can help manage this.
$ tmux -S farming
This will create a new tmux
session using a socket file named farming
.
Once the tmux session is created, you can go ahead and run the farming process.
$ ./pulsar farm
Once it's running, you can detach the process by pressing CTRL+b d
(read more about detaching a sessions)
That's it, you should be back to your terminal, with subspace farming running in the background as a session.
To re-attach to your session, use tmux:
$ tmux -S farming attach
If you ever want to delete/kill your farming session, enter the command:
tmux kill-session -t farming
screen -S farming
This will create a new screen
session.
./pulsar farm
Once it's running, you can detach the process by pressing CTRL+d a
.
To re-attach it to your current session:
screen -r farming
If you ever want to delete/kill your farming session, enter the command:
screen -S farming -X quit
You'll have to have Rust toolchain installed as well as LLVM, Clang and CMake in addition to usual developer tooling.
Below are some examples of how to install these dependencies on different operating systems.
sudo apt-get install llvm clang cmake
- Install via Homebrew:
brew install llvm@15 clang cmake
- Add
llvm
to your~/.zshrc
or~/.bashrc
:
export PATH="/opt/homebrew/opt/llvm@15/bin:$PATH"
- Activate the changes:
source ~/.zshrc
# or
source ~/.bashrc
- Verify that
llvm
is installed:
llvm-config --version
Ensure the pre-requisites.
And then run:
$ cargo build
Use
--release
flag for a release build and optimized binary -./target/release/pulsar
After ensuring the pre-requisites, just build using cargo:
$ cargo build --release
This would generate an optimized binary.
And then, you can install the binary (optimized) to your system:
$ cargo install --path .
The binary gets added to ~/.cargo/bin
, which is included in the PATH environment variable by default during installation of Rust tools. So you can run it immediately from the shell.
Using this, one doesn't need to download the executable (binary) from the releases page each time when there is a new release. They just need to pull the latest code (if already maintained) from the repository and build it locally.