Difference between revisions of "Mining rig build guide (September 2018)"

From Mochimo Wiki
Jump to: navigation, search
(Compile the Program)
Line 97: Line 97:
 
===Setting up the Wallet===
 
===Setting up the Wallet===
 
:*Navigate to cd ./mochi/bin
 
:*Navigate to cd ./mochi/bin
====Create Wallet====
+
====Create a new wallet====
:#To create the wallet start by typing: <code>./wallet -p2095 -n</code>
+
Start from the <code>mochimo/bin/</code> directory and invoke the wallet with the following command:</br>
:#Use the name "mining".
+
<pre>./wallet -p2095 -n</pre>
:#Select your own password.
+
(Note: port 2095 is required to be open on your network for mining to function, but not required for the wallet to run. You still need though, to enter the command exactly as above.)
:#You don't have to remember the random seed.
+
 
:#Set file name to "mining.wal".
+
# You will be prompted to choose a name for your wallet. We’ll call it My Wallet in our example.
====Open Wallet====
+
# You will be prompted for a password.  Your wallet will be encrypted 100% of the time. This password will be used to decrypt the wallet - '''''don't lose it.'''''
:*To open the wallet type: <code>./wallet -p2095 mining.wal</code>
+
# You will be asked to enter some random text to help randomize your wallet seed.  You do not need to memorize this information.
====Create Mining Address====
+
## If this is a NEW installation of Linux, say on a cloud server, you may get stuck here. This means that your box doesn't have enough ''entropy'' to create the randomness needed for this step. Here is the proposed solution to that problem:
To create a mining address, after opening the wallet:
+
### You will have to open a new terminal window and do the following
:#Option 4
+
### <code>sudo apt-get install rng-tools</code>
:#Name it Mining Address
+
### <code>sudo rngd -r /dev/urandom</code>
:#DO NOT ADD A TAG
+
### This should solve your problem, if not check in the ''Discord'' group to see if there might be a newer solution.
:#Select option 6 to check the balance
+
# You will be asked to pick a filename.  We recommend <code>mochimo.wal</code>.
 +
# The wallet file is saved to the disk and the wallet software exits.
 +
# Confirm <code>mochimo.wal</code> was successfully created with a <code>ls</code> command to list the directory’s contents.
 +
 
 +
[[File:04-createWallet.gif|600px]]
 +
 
 +
====Download a list of network nodes and start the wallet====
 +
 
 +
Let's download a <code>startnodes.lst</code> file, so the wallet has multiple nodes to grab network information from. It will also help to avoid getting a <code>***Balance check failed***</code> error. The easiest way to do that in Linux is:
 +
<pre>
 +
wget https://www.mochimap.net/startnodes.lst</pre>
 +
 
 +
If you named your wallet ''mochimo.wal'', then open the wallet with the following command:
 +
<pre>
 +
./wallet -p2095 mochimo.wal</pre>
 +
 
 +
You will be prompted to enter your password.  If you enter this incorrectly, the system '''''will not tell you''''', but the name at the top of the wallet when you open it be some garbled gibberish.  The reason for this is the password is a decryption key and is not stored in the wallet itself.  If you enter it wrong, the wallet will still decrypt using the wrong key, and the result will be garbage.  You know you entered it correctly if the
 +
wallet name you chose displays at the top of the screen. In our case, we’ll see '''My Wallet''' at the top.
 +
 
 +
[[File:05-startnodes-StartWallet.gif|600px]]
 +
 
 +
====Generate a mining address====
 +
 
 +
With the wallet open:  
 +
 
 +
# First, create a new address with option <code>4</code>.
 +
# You must give it a name here, let's use '''mining address'''.
 +
# You will be asked if you want to "tag" this address, say <code>N</code>.<br>
 +
'''''WARNING: YOU MUST *NOT* ADD A TAG TO A MINING ADDRESS.'''''
 +
# This address will be assigned an index sequentially higher than your last address. If you don't have any addresses yet, this would be index <code>1</code>.
 +
 
 +
[[File:M01-minerAddress.gif|600px]]
 +
 
 +
# Let’s check to make sure the address was successfully created. Select option <code>2</code>, to display your address entries. If you don’t have any coins yet, “My addresses:” will read “No entries.”
 +
# Select option <code>6</code> to check the balance on this new address. If you don't have any coins yet, the wallet will read '''No entries.'''
 +
# To check that the address was created, select option <code>9</code> to go to Menu 2. Then select option <code>2</code> to <code>display change addresses</code> and you should now see '''mining address'''.
 +
 
 +
====Exporting your mining address====
 +
Now let's save this address to a '''maddr.dat''' file the miner uses, so that we can start mining and have our block rewards go to this address.
 +
# Select option <code>7</code>, to export.  You will be prompted to select the index number of the address you want to export.  In this case it will be index <code>1</code>, since it's the only address you have.  Type <code>1</code> and hit enter.
 +
# You will be prompted to select a file name.  '''The file has to be named: <code>maddr.dat</code>'''
 +
# You will be asked where to save the Balance.  Please select <code>N</code>.
 +
# If you are replacing a mining address, you will be told that maddr.dat file already exists. If you are asked, enter <code>Y</code> to overwrite the old mining address with your new mining address.
 +
# Now type <code>0</code> to exit, and go invoke your miner. 
 +
 
 +
You are ready to mine!
 +
 
 +
[[File:M02_createmaddrdat.gif|600px]]
 
===Starting the Miner===
 
===Starting the Miner===
 
:#Navigate to <code>cd ./mochi/bin</code>
 
:#Navigate to <code>cd ./mochi/bin</code>
 
:#Initiate the miner by typing: <code>./gomochi d</code>
 
:#Initiate the miner by typing: <code>./gomochi d</code>

Revision as of 02:01, 22 March 2019

Use Discord: If you encounter any issues with any step the Mochimo Discord Community will be the best place for help.

Getting Started

Can I mine Mochimo with cheap parts from Amazon? Yes You Can!

The recommended setup for MCM is very entry level. You can actually purchase very low end parts, old parts, or even used parts to get started and expand from there. For this build I tried to purchase everything from Amazon and with a budget of $350. Everything is brand new but you can often find many deals on used parts or just find similar or better parts that are on sale. At the time of typing this a 1050ti would mine about a block a week with each block containing six MCM. The current discord MCM rate is $5 so that would come out to be $30 a week! While you should expect a 80% drop off over the course of a year that sill puts the ROI well within that time frame.

Parts Needed

Bare Bone: The following parts are everything you will need minus peripherals. However, this is for only one GPU. If you plan on adding more than two extra cards check with the Discord Community for more build tips.

  1. Motherboard - Gigabyte H110 $49.19
  2. Intel Pentium G4400
  3. RAM -Patriot 4GB (1 x 4GB) - $29.99
  4. GPU - MSI 1050ti - $139.99
  5. Power Supply - EVGA 400W - $30.56
  6. Hard Drive - TC Sundbow 60GB SSD - $16.99
  7. GPU Riser - $4.99
  8. Happybuy Frame Rig Case - $25.99

Total Cost: $347.69 Summary: All of these parts are subject to price increases and decreases. If you need help just ask in discord and someone there can use this link to upgrade or downgrade based on your individual needs. Additionally: If you wanted to upgrade your system and add another card you just need one additional riser per GPU you add. However, if you wanted to add more than two additional cards you may want to look at getting a stronger power supply as well.

Building the Miner

Starting the Build

Once all of your parts have arrived you will need a few tools and some setup space to get started properly. Scissors, phillips head screwdriver, a USB are all that will be needed for this setup. For a working area just make sure you are not on carpet. The chances are low but absolutely possible to build up enough of a static charge and ruin a part to the build.

Prepping the Motherboard

Take the motherboard out of its box and use the box as a workbench. It will be easiest to place the parts.

Installing the CPU

  • Lift the latch on the motherboard and remove the plastic cover.
  • Use the provided reading material supplied by both the CPU and Motherboard manufacturers to be certain that the chip is aligned properly.
  • Note: This is the easiest part of the build to mess up. Don’t be scared but follow the provided reading materials.
  • Once locked in apply around two grains of rice or a pea sized amount of thermal paste to the very center of the chip. The entire plate does not have to be covered so excess can become an issue.
  • Install the CPU cooler by aligning the pegs up with the holes on the MB and then slowly lowering it onto the CPU. Lightly press in the pegs to lock into place.

Installing the RAM

  • The RAM has a slot in the middle of it that will only allow it to be inserted one way. Line it up and slide it in evenly for the easiest insert.

Placing the Motherboard

  • Now that we're done installing a few parts we can move the motherboard off the box and to its intended place.
  • Make sure the standoffs are tightened and set the motherboard in place. Do not crank these down very tight as there just needs to be snug contact.

Plugging in the Power Supply

  • Ensure that the power supply is on the off setting. The O.
  • Place the Power Supply in its appropriate spot and tighten down with the provided screws.
  • The motherboard and CPU cables are the only ones needed up to this point and should each be labeled.

Testing the Setup

  • You can now hook up your keyboard, mouse, and monitor to the motherboard and plug the power supply into the wall. If all went well the bios should load up within a few seconds of powering on the miner.

Bios Changes

  • Set to onboard graphics. (Only Bios Change needed )

Install the SSD

  • Take the SATA cable provided and run it from the motherboard to the SSD.
  • Run the power cable to the SSD.

Setting up the Software

Bootable USB Linux ISO

  • Download Ubuntu 16.04 ISO
  • Download Rufus
  • This tool allows you to mount the iso to a USB and make it bootable.
  • Use Rufus to mount the iso to the USB

Linux Install

  • Start the PC again and press the requested keys to get to the BIOS.
  • Verify that the SSD is recognized.
  • Change the boot order to allow the USB to be first and
  • Reboot and follow the instructions to setup Ubuntu.
  • Once installed login to continue setting up.

Nvidia Drivers

  • Download the latest Nvidia Drivers using the following: sudo apt-get install nvidia-390.77

Cuda 9.2

Download Cuda 9.2

Post Install Instructions

Installing the GPU

  • Turn off the PC and place the GPU on the two rods that hold it up and screw it in place
  • Attach the riser to the bottom of the GPU and to the motherboard. MAKE SURE IT IS PLACE IN THE CORRECT DIRECTION.
  • Any of the PSU cables not being used can be zip tied neatly together. Make sure no cables are hanging out to where they could get snagged.
  • Turn on the PC and open a terminal to use nvidia-smi to verify your driver is installed and that the card is recognized

Setting a Static IP

  • Top right corner of Ubuntu there is an updown arrow.
  • Click on edit connections and select your connection and hit edit.
  • Go to the IPv4 settings tab and give yourself a static IP

Configure Port Forwarding

  • Log in to your router and navigate to the port forwarding page
  • If you need help finding this go to www.portforward.com and find your router to get detailed instructions.
  • Set your static IP to allow port TCP/2095 to allow traffic.
  • You can check this at www.portchecker.io

Mochimo Miner

Download and Install

  • Download the latest version from https://github.com/mochimodev/mochimo
  • Extract all the files in a folder in the home directory and name it Mochi.
  • More detailed instructions can be found in the readme that is downloaded with the mining software.

Compile the Program

  1. cd ./mochi/src/
  2. ./makeunx bin -DCUDA
  3. ./makeunx install

Setting up the Wallet

  • Navigate to cd ./mochi/bin

Create a new wallet

Start from the mochimo/bin/ directory and invoke the wallet with the following command:

./wallet -p2095 -n

(Note: port 2095 is required to be open on your network for mining to function, but not required for the wallet to run. You still need though, to enter the command exactly as above.)

  1. You will be prompted to choose a name for your wallet. We’ll call it My Wallet in our example.
  2. You will be prompted for a password. Your wallet will be encrypted 100% of the time. This password will be used to decrypt the wallet - don't lose it.
  3. You will be asked to enter some random text to help randomize your wallet seed. You do not need to memorize this information.
    1. If this is a NEW installation of Linux, say on a cloud server, you may get stuck here. This means that your box doesn't have enough entropy to create the randomness needed for this step. Here is the proposed solution to that problem:
      1. You will have to open a new terminal window and do the following
      2. sudo apt-get install rng-tools
      3. sudo rngd -r /dev/urandom
      4. This should solve your problem, if not check in the Discord group to see if there might be a newer solution.
  4. You will be asked to pick a filename. We recommend mochimo.wal.
  5. The wallet file is saved to the disk and the wallet software exits.
  6. Confirm mochimo.wal was successfully created with a ls command to list the directory’s contents.

04-createWallet.gif

Download a list of network nodes and start the wallet

Let's download a startnodes.lst file, so the wallet has multiple nodes to grab network information from. It will also help to avoid getting a ***Balance check failed*** error. The easiest way to do that in Linux is:

wget https://www.mochimap.net/startnodes.lst

If you named your wallet mochimo.wal, then open the wallet with the following command:

./wallet -p2095 mochimo.wal

You will be prompted to enter your password. If you enter this incorrectly, the system will not tell you, but the name at the top of the wallet when you open it be some garbled gibberish. The reason for this is the password is a decryption key and is not stored in the wallet itself. If you enter it wrong, the wallet will still decrypt using the wrong key, and the result will be garbage. You know you entered it correctly if the wallet name you chose displays at the top of the screen. In our case, we’ll see My Wallet at the top.

05-startnodes-StartWallet.gif

Generate a mining address

With the wallet open:

  1. First, create a new address with option 4.
  2. You must give it a name here, let's use mining address.
  3. You will be asked if you want to "tag" this address, say N.

WARNING: YOU MUST *NOT* ADD A TAG TO A MINING ADDRESS.

  1. This address will be assigned an index sequentially higher than your last address. If you don't have any addresses yet, this would be index 1.

M01-minerAddress.gif

  1. Let’s check to make sure the address was successfully created. Select option 2, to display your address entries. If you don’t have any coins yet, “My addresses:” will read “No entries.”
  2. Select option 6 to check the balance on this new address. If you don't have any coins yet, the wallet will read No entries.
  3. To check that the address was created, select option 9 to go to Menu 2. Then select option 2 to display change addresses and you should now see mining address.

Exporting your mining address

Now let's save this address to a maddr.dat file the miner uses, so that we can start mining and have our block rewards go to this address.

  1. Select option 7, to export. You will be prompted to select the index number of the address you want to export. In this case it will be index 1, since it's the only address you have. Type 1 and hit enter.
  2. You will be prompted to select a file name. The file has to be named: maddr.dat
  3. You will be asked where to save the Balance. Please select N.
  4. If you are replacing a mining address, you will be told that maddr.dat file already exists. If you are asked, enter Y to overwrite the old mining address with your new mining address.
  5. Now type 0 to exit, and go invoke your miner.

You are ready to mine!

M02 createmaddrdat.gif

Starting the Miner

  1. Navigate to cd ./mochi/bin
  2. Initiate the miner by typing: ./gomochi d