Grin v1.0 Step by Step Miner Guide on macOS [English version]

               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

  1. Open a terminal session
    Install the newest RUST v1.31.1

    curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env
    
  2. Confirm version of RUST

    rustc —version    
    

    (If you already had old version RUST installed, issue “rustup update” for upgrade)

  3. Install homebrew with below command

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  4. Install git

    brew install git
    
  5. 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

  1. Install required packages for Grin Node

      brew install pkg-config openssl 
    
  2. 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

  1. Open a new command line terminal session(Do not close the sessions before)

  2. 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)

  3. Under folder grin, generate a grin wallet and record the recovery phrase and password on paper.

    grin wallet init
    
  4. Listen to the wallet

    grin wallet listen
    

D. Install Grin Miner step by step

  1. Open a new command line terminal session(Do not close the sessions before)

  2. Install required packages

    brew install cmake
    
  3. Install Grin miner

    git clone https://github.com/mimblewimble/grin-miner.git
    cd grin-miner
    git submodule update --init
    cargo build
    
  4. 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)

  5. Assign more processors for mining, 1 processor will get no new job.

    nthreads = 4 
    
  6. [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.

  7. Start grin miner under grin-miner folder

    grin-miner
    

E. Check if you have Grin mined

  1. Open a new command line terminal session(Do not close the sessions before)

  2. 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)

  3. Check your wallet balance

    grin wallet info
    

  1. Then wait and see if you have grin coins mined

I get an issue after running ./grin --floonet wallet listen stating that the Address is already in use?

Try the following command to check why the port is occupied.
netstat -anv | grep LISTEN | grep

Do not install llvm via brew, as it will conflict developer tools. See here:

1 Like

Thanks for the information, the guide was revised.

I get to the end of OSX install and reach this error, any suggestions would be appreciated?

warning : unused import: std::env::current_dir

–> src/bin/cmd/server.rs:17:5

|

17 | use std::env::current_dir;

| ^^^^^^^^^^^^^^^^^^^^^

|

= note : #[warn(unused_imports)] on by default

Building [=====================================================> ] 385/386