Beginners Guide - How to Mine Dogecoin

Let’s take a lucky guess that you’re here today because you’ve heard a lot about cryptocurrencies and you want to get involved, right? If you’re a community person, Dogecoin mining might be the perfect start for you!
Bitcoin was the first in 2009, and now there are hundreds of cryptocurrencies. These new coins (that operate on their own native blockchain) are called altcoins or alternative coins. One popular altcoin is Dogecoin. It can be bought, sold and traded, just like Bitcoin. It can also be mined!
So, what is Dogecoin mining?

By the time you’ve finished reading this guide, you’ll know what Dogecoin mining is and how to do it. You’ll know what hardware and what software you need to get started. You’ll also know whether or not Dogecoin mining is for you!
So, where would you like to start? The beginning? Great choice. Let’s have a quick look at how Dogecoin got started.
A (Very) Short History of Dogecoin
In 2013, an Australian named Jackson Palmer and an American named Billy Markus became friends. They became friends because they both liked cryptocurrencies. However, they also thought the whole thing was getting too serious so they decided to create their own.

I have recently rewritten the heart of the scrypt hashing function cpuminer in assembly language, to see if this could bring some more speed. Apparently it did. Smiley
The source code is now available at GitHub:
The build process for Linux should be the same as before.

In the new code I tried to take full advantage of SSE2 instructions, which are available since the Pentium 4. Unfortunately, AMD's implementation of these instructions is not as fast as Intel's... well, ok, sadly it's nearly two times slower. For this reason, I had to write separate versions of the hashing functions. You don't need to worry about this, though, since the new function should be able to auto-detect your cpu and automatically select the best algorithm.

Long polling patch
This release also includes a new --timeout option that I originally added to solve a problem with long polling. Apparently the LP thread doesn't behave nicely under certain network conditions, as reported by various users. So, if you experienced high stale rates with the previous miner, you should definitely try out this new version.
Many thanks to SockPuppet, aka shawnp0wers, who helped me nail down the issue!

Some Technical Details
The current release includes four different implementations of the scrypt core, each one designed for a different hardware.
A fallback plain x86 version, to be used when SSE2 instructions are not available (Pentium III, Athlon XP and earlier processors).
A 32-bit version using SSE2, for use on the Pentium 4, Pentium M, Core, Atom, plus all 64-bit cpus running in a 32-bit OS.
A 64-bit version for Intel processors, i.e. Core 2, i3, i5, i7. This version can in most cases double the speed of the previous miner.
A 64-bit version for AMD processors, i.e. Athlon 64, Phenom, Sempron and the like. The speed increase here can range from 5% to 80%.
The first two versions only get compiled in the 32-bit miner, the last two only in the 64-bit miner. The miner uses the CPUID instruction to choose which version to use.

Compiler Flags
One cool aspect of assembly code is that users no more need to play with compiler flags to get the best performance. Configuring the build with just CFLAGS="-O3" is now more than enough to get efficient code. This also means that we no more need separate specialized binaries for Intel and AMD cpus. Just a 32-bit and a 64-bit version.

Final Notes
Someone on IRC asked me why I am releasing this miner, instead of keeping it for myself or for my pool. Well, that's exactly the point. It is important for Litecoin that everybody has access to the most efficient mining software!
Someone might worry about the effect of this release on market prices, but consider this: if everybody starts using the new miner, the hash rate will go up, but so will difficulty, so nothing will ultimately change. I actually think this new miner will be very beneficial to Litecoin, because it should make mining easier for beginners (see compiler flags).
As crazy_rabbit wrote in another thread, one big plus of Litecoin is that everybody can participate. Well, consider this: now you can effectively mine on an Atom! Smiley

Comments

Popular Posts