Grin v1.0 Step by Step Miner Guide on macOS
Author: ChainMaster
Attention⚠️
Only for Grin v1.0 mainnet
Operate on MacOS Mojave
Command line knowledge required
A. Install required softwares and packages
-
Open a terminal session
Install the newest RUST v1.31.1curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env
-
Confirm version of RUST
rustc —version
(If you already had old version RUST installed, issue “rustup update” for upgrade)
-
Install homebrew with below command
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Install git
brew install git
-
Install Xcode from macOS app store
Check the version of clang&llvm
clang --version
Make sure the InstalledDir of clang is “InstalledDir: /Applications/Xcode.app/…”, this InstalledDir have the newest clang.
In case you use a InstalledDir with “/Library/Developer/CommandLineTools/usr/bin”, issue the following command to switch.
sudo xcode-select --switch /Applications/Xcode.app
B. Install Grin Node step by step
-
Install required packages for Grin Node
brew install pkg-config openssl
-
Install Grin node.
git clone https://github.com/mimblewimble/grin.git cd grin cargo build --release
Add command grin to the system environment variables
export PATH=/<yourPATH>/grin/target/release:$PATH
(Please replace with your real path, issue command “pwd” to check)
Add file grin-server.toml to folder grin
grin server config
Revise file grin-server.toml to enable stratum server and save
enable_stratum_server = true
Now start a grin node under folder grin
grin
C. Initial your wallet and listen to the wallet
-
Open a new command line terminal session(Do not close the sessions before)
-
Add command grin to the system environment variables
export PATH=/<yourPath>/grin/target/release:$PATH
(Please replace with your real path, issue command “pwd” to check)
-
Under folder grin, generate a grin wallet and record the recovery phrase and password on paper.
grin wallet init
-
Listen to the wallet
grin wallet listen
D. Install Grin Miner step by step
-
Open a new command line terminal session(Do not close the sessions before)
-
Install required packages
brew install cmake
-
Install Grin miner
git clone https://github.com/mimblewimble/grin-miner.git cd grin-miner git submodule update --init cargo build
-
Add command grin-miner to the system environment variables
export PATH=/<yourPath>/grin-miner/target/debug:$PATH
(Please replace with your real path, issue command “pwd” to check)
-
Assign more processors for mining, 1 processor will get no new job.
nthreads = 4
-
[Optional] To enable avx support(new CPU) or cuda support(Navidia GPU) you have to modify both grin-miner.toml and Cargo.toml files before start grin-miner. Please check steps on GitHub.
-
Start grin miner under grin-miner folder
grin-miner
E. Check if you have Grin mined
-
Open a new command line terminal session(Do not close the sessions before)
-
Add command grin to the system environment variables
export PATH=/<yourPath>/grin/target/release:$PATH
(Please replace with your real path, issue command “pwd” to check)
-
Check your wallet balance
grin wallet info
- Then wait and see if you have grin coins mined