Difference between revisions of "Linux Full Node"

From Mochimo Wiki
Jump to: navigation, search
(Compile and Install the Mochimo Software)
(Compile and Install the Mochimo Software)
Line 78: Line 78:
 
#Compile the software: <code>./makeunx bin -DCUDA</code>
 
#Compile the software: <code>./makeunx bin -DCUDA</code>
 
#Install the software: <code>./makeunx install</code>
 
#Install the software: <code>./makeunx install</code>
[[File:MochimoCompilation.png|left|Mochimo Compilation]]
+
 
 
If you encounter errors during compilation, there may be a problem with your system setup and your Mochimo node may not operate correctly.<br/>
 
If you encounter errors during compilation, there may be a problem with your system setup and your Mochimo node may not operate correctly.<br/>
 
There is almost always someone on the Mochimo [https://discord.gg/7ma6Bk2 Discord] to help you identify the issue if you are having trouble.
 
There is almost always someone on the Mochimo [https://discord.gg/7ma6Bk2 Discord] to help you identify the issue if you are having trouble.

Revision as of 10:58, 27 February 2019

This guide was originally built by, and for, the Mochimo Discord Community. It has since been updated for compatibility with code version 2.2 and will cover the basics for installing and running the Mochimo GPU Miner/Node on Ubuntu 16.04 with Nvidia Graphics Cards.


Section I: GPU Mining Rig Setup

Use Rufus to create a bootable USB stick for installing a fresh Ubuntu 16.04 OS

This section will guide you through preparing your system installation and settings to allow you to mine on the Mochimo network with an Nvidia GPU.

ISO Setup

With the exception of the CLI wallet, the Full Node software is not compatible with any version of Windows.
These tools are used to create a bootable drive to install Ubuntu. Skip if you already are running an OS.

  1. Download: Rufus Install.
  2. Download: Ubuntu 16.04 ISO
  3. Use Rufus to make a USB bootable with this ISO.
  4. When Installing: Do a full wipe and fresh install.


Static IP

Depending on your router you may not need to set a Static IP address, however it is encouraged to do so to save yourself the pain of future issues.
Firstly, open a Terminal and type ip route

Use 'ip route' in a terminal to find the Gateway and IP address of the system.

Your output may differ, but generally your Gateway can be found next to "default via", and your IP address can be found next to "src".
Alternatively, you can type ifconfig in a terminal to find your IP address.
To set your IP address as static:

  1. Click the Network icon in the top right corner and select "Edit Connections".
  2. Choose your network connection and click the "Edit" button.
  3. Navigate to the "IPv4 Settings" tab.
  4. Change the "Method" to "Manual".
  5. Next to the "Addresses" table, click the "Add" button and enter your IP Address, Netmask (usually 255.255.255.0) and Gateway.
  6. Click save and close the Network Connections window.


Port Forwarding

For a Mochimo node to operate correctly, you must have port 2095 (TCP protocol) forwarded to your Rig's local IP.
If you need help, visit the following site, find your router, and follow its instructions:
portforwarding.com

Install build-essential Package

The build-essential package contains software that must be installed to compile a Mochimo node. On rare occasions, this may not already be installed.
To Install:

sudo apt-get install build-essential


Install CUDA 9.2 and Nvidia Drivers

During the installation of CUDA, a compatible Nvidia Driver will also be installed. If you wish to use a different Nvidia driver, you must install it AFTER the CUDA installation.
Download the Base Installer: Cuda 9.2 for Ubuntu 16.04
To Install:

    sudo dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64.deb
    sudo apt-key add /var/cuda-repo-9-2*/7fa2af80.pub
    sudo apt-get update
    sudo apt-get install cuda

Depending on your internet connection, this installation can take some time.
So, while you're waiting, take the time to:

  • Learn how to use the GUI Wallet Mojo
  • Come say hi on Discord
  • or Chillax with a realtime visualisation of the Mochimo Network on MochiMap.net



Section II: Mochimo Software Installation

Cloning Mochimo's public GitHub repository using the terminal is the most reliable way to obtain the software.

This section will guide you through downloading, compiling and installing the latest Mochimo software.

Download the Latest Mochimo Software

The Mochimo software is available on a public Github repository for everyone to see and contribute to: Mochimo Github
To Download:

git clone https://github.com/mochimodev/mochimo.git


Compile and Install the Mochimo Software

Before you can run the miner/node, you must compile the software into binary executable files.
There are 3 simple steps:

  1. Navigate to the src directory: cd mochimo/src
  2. Compile the software: ./makeunx bin -DCUDA
  3. Install the software: ./makeunx install

If you encounter errors during compilation, there may be a problem with your system setup and your Mochimo node may not operate correctly.
There is almost always someone on the Mochimo Discord to help you identify the issue if you are having trouble.

Section II: Run the Mochimo Node/Miner

The MochiMap website shows a realtime visualisation of the Mochimo network and can be useful for monitoring your nodes.

This section will guide you through running your newly compiled Mochimo software.

Create a Mining Address

Before you can run the miner, you must create a mining address to mine to.
The recommended option is to use the GUI Wallet Mojo.
However, you can use the CLI Wallet to create an address like so:

  1. Go to ./bin directory and invoke the wallet: ./wallet -n
  2. Give it a name like "mining".
  3. Choose a password (DON’T FORGET THIS)
  4. Enter Random Text (mash the keyboard, seriously, this should be as random as possible)
  5. Save the file to "mining.wal"
  6. Open the wallet: ./wallet mining.wal
  7. Select option 4 to create a new address. Name it ‘mining address’
  8. Type N for the "Add Tag?" question.
  9. Select Option 7 to export this address.
  10. Type 1 and hit enter to select your mining address for export.
  11. Save this file as maddr.dat (required)
  12. Type N for saving balance
  13. Select 0 to exit


Running the Miner

Go to the ./bin directory
Type: ./gomochi d
The miner is running now, but it may take up to a few minutes to sync.
Type: CTRL+C to bring up command prompt

? for options
q for exit
r for restart


How do I know my node is working?

There are a few obvious indications as to whether your node is working or not.

  • If your node is updating blocks and receiving transactions from the network, TX recvd, then your node is working.
  • If you are achieving 100% GPU Utilisation when you type nvidia-smi into a Terminal, then your node is mining.
Don't worry if it's not mining straight away, sometimes it can take until the next block to receive transactions to mine with.
  • If you can find your node on MochiMap.net, it's also a good sign that it's operating correctly.
Additionally, if you click your node on MochiMap, it will give you the apparent health status of your node.

Troubleshooting & FAQ

For frequently encountered issues and troubleshooting, see our Troubleshooting_FAQ.