Fat-free Litecoin mining guide

Coin mining is a fun hobby but there is a lot of useless, disorganized information about it on the wikis. It could take you a while to get started. Even after two weeks of mining I’m fixing up some of my beginner’s mistakes. So I made this guide; a simple, straightforward way to get you mining and avoid my mistakes. I’m not going into details; it’s a bootstrap to get you going asap so you can learn the rest on your own.

 

1. Can I make money?

If you don’t research on your own you will burn as much money into electricity as you earn in coins. ¬†http://ltc.kattare.com/calc.php is a good income calculator (but the owner has been MIA for a week now ūüôĀ ). If you don’t know what numbers to plug in, use you computer’s power supply wattage and 330 kH/s (an average of the top 5 most efficient cards). That’s a reasonable scenario; your average game computer may make only 30$ a month after paying for electricity and that doesn’t cover wear. Still, interesting hobby if it’s not all expenses!

 

2. What to mine?

Litecoins (LTC). Unless you have dedicated mining hardware, LTCs are currently more profitable to mine.

 

3. What bare minimum do I need?

  • Always-on Internet. Doesn’t have to have a big data plan.
  • 10+ gb of Hard Disk space to keep the entire blockchain. ¬†You don’t want something that big on your SDD so use your storage HD.
  • litecoin-qt from http://litecoin.org/ ¬†You could get an online wallet or download a light wallet that doesn’t need the whole blockchain, but this is the reference implementation, and you’ll need the blockchain if you want to solo mine or p2pool later.
  • A cool room and a well-cooled machine. Miners gets very hot and noisy, but can be any old computer as long as it has a PCIe x16 port and 2+ gigs of ram. It’s the GPU that does all the work in LTC mining.
  • An up to date executable of cgminer from¬†https://bitcointalk.org/index.php?topic=28402.msg357369#msg357369¬† If you don’t want to compile cgminer yourself, you might have a hard time finding downloadable executables. Read the forum, someone is bound to have made them available – and tell you about trojans to avoid. Do run an antivirus on anything you download anyway.
  • Do NOT get guiminer or other GUIs right away. They’re fine, but you don’t need them and they get in the way. Don’t worry, cgminer has its own UI!

 

4. How to set it up?

Install litecoin-qt.   Before you run it, create a shortcut and add -datadir=F:\LiteCoin\litecoin-data (or wherever you want the huge blockchain to be stored) in its properties. Start litecoin-qt. It will sync for several hours, possibly a day. When it is finished syncing, it will create a new wallet for you. You should choose to encrypt it from the menu and restart right now, instead of waiting till you have a lot of money in there.

If you’ve installed cgminer for your OS (on Windows, just expand the archive to a folder), you’re done, you can start mining! ¬†But wait…

 

5. Picking your battles

At this point you’ve wasted an entire day waiting for that sync. Do not WASTE time SOLO mining! With dual 7850’s the expected time to find a block is 35 days, a long time without news! And it is a lot like the lottery, more power is like getting more tickets. It could be two months before you hit a block. A year. More. I don’t know about you, but I can’t imagine dedicating my gaming rig 24/7 to something that might never pay.

You MUST Join up with other machines, get more tickets, split the profits! Look for a pool at https://github.com/litecoin-project/litecoin/wiki/Comparison-of-mining-pools. You’ll think that a distributed, peer-2-peer pool sounds brilliant. You don’t even have to create an account! DO NOT, at this point, JOIN a P2POOL.¬† Although it a neat system, and you’ll get some LTC almost right away, it will be split into a great quantity of tiny amounts. ¬†This is ‘gold dust’, it adds up to a nice sum, but so fragmented that you will have to pay a large fee to use it! For example right now if I want to get 8 LTC out of my p2pool wallet I have to pay a 3 LTC fee! A litecoin patch to reduce these fees might come out this month. Also if you have larger chunks of LTC in your wallet the fees should be proportionally smaller. But since you just started, you don’t have either of those things, so avoid P2Pool for now. Sorry!

What you need is a pool that sends LTC in larger chunks. That means they will keep your LTC in their online wallet for days, so you have to shop around and find a pool you trust. The older pools are likely to be more stable/trusted, but age is no guarantee that they will still be around tomorrow. They are also larger so you end up being a tiny fish in a big pond; more frequent but smaller rewards. This is pretty much a guessing game, everything is still so new that a 1-week-old pool might be just as rewarding as a much larger one. This is the part that truly make it into a hobby, you can try a few pools or all of them, but you get to know the people involved. Note that you really must mine with a pool for at least a day before you get any real rewards.

Most pools have similar tools. Let’s create an account on made-up randompool.cad using a spam-protected email address, a password, and a NIP (secondary password) you write down somewhere big and obvious. Once your email is verified, you want to do two things: create workers and set your payment address for autopay. Give your worker a sensible name and password (such as Username.Meltinggpu and smelting, try to follow the format suggested by the site so people can see how well you’re doing in the pretty graphs…) The graphs expose your username so there’s a security risk there, but you don’t want to use a random site as a bank anyway so you’ll transfer your coins to your home wallet whenever possible. Find to the autopay section and put at least 1 LTC (2 might be a week’s work with your starting setup). For the payment address, go to your litecoin-qt, click on ‘receive’ and you’ll see a list of addresses. Click ¬†on ‘Add an address’, put randompool as a label if you want, you will get a new jumble to the right. This is a public address to your wallet – you can post it anywhere on the web; people can only use it to ‘send’ you money. ¬†Copy-paste that to the pool’s site. You might have to enter the NIP you selected when you first registered, this is like a 2nd password to protect your money. (But that doesn’t actually protect your money from the pool admin, only people who cracked your username/password)

The site probably has a ‘getting started’ section where they give you a config or batch file, or settings to use to start your worker. But the typical command is this:

CD to your cgminer folder using a command line interface.

type

cgminer --scrypt -u Username.Meltinggpu -p smelting 
-o http://ltc.randompool.cad:9332 --auto-fan --temp-target 70

And if all went well, you’re mining LTC!

–scrypt means use the LTC algorithm, you can use cgminer to mine BTC, but that requires a different pool and installing bitcoin-qt instead. (you can have both wallets, but you can’t mine both with a single card at the same time).

-u, -p identify your worker with the pool in -o.

–auto-fan¬†and –temp-target 70¬†try to make sure you don’t melt your 200$ card by adjusting your card’s fan speed automatically so it doesn’t go over 70 c. This obviously varies by card, but 70 c is a ‘safe’ value for any card. 80 is still pretty cool, but not the best if you want your card to last many years. Over 90 and you’re likely to get hardware errors and shorten you card’s life, although it might work without any problems. I prefer to give you safe settings over getting angry emails later. ūüôā Please realize that this WON’T reduce work to keep the card safe.

 

Cgminer displays info at the top of your CLI:

avg is how fast you are solving hashes on average. If this is close to zero you have a setup error or your GPU has melted.

A and R are how many hashes have been accepted and refused. A non-zero R is normal, but if it’s high compared to A then either your network is slow, your card is overheating or maybe you’re using the wrong coin algorithm (remember the –scrypt?).

HW is hardware errors. You want this to be zero. If it’s rising, your GPU is working too hard and melting. Typing Q will reset your card and quit so you can take the time to figure out what’s wrong.

Connected to… Shows you what pool you’re mining and as which user

GPU 0, 1, n below that show you the status of all your GPUs, their temperature, fan speed, hashing speed and details of the info at the top.

There’s a menu of commands you can type, P, G, S, D and Q at first. That’s where the actual nerdy stuff is so explore a little. ūüôā You can play a lot with cgminer’s settings, and that’s part of the fun. You CAN do damage here, I can blow the fuse in my office just by changing the settings on one video card. Stay within safe values till you see your first coins appear in your wallet. Now you’re rich, buy a better card! ūüôā

 

6. Turning it into cold hard cash

LTC is worth $, but it isn’t $. ¬†You have to trade it for something you want. There are a few stores that accept LTC, but currently there are no exchanges that trade LTC for CAD directly. You have to trade your LTC for BTC first, on an exchange like BTC-e or Vircurex. This is a quick and easy way to get hooked on day trading by the way, since you’re playing with ‘fake’ money. Be careful! You do have expenses – electricity and wear on your computer/GPU, air conditioning, etc. I try to set aside some gains for those expenses and gamble away the rest in trading.

Once you have some BTC, there are exchanges that will let you trade those for CAD and get an Interact or bank deposit for a small fee like LibertyBit and Virtex, but I have not tried them yet.

According to Canadian law,¬†any trade is taxable based on the value of the trade. Frankly I don’t believe it’s even humanly possible to track the 0.52237641 BTC for 2.325236 LTC trades (taxed at … how much exactly in CAD?) in an exchange, but make sure you declare any goods you actually buy (such as Canadian Dollars) as a capital gain.

 

7. Where to go next/Fun ideas

Now that you’re hooked here’s a few ideas of fun things to do with this hobby.

  • Secure your wallet: Your coins actually reside on a file your computer. Lose that file and you lose all that money. So make sure you have a backup. ¬†You might actually have fun with the portability aspect – maybe you can carry your coins in your pocket in an usb key, or on your smart phone? ¬†Or have the money self-destruct when your kids don’t do their chore? ¬†(Don’t actually do that – coins are unique, so if you destroy them, there are actually less coins in the system. A few lost isn’t bad, but if everybody does it…)
  • Optimize your workers: cgminer is a great piece of software, but by tweaking it you can get much more juice out of your system. You can overclock the RAM and the engine, and how much work you want your card to do. I found out that just by adjusting the intensity setting on one card, I could make a fuse blow in my office. ¬†Nerdy fun!
  • Make a dedicated miner: Dual cards, mineral oil cooled machines anyone? ¬†You can’t play games on a 24/7 miner (unless you have a dual card setup and tweak stuff so most games still run with decent graphics)
  • Use failovers: Any pool can fail, sometimes temporarily. ¬†cgminer can be told to start mining on a different pool if your main one fails, or do some load balancing. Can you optimize your returns this way? ¬†Note that pool-hopping is not as rewarding as a good day’s mining…
  • Start your own pool! Not extremely hard, but not for the faint-hearted either, having people join you instead of hunting for a stable pool sounds like fun!
  • Get your own business to accept BTC and LTC as payments!
  • Start your own company based on this technology!
  • Profit!

Enough for now … Hope you have fun with your new mining hobby!

Did you find this helpful? Saved you hours of googling? ¬†Send a tip to LbYttXy4UqSDXUdP345jpUvq6MR997GX3L ¬†(the L means it’s a LTC address) or 1PuPCtUt3pmMjbiLTgTKD6G9AkQS3FBUtD (See, no L at the beggining, so that’s for BTC!).¬†

A LUCASFILM Reboot

A Star Wars reboot that would totally disturb the Force into a giant Black Hole of Ultimate Sadness? Star Wars Episode VII: Young Indiana Jones and the First Class… Indiana Jones as the first Jedi. Ew. Ick.

More seriously, what I would like to see is the true story of Yoda. This could mark the return of M. Night Shyamalan with the wickedest plot twist in the history of cinema. In nine centuries Yoda infiltrated the Jedis, modified their training to turn them from a mind-controlling police force into a religion that truly makes them weak. At their weakest, he organizes the Great Jedi Purge, handing the Stormtroopers the location of every single group of Jedis so they are¬†exterminated overnight (showing a few of his Sith allies who is the boss along the way). How can the top target of the Purge survive without a scratch? Isn’t it odd that we almost never see Yoda use mind tricks? He is – he’s just so good nobody notices.

Is Yoda evil, the greatest Sith that ever lived, or does he only want to take away the Thought Police from Imperial power? Episode VII: Rise of the Whills would totally rock. Heck, it could even be filmed as found footage from Yoda’s point of view. ūüėČ
(Or Ep VII: Your childhood, break I. Although that title also applies to the episodes I-III :()

(assuming only the MOVIES as canon. And mind tricks can bend anything else into shape. Please go and re-watch the movies with evil Yoda in mind ūüôā

Coding by mistakes

All software design companies recognize how important it is to let its programmers make mistakes, as long as they have an established process. The idea of a branch-and-merge mechanism in version control software reflect this; the designer expects to experiment, make mistakes and fix everything before merging his code back into the code. While the programmers are not encouraged to make mistakes, making them in as safe a way as possible very often grants a team the freedom to make happy mistakes, where they learn a new trick, a simpler interface might be used or new approaches or functionality might be invented.

The team still has to work on a schedule, but the confidence to experiment new things is the first way to learn and improve. I believe it’s the best way of turning a team from good to great, especially if I use an agile approach. ¬†I recently saw a funny video about ‘The Institute of Mixing Random Things Just In Case the Result is Good” – it had a better name, but you get the idea. ¬†Random tests, mutations and errors are 99.999999% bad, but sometimes, very rarely, they are useful. ¬†Awareness of it is important and encourages the open mind necessary to realize that an unexpected result might have a positive impact.

Have you ever tried out something or given someone a task and they come back with something that isn’t at all what you expected, but it makes the rest of the project better? ¬†I could give you a few examples. An intern created a simple launcher (what I asked for) but stored more parameters than he needed to (a waste of resources at the time); it saved our bacon at a conference when the loaned machines needed a different configuration. A developer created an user-defined attribute system on top of the business objects (what I asked for), but the simple lightweight system meant that most of the previous storage code could be made irrelevant. Investigating¬†performance problems of a tagging feature led to removing a very slow, convoluted and totally useless loop in unrelated database code. ¬†Have you ever experienced this rare, but happy, event?

This morning I was wondering if the capacity to ‘revert’ things could be applied to anything else. ¬†I know I often depend on ‘undo’ in my word processor to stop most of my logorrhea, or at least tide it back. I make a backup of drawings before I try to color them or edit them. It lets me screw up in confidence. But there are still plenty of places where I feel like I don’t know what I’m doing or if there’s a better way of doing it, and I can’t find out because I’m afraid to screw up. ¬†Take this WordPress platform for instance. There are a ton of options and features I have never used and might never even try, just because reverting to a state I like might be impossible.

So where else could I use recoverability? ¬†What software packages don’t have it but would be easier to learn if they did? Can I implement recoverability with simple, generalized backups in most cases? And do I actually learn to use my stuff better if there’s no chance of messing up? ¬†Can I apply this to everything? Can I make a team better by giving them a safety net? ¬†If I let a dev. team self-manage and edit their bug list instead of making it my exclusive domain, would they screw up or would they learn quickly and get more efficient at it than I would alone?

Any truly Agile process needs to adapt; being able to experiment (and having the freedom to screw up from time to time) is a basic need. I think it’s important to adapt your tools, processes and thinking to learning by mistakes and being able to revert at any time.

Google robot postmen?

Google can track packages. ¬†Google can put them on robot trucks and deliver them to your house without having a human driver. ¬†The truck can come by the house again tirelessly until you are there to sign for the package.¬† The only thing Google doesn’t have yet is a picture of your face so it can be sure that you’re the one signing for the package.

Or does it? ¬† It shouldn’t be too long before you see Gods (Google Delivery Services) Trucks outside your door. ¬†What could be better than getting a message straight from God?

Heaven and Hell share a subnet

I’m a computer nerd. ¬†I’ve known since 1976 when then-six-year-old me played on a 110 baud printer terminal running on MUSIC/SP.

Some nerds of the time went on to greatness. ¬†I went on to helping write great software for people who did not know how to sell it. When someone throws out projects you’ve spent years building, there’s a small number of things left to do: have a burnout, feel like a failure, and play WoW stuffing down chips all day.

I don’t want that to happen to me, or anyone. So here I am, writing this blog, setting goals, sharing ideas. ¬†The Universe of data and computation is complex and unlimited. There’s still great software to write, new ideas to try out. ¬†Can I still be relevant?

This is a faily self-centered blog, so it’s no surprise that I will cover a lot of random stuff. Let me just throw out some keywords in any case: hacking, software engineering, software development, team management, development processes, role-playing games, tipping your postman, smart use of resources and whatever else strikes my fancy.

Now that the introduction is over, let’s see if I can come up with at least one original idea in this blog… ¬†My first goal: to get two comments!