Day: July 4, 2015

How to Mine Litecoin and other Altcoins

Posted on

While it is now considered too late for hobbyists without expensive ASIC processors to start mining bitcoins, many of the alternative digital currencies are still well suited for mining on your home PC.

In this guide, we’ll take you through all you need to know to start digging up a few litecoins, feathercoins or dogecoins without any costly extra equipment.

For the most part, cryptocurrencies employ either SHA-256 or scrypt as their proof-of-work hashing algorithm, but many of the newer currencies have opted for scrypt.

Gridseed Litecoin Miners
Row of Gridseed litecoin miners set up. Copyright: Arina P Habich

Scrypt tends to be the more memory intensive of the two – however, home PCs with reasonably powerful graphics cards can still mine those cryptocurrencies quite effectively, as there are no dedicated ASICs to compete with – yet.

Perhaps surprisingly, it’s still possible to use just your computer’s CPU to mine some of the digital currencies. This holds true, even if you have only a laptop with integrated graphics; though this may not prove terribly effective and is not a set-up we would recommend.

Wallets at the ready

Before you start mining, you will need a wallet to keep your hard-earned coins in (see our guide to storing bitcoin). A good option is to head to the homepage of the currency you intend to mine and seek out the download link for the default wallet app. If you would like to do more research into litecoin specifically, we have a guide on how to get started.

If you find yourself in need of help and advice, most altcoins have community forums, as well as their own subreddit. The majority of wallets are based on the original Bitcoin-Qt client. Be warned, though, that before these wallets are truly usable, you may face a lengthy wait while the coin’s entire block chain downloads.

Dogecoin Client
Wow. Much Wallet (This is DogeCoin’s Wallet)

The need for speed

gpuUnless you possess specific mining hardware, there are two ways to mine cryptocurrencies: with your central processing unit (CPU) or with your graphics processing unit (GPU) – the latter being sited, of course, on your graphics card.

Of the two, a GPU offers far better performance for the cryptographic calculations required. However, if you are making your first foray into mining and don’t possess a souped-up gaming computer – a laptop with Intel integrated graphics, perhaps – it will still be possible to mine those altcoins, but at a far slower rate.

The catch with GPU mining is that it requires a dedicated graphics processor, such as you may have fitted inside your desktop PC – the Intel integrated graphics cards found in most laptops are just not suitable for the task. To keep speeds up to a respectable level, most altcoin miners build dedicated machines using motherboards that can house multiple graphics cards, usually via riser cables.

Be aware, too, that mining digital coins is very system intensive and can reduce the lifespan of your electronic components. It’s a good idea to make sure you have adequate cooling in place, keep an eye on those temperatures and keep hold of any warranties – just in case.

Solo, or with the crowd?

poolMining can either be a solitary venture or you can join a mining ‘pool’, where a number of people combine their processing resources and all take a share of the rewards.

It can be helpful to think of mining pools as joining a lottery syndicate – the pros and cons are exactly the same. Going solo means you get to keep the full rewards of your efforts, but accepting reduced odds of being successful. Conversely, joining a pool means that the members, as a whole, will have a much larger chance of solving a block, but the reward will be split between all pool members, based on the number of ‘shares’ earned.

If you are thinking of going it alone, it’s worth noting that configuring your software for solo mining can be more complicated than with a pool, and beginners would probably be better off taking the latter route. This option also creates a steadier stream of income, even if each payment is modest compared to the full block reward.

Deciding which altcoin to mine will be something else to bear in mind, however, some pools, such as Multipool, manage this for you and switch coins based on profitability.

Installing your CPU miner

A handy piece of software called cpuminer is the easiest way to start mining, but does require the ability to use the command line on your computer. The program can bedownloaded from SourceForge and is available for Windows (32 and 64 bit), OS X and Linux. For the purposes of this guide, though, we are making the assumption that you are using the Windows OS.

First, download the appropriate file for your operating system. The zip file can be extracted to anywhere on your hard drive, as long as you remember where it went. A good idea would be to create a ‘cpuminer’ folder on your desktop.

Writing your script

So, how to set up cpuminer with the parameters needed for your mining pool? Well, it’s usually simplest to write a one-line script (known as a ‘batch file’ in Windows) to launch the miner with the correct instructions.

To do this you will need the following:

  • The full path of the directory in which the mining program (“minerd.exe“) is stored (eg: “C:\cpu-miner-pooler”).
  • The ‘stratum’ URL of your mining pool server (eg: “stratum+tcp://pool.d2.cc“).
  • The port number of your mining server (eg: “3333”).
  • Your mining pool username (eg: “username”).
  • Your worker name or number (eg: “1”).
  • Your worker password (eg: “x”).

Now, open Notepad or your preferred text editor. Do not, however, use a word processor such as MS Word. Next, enter the script using the following formula (note that this method assumes you are mining a currency that uses the scrypt algorithm):

start “path” minerd.exe – -url URL:PORT –a scrypt – – userpass USERNAME.WORKER:PASSWORD

So, using the example details above, you would have produced the following text:

start “C:\cpu-miner-pooler” minerd.exe –url stratum+tcp://pool.d2.cc:3333 -a scrypt –userpass username.1:x

Save this file with a “.bat” extension; for example: “my-mining-profile.bat“.

Once the batch file is saved, double click it to activate the miner program. Your mining pool will most likely have a web-based interface and, within a few minutes, the website should show that your mining worker is active.

Now that you know how to mine with the CPU, let’s have a look at using your GPU.

Setting up your GPU miner

For those that intend to mine with GPUs, or USB mining devices, cgminer is the program to use and can be downloaded from the developer’s website – unless, that is, you’re a Mac user, in which case you will find some unofficial binaries here.

Versions of cgminer following version 3.72 do not support scrypt mining, and support for GPUs was removed in version 3.82. Therefore, the latest version isn’t necessarily the one to download. Instead, seek out the version appropriate for your needs.

Again, in this example, we are making the assumption that you are using the Windows OS. However, if you are using Linux or OS X, the command line arguments (ie: the parameters) are the same. Furthermore, the instructions below once again assume you will be mining a scrypt currency.

Extract the software into a folder that can easily be found, eg: “c:\cgminer\”.

Before going any further, make sure that your graphics drivers are up to date.

Next, press the Windows key together with the “R” key, type in “cmd”, and press “enter”. This will open the command terminal. Use the “cd” command to change the directory to the one housing the cgminer zip file.

Then, type in “cgminer.exe –n”. This will list all recognised devices on your PC. If your graphics card is detected, you should be good to go. If not, you’ll have research the steps required to properly set up your specific graphics card.

You will now need your mining pool details, just as with the CPU mining section above:

  • The full path of the directory in which the mining program (“minerd.exe“) is stored (eg: “C:\cpu-miner-pooler”).
  • The ‘stratum’ URL of your mining pool server (eg: “stratum+tcp://pool.d2.cc“).
  • The port number of your mining server (eg: “3333”).
  • Your mining pool username (eg: “username”).
  • Your worker name or number (eg: “1”).
  • Your worker password (eg: “x”).

Now we’ll make a batch file again, in order to start cgminer up with the correct parameters. In this case, the command structure is:

Start “path” cgminer — scrypt -o URL:PORT -u USERNAME.WORKER -p PASSWORD

For example,

Start “C:\cgminer\” — scrypt –o stratum+tcp://pool.d2.cc:3333 –userpass username.1:x

Watching your miner

cpuminerNow the mining software of choice is set up, you will see various statistics scrolling across your command line terminal. If you are using cgminer, you will see more information than you would with cpuminer. In the case of the former, you will see information about the currency and the mining pool, as well as about your mining hardware. If you’re running cpuminer, you will only see references to blocks that your PC has solved; although, it does, at least, show your hashing speed.

Maximising your power

Good news for miners who own PCs with dedicated graphics cards: it is possible to run both cpuminer and cgminer at the same time. To make this possible, add a “– threads n” argument to the minerd command. Here, “n” stands for the number of CPU cores that you wish to employ for mining.

Remember to leave one or two cores free to control your GPUs, though. Setting minerd to use all CPU cores will mean that the CPU will be too busy to send data to the GPU for processing. For example, if you have a quad core CPU, try setting the “–threads” argument to “2” or “3”.

Mining with both GPU and CPU concurrently reveals just how much better GPUs are at mining than the CPU. Compare the hash rates shown in the terminal windows for each of your mining programs and you should see at least a five-times difference in hashing speed.

Advertisements

What is the Difference Between Litecoin and Bitcoin?

Posted on

In 2009, Satoshi Nakamoto launched bitcoin as the world’s first cryptocurrency. The code is open source, which means it can be modified by anyone and freely used for other projects. Many cryptocurrencies have launched with modified versions of this code, with varying levels of success.

Litecoin Logo

Litecoin was announced in 2011 with the goal of being the ‘silver’ to bitcoin’s ‘gold’. At the time of writing, Litecoin  has the highest market cap of any mined cryptocurrency, after bitcoin.

Here’s our guide to show you the crucial difference betweenbitcoin and litecoin.

At-a-glance differences

bitcoin litecoin
Coin limit 21 Million 84 Million
Algorithm SHA-256 Scrypt
Mean block time 10 minutes 2.5 minutes
Difficulty retarget 2016 block 2016 blocks
Block reward details Halved every 210,000 blocks. Halved every 840,000 blocks
Initial reward 50 BTC 50 LTC
Current block reward 25 BTC 50 LTC
Block explorer blockchain.info block-explorer.com
Created by Satoshi Nakamoto Charles Lee
Creation date January 3rd, 2009 October 7th, 2011
Market cap $10,467,596,650.78 $540,274,528.26
 Bitcoin Statistics  Litecoin Statistics

Mining differences

Just like bitcoin, litecoin is a crytocurrency that is generated by mining. Litecoin was created in October 2011 by former Google engineer Charles Lee. The motivation behind its creation was to improve upon bitcoin. The key difference for end-users being the 2.5 minute time to generate a block, as opposed to bitcoin’s 10 minutes. Charles Lee nowworks for Coinbase, one of the most popular online bitcoin wallets.

ASIC Mining
ASIC Mining

For miners and enthusiasts though, litecoin holds a much more important difference to bitcoin, and that is its different proof of work algorithm. Bitcoin uses the SHA-256 hashing algorithm, which involves calculations that can be greatly accelerated in parallel processing. It is this characteristic that has given rise to the intense race in ASIC technology, and has caused an exponential increase in bitcoin’s difficulty level.

Litecoin, however, uses the scrypt algorithm – originally named as s-crypt, but pronounced as ‘script’. This algorithm incorporates the SHA-256 algorithm, but its calculations are much more serialised than those of SHA-256 in bitcoin. Scrypt favours large amounts of high-speed RAM, rather than raw processing power alone. As a result, scrypt is known as a ‘memory hard problem.

The consequences of using scrypt mean that there has not been as much of an ‘arms race’ in litecoin (and other scrypt currencies), because there is (so far) no ASIC technology available for this algorithm. However, this is soon to change, thanks to companies like Alpha Technologies, which is now taking preorders.

Bitcoin Mining Rig
GPU mining

To highlight the difference in hashing power, at the time of writing, the total hashing rate of the bitcoin network is over 20,000 Terra Hashes per second, while litecoin is just 95,642 Mega Hashes per second.

For the time being, ‘state of the art’ litecoin mining rigs come in the form of custom PCs fitted with multiple graphics cards (ie: GPUs). These devices can handle the calculations needed for scrypt and have access to blisteringly fast memory built into their own circuit boards.

There was a time when people could use GPU mining for bitcoin, but ASICs have made this method not worth the effort.

Transaction differences

The main difference is that litecoin can confirm transactions must faster than bitcoin. The implications of that are as follows:

  • Litecoin can handle a higher volume of transactions thanks to its faster block generation. If bitcoin were to try to match this, it would require significant updates to the code that everyone on the bitcoin network is currently running.
  • The disadvantage of this higher volume of blocks is that the litecoin blockchain will be proportionately larger than bitcoin’s, with more orphaned blocks.
  • The faster block time of litecoin reduces the risk of double spending attacks – this is theoretical in the case of both networks having the same hashing power.
  • A merchant who waited for a minimum of two confirmations would only need to wait five minutes, whereas they would have to wait 10 minutes for just one confirmation with bitcoin.

Transaction speed (or faster block time) and confirmation speed are often touted as moot points by many involved in bitcoin, as most merchants would allow zero-confirmation transactions for most purchases. It is necessary to bear in mind that a transaction is instant, it is just confirmed by the network as it propagates.

Bitcoin Litecoin image via Flickr. Mining Rig image via Wikipedia. Mining USB devices Image via Shutterstock.

How to Calculate Mining Profitability

Posted on

Are you serious about mining cryptocurrencies? If so, you need to know how to make the best use of your money and equipment. In this guide, we’ll show you how to mine your digital treasure in the most profitable way.

Obviously, the big money is going into costly bitcoin ASICs. If you are already in that position, you probably know how the process works and are intending to mine bitcoin. However, those of you on a more moderate budget are probably looking at building a GPU miner for scrypt currencies, or a buying a small ASIC machine for bitcoin or other SHA-256 currencies. In that case, you have come to the right place.

How do I start?

Choose your currency

Digital puzzleThe process of mining digital currencies involves solving complex cryptographic puzzles. By doing this, miners are providing ’proof of work’ that is rewarded with digital currency. Broadly speaking, there are two proof-of-work hashing algorithms in use today: SHA-256 and scrypt. Note that there are some lesser-used alternatives, which we will not be looking at in this guide (for example, Primecoin).

  • SHA-256
    The SHA-256 algorithm favours raw processing power. In bitcoin’s very early days, one could mine effectively with the CPUs and GPUs (graphics processing units) that you find in a normal home PC. That time has passed, however, and the difficulty level of bitcoin is so high that specialised processors known as ‘Application Specific Integrated Chips’ (ASICs) are needed to mine it. The use of such powerful processors, along with bitcoin’s exponential increase in difficulty level, have created a technological arms race, which means that even quite recently designed chips can quickly become obsolete.
  • Scrypt
    The scrypt algorithm favours greater amounts of RAM and parallel processing ability, which is why GPU-based rigs are still the way to go. Furthermore, ASICs for scrypt have yet to take off, so the difficulty level of those currencies has not been pushed up as dramatically as has been the case with bitcoin.

The right rig

shutterstock_88988593Depending on your budget and the type of currency you intend to mine, there are two ways to go when setting up your mining system:

  • DIY mining rig
    These can be built from your own PC, with as many graphics cards (ie: GPUs) as you can fit or afford. While some people may use a standard PC case, many use unusual casings, such as beer crates, which allow for increased air flow around the components. A bonus of DIY systems is that you can carry out both CPU and GPU mining at the same time (see our guide to mining altcoin).
  • ASICs
    ASICs are self-contained units (power adapters not withstanding), which come with a USB and/or Ethernet port, and are usually ready made by manufacturers. ASIC miners are usually more expensive than DIY rigs and are mostly produced in the USA, which means those of us in other parts of the world will have to spend a little extra to get them imported.

Power up

Mining rigMining requires electricity – lots of electricity. If you are building a DIY rig, you’ll be getting an ATX power supply unit (PSU) anyway, so it’s worth investing in the most efficient supply you can get.

Consider the following two cases, for example: A PSU that is guaranteed to supply 860W and is 93% efficient would actually draw 925W (860W/0.93). By contrast, a 750W power supply that is only 80% efficient would actually draw 937.5 W (750/0.8) – thus using more power, but supplying less.

When building a mining rig, you will need to take account of the power requirements of all the components you are using ­– especially all those graphics cards. Plus it’s a good idea to provide some excess capacity to deal with unexpected events and provide the potential to overclock your system.

ASICs, on the other hand, can do far more calculations with far less power because they are highly specialised devices. And since they ship with an appropriate power adapter, you won’t have to worry about doing all the maths to find one that is up to the task.

The mining efficiency of different systems can be compared by taking the ratio of the number of hashes it can perform in a second, divided by the power it consumes:

Hashing speed / power consumption = mining efficiency

Check your bills

After the initial expense of your rig, the essential thing you need to know to calculate your ongoing profitability is the cost of your electricity. Check with your provider, or take a look at your last bill. If the power charges add up to more then you earn, it obviously isn’t a good business model.

Pool your efforts

Rather than go it alone, it usually makes more sense to join a pool, where you combine resources with other miners. By joining a pool, you earn a share of the coins mined by all members of the pool and stand a greater chance of solving a block.

Miners earn a share of the rewards if the difficulty level of the blocks they solve is greater than the level set by the pool operator. That level is always somewhere between 1 and the difficulty level of the currency.

Problems to be aware of

Spend to earn

shutterstock_96423176Inevitably, the difficulty level of all currencies increase with time – a fact that will reduce the chances of your equipment earning coins or mining shares. As a result, it is important to start with the best equipment you can afford, in order to mine profitably over the longest period of time.

The volatility of the currency being mined also affects your long-term profitability. If the price suddenly drops, you will be faced with the choice of either selling at a low price or hanging onto your coins until their value increases. In the former case, you would have to keep mining for longer to recoup your expenditure on equipment and electricity.

Keeping cool

Mining rigWhichever way you mine, it’s a computationally intensive operation that creates lots of excess heat. Mining efficiency decreases as temperature increases, so make sure your rig has adequate ventilation and cooling. As mentioned above, this is why some mining rig builders  use beer crates rather than PC cases – to maximise airflow around their components. Even a standalone desktop fan can help to keep your kit cool.

Power problems

When building a DIY mining rig, it doesn’t make sense to save money by buying a cheap PSU. Any instability in the power supply could hit performance, or even cause a system crash that will lead to downtime, so do invest in a high-quality unit.

Avoiding downtime

If your hardware isn’t mining, you are losing money. Here are some ways to minimise downtime:

  • Get the best power supply you can afford.
  • Consider using an uninterruptible power supply (UPS), so that, if your electricity supply cuts out for a moment, it won’t affect your miner.
  • Configure your mining computer to automatically start mining on start-up, so that if the system crashes and reboots, it will automatically start mining again. (This applies to DIY rigs and computers hosting an ASIC.)

Hidden costs

Losing moneyThere are costs involved with mining, of course, like the rig and the ongoing electricity costs for starters. However, some extras are less obvious:

  • Delivery and customs
    We imported a Jalapeno ASIC miner from Butterfly Labs to the UK. The delivery cost £53 ($88), and UK customs charged £46.09 in duty (around $76). These costs are significant, and if you’re importing an item, try to work out beforehand what costs it might incur.
  • Accessories
    Will you need cables, adapters, etc, for what you are planning to use and/or build?
  • Cooling costs
    It’s not just the cost of your miner’s power use. What about the electricity of running any extra cooling system, such as fans or air conditioning?

Doing the sums

Profitability calculators

shutterstock_135890222For assistance with some of the calculations miners need to make, there are several websites that provide profitability calculators. You can input parameters such as equipment cost, hash rate, power consumption, and the current bitcoin price, to see how long it will take to pay back your investment.

As a test, we entered the specifications of two mining systems into the calculators below. For our Scrypt GPU mining rig, we used the system described, and for our SHAS-256 ASIC miner we used the specifications of a Butterfly Labs miner.

With a UK electricity price set at £0.20 per KWh (which equated to $0.33), these are the recommendations and profits that the following sites presented:

(Note that these figures were correct as of January 21st, 2014, and that they are all subject to currency volatility and shifts in difficulty level.)

Multicurrency calculators:

Dustcoin:
SHA-256: Freicoin at $1.43 per day
Scrypt: Dogecoin at $31.05 per day

CoinWarz:
SHA-256: Bitcoin at $1.14 per day
Scrypt: Dogecoin at $39.13 per day

Bitcoin specific calculators:

Tradeblock:
Bitcoin at $1.20 per day

Bitcoinx:
Bitcoin at $1.42 per day

Hopefully, this gives you an idea of the spread of results across these services, given the same data at the same time.

Data miningdigital puzzlehandscomputer powerCPU fanrisk,businessman and calculator images via Shutterstock

What are Bitcoin Mining Pools?

Posted on

One of the first questions that anyone interested in mining cryptocurrencies faces is whether to mine solo or join a ‘pool’. There are a multitude of reasons both for and against mining pools. However, if the hash rate distribution across the bitcoin network is anything to go by (and it is) then most miners are opting to join a pool. Here’s what you need to know.

Pros and cons

Pros and consIf you’re deciding whether to join a mining pool or not, it can be helpful to think of it like a lottery syndicate – the pros and cons are exactly the same. Going solo means you won’t have to share the reward, but your odds of getting a reward are significantly decreased. Although a pool has a much larger chance of solving a block and winning the reward, that reward will be split between all the pool members.

Therefore, joining a pool creates a steady stream of income, even if each payment is modest compared to the full block reward (which currently stands at 25 XBTC).

It is important to note that it is important for a mining pool to not exceed over 51% of the hashing power of the network. If a single entity ends up controlling more than 50% of a cryptocurrency network’s computing power, it could – theoretically – wreak havoc on the whole network. In early 2014, many voiced concerns that the GHash.io bitcoin mining pool was approaching this threshold, and miners were urged to leave the pool.

Currency difficulty

In bitcoin’s case, the current difficulty level is so high that it’s practically impossible for soloists to make a profit mining. Unless, of course, you happen to have a garage full of ASICs sitting in Arctic conditions. If you’re a beginner, joining a mining pool is a great way to reap a small reward over a short period of time. Indeed, pools are a way to encourage small-scale miners to stay involved.

What to mine?

Flip coinsOf course, bitcoin is not the only currency out there – it’s easy to find lists of mining poolsfor your chosen cryptocurrency.

One method of mining that bitcoin facilitates is “merged mining”. This is where blocks solved for bitcoin can be used for other currencies that use the same proof of work algorithm (for example, namecoin anddevcoin). A useful analogy for merged mining is to think of it like entering the same set of numbers into several lotteries.

First-time miners who lack particularly powerful hardware should look at altcoins over bitcoin – especially currencies based on the scrypt algorithm rather than SHA256. This is because the difficulty of bitcoin calculations is far too high for the processors found in regular PCs.

If you’re not sure which currency to mine, there is a pool called ‘Multipool’ which will automatically switch your mining hardware between the most profitable altcoin. Multipool updates every 30 minutes, and over time you’ll see balance grow in multiple altcurrencies. If required, the pool does allow you to fix your hardware on just one altcurrency too.

However, Mark from nut2pools.com said of this type of switching pool: “Loyal coin followers hate them because as soon as the difficulty of a coin drops, the profitability of it rises. Then all the multipools swing round, push the difficulty through the roof in a few hours, then leave again. It leaves the loyal coin followers having to mine the difficulty back down again at very low profitability.”

Pool rewards

PaymentsWhen deciding which mining pool to join, you need to weigh up how each pool shares out its payments and what fees (if any) it deducts.

There are many schemes by which pools can divide payments. Most of which concentrate of the amount of ‘shares’ which a miner has submitted to the pool as ‘proof of work’.

Shares are a tricky concept to grasp. Keep two things in mind: firstly, mining is a process of solving cryptographic puzzles; secondly, mining has a difficulty level. When a miner ‘solves a block’ there is a corresponding difficulty level for the solution. Think of it as a measure of quality. If the difficulty rating of the miner’s solution is above the difficulty level of the entire currency, it is added to that currency’s block chain and coins are rewarded.

Additionally, a mining pool sets a difficulty level between 1 and the currency’s difficulty. If a miner returns a block which scores a difficulty level between the pool’s difficulty level and the currency’s difficulty level, the block is recorded as a ‘share’. There is no use whatsoever for these share blocks, but they are recorded as proof of work to show that miners are trying to solve blocks. They also indicate how much processing power they are contributing to the pool – the better the hardware, the more shares are generated.

The most basic version of dividing payments this way is the ‘pay per share’ (PPS) model. Variations on this puts limits on the rate paid per share; for example, equalised shared maximum pay per share (ESMPPS), or shared maximum pay per share (SMPPS). Pools may or may not prioritise payments for how recently miners have submitted shares: for example, recent shared maximum pay per share (RSMPPS). More examples can be found on the bitcoin wiki.

The other factor to consider is how much the pool will deduct from your mining payments. Typical values range from 1% to 10%. However, some pools do not deduct anything.

Starting to mine with a pool

Having decided which currency to mine and which pool you’ll work for, it’s time to get started. You need to create an account on the pool’s website, which is just like signing up for any other web service. Once you have an account, you’ll need to create a ‘worker’. You can create multiple workers for each piece of mining hardware you’ll use. The default settings on most pools are for workers to be assigned a number as their name, and ‘x’ as their password, but you can change these to whatever you like.

SilhouettePros and consCoin flip and Check mailbox images via Shutterstock