How I got started with mining Monero

in #monero6 years ago (edited)

For a long time, i have been thinking about starting mining some cryptocurrency but being a student, I can't invest in those costly gpus and ASIC machines. So this week, I looked at some articles on

  • which currency is easiest to mine ?
  • how much profits is there?
  • which will work even on CPU?
  • how long will that currency stay in the market ?

Based on these questions, I got to some conclusions like--

Bitcoin and ethereum is not an option since large groups of miners are using ASIC and high-end GPU which increases complexity to mining a block and make it impossible to do it on normal CPU. Refer this for ASIC's and GPU's hashrate to get an idea.

If you are going to mine on CPU, don't think about profits, I started this for learning how mining works, how mining pools distribute rewards, what is meant by increasing difficult in mining with time, etc..

Will the mining work on CPU?, well that depends on the algorithm used. For example cryptonight which is used for mining monero, AEON, Dashcoin produces comparable hashrate on CPU, GPU and other ASIC machineries.

While going through all these questions, I got to know about Monero, which can be easily mined on CPU, is still a little bit profitable. It is also going to stay in the market for a long time. One of the best thing about it is privacy that it offers (i.e. transactions are untrackable), which is one of the reasons a large number of cryptocrimes involve mining monero as government can't track the origins.

So after deciding on cryptocurrency, I started looking more into it. Refer this for monero. Even if you are mining Monero, the chances that a block will be assigned to you is pretty low as Monero uses POW( proof of work) which means your chances depends on computing power you have to offer. So, when getting started it is better to join a mining group, refer this. After a bit of research I decided on https://monero.hashvault.pro . It also has a great getting_started page and helpful community on discord.

Step 1: Getting a monero wallet
For generating wallet go to https://cn-wallet-generator.hashvault.pro/monero-wallet-generator.html, this link is provided on hashvault site. Then securely save the public address, view key, spend key and 25 word passcode(Note- this passcode is very important and can be used to retrieve other keys if you have lost them.) Also this generated wallet is quite safe as all calculations are done within the browser itself and none of the keys are transferred over network.

Step 2: Mining Software
Then I cloned github repo of xmrig(mining software), build it using following steps --

sudo apt-get install -y git build-essential cmake libuv1-dev htop libmicrohttpd-dev
git clone https://github.com/xmrig/xmrig.git
cd xmrig
mkdir build
cd build
cmake ..
make

Now we have to provide required configuration to the xmrig, so that it knows how to mine coin, which pool to connect to, and to which address the rewards be given.

For this I used following config.json, which i found on this reddit thread --

{
"algo": "cryptonight",
"av": 0,
"background": false,
"colors": true,
"donate-level": 1,
"log-file": null,
"max-cpu-usage": 100,
"print-time": 60,
"retries": 5,
"retry-pause": 5,
"safe": false,
"syslog": false,
"threads": <thread-count>,
"pools": [ 
    {
        "url" : "<pool-url>",
        "user" : "<your-wallet-address>",
        "pass" : "<miner-name:email>",
        "keepalive": true,
        "nicehash": false
    }]
}

All the <> fields should be modified accordingly and for pass you can give any random value,but above miner-name:email format helps in identification of the miners on the hashvault dashboard.

Now, go to xmrig/build folder and run xmrig file to start miner. The average hashrate for a typical Xeon processor is 30-40/per core, which is not much.
So, i thought of a plan to gather more computing resources. I used my github student pack, to get digitalocean promocode and hosted servers from that credit, apart from that i also used digitalocean account of two of my friends. And also deployed a server on azure.

In total I am able to get a 22 core distributed system mining for monero on digitalocean and azure, with a total hashrate of 800 H/s.hashvault.png

If you have any questions feel free to comment.

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.032
BTC 63754.85
ETH 3055.95
USDT 1.00
SBD 3.85