Categories: Uncategorized

How to Mine Bitcoins for Fun and (Probably Very Little) Profit

Thanks to the recent coverage of Bitcoin in the media, a number of non-technical friends have asked me “Hey, dude, you’re in computers…can you show me how to make my own Bitcoins with my home computer?” Since you can never really leave technical evangelism once you’ve gone into it, I couldn’t resist fulfilling their requests. In this article, I’ll talk a little bit about Bitcoin, show you how you can mine them on any old Windows machine you’ve got sitting around at home, and give you an idea of how much — or perhaps more accurately, how little — you can hope to make.

Before I begin, let me give you this quick graphic summary of mining Bitcoins on a typical home computer:

Bitcoin: A Quick Summary

The Phantom Maker

If you have an interest in computer science, cryptography, mathematics or academic papers — or some combination thereof — let me point you to Bitcoin: A Peer-to-Peer Electronic Cash System, the paper published by “Satoshi Nakamoto”, the creator of Bitcoin. While it explains the general idea behind Bitcoin, it’s not intended for the non-technical reader who wants a little backgrounder before minting electronic ducats in the comfort of his or her own home.

I put the name “Satoshi Nakamoto” in quotes because it’s a pseudonym for the person or persons who designed and created the original Bitcoin software. It’s one of those stranger-than-fiction occurrences: this electronic currency was conceived and first put together by a mysterious cryptographer (or group of cryptographers) who maintains a veil of Keyser Soze-like obscurity. Stranger still is the fact that after creating Bitcoin, making some modifications and sharing the technical information behind it, he vanished, with his final known involvement having taken place sometime in 2010. Before disappearing altogether, he set up Gavin Andresen as the caretaker of the Bitcoin source code repository as well as the Bitcoin alert key, which can be used to send an “alert” message to the entire network of Bitcoin programs. Even stranger is that Andresen says that he’s never met “Nakamoto” nor does he know his identity; all their conversation was via email and other textual communication.

The Math Works

This raises the question: “Why should we trust this shadowy character?” The answer is simple: we don’t have to. If there’s anything that needs to be put to the test, it’s the math behind Bitcoin, and it’s been proven to work. The math behind Bitcoin is such that transactions don’t need a trusted third party, such as a government, a bank, credit card company, Paypal or similar intermediary to transfer Bitcoins: just a payer and a payee. It harnesses the network all computers running Bitcoin software, none of which are controlled by some central authority, to create Bitcoins in a way so that they cannot be counterfeited. It also puts some hard limits on the rate of Bitcoin production as well as a maximum number of Bitcoins that can ever be created to prevent inflation (or worse, Zimbabwe-style hyperinflation).

What Bitcoins are Made Of

Bitcoins are made up of digital signatures. Digital signatures are math operations that you can perform on data that you send to prove the following:

  • Authenticity: the data was created by a specific sender.
  • Non-repudiability: the data is confirmed to have been sent by a specific sender in such a way that the sender cannot deny having sent the data.
  • Integrity: that the data was not altered in transit.

When you give a Bitcoin to someone else, you (or more accurately, the software doing the transfer) sign the Bitcoin with the digital signature of your Bitcoin wallet, which is software designed to hold Bitcoins and make Bitcoin transactions possible. As a result, each Bitcoin carries within it a little ledger listing its transaction history.

Bitcoin’s Ledger: The Blockchain

As Bitcoin transactions take place, they are broadcast to the network — a network made up of every computer on the internet running Bitcoin software — whose job is to maintain the blockchain, the digital ledger containing the record of all confirmed Bitcoin transactions, ever. The blockchain is kept in chronological order and certified as not-messed-with through cryptography. In fact, there are a few clever tricks built in so that altering a ledger entry in the blockchain invalidates all subsequent entries.

Mining

If we run with the blockchain-as-ledger metaphor a little longer, we can think of it as being made up of pages, which we call blocks. Just as you’d first check invoices, receipts and other proof as you write entries in a paper ledger until they filled the page, the Bitcoin network confirms transactions by performing some serious number-crunching, and confirmed transactions are encoded into a block. Once a block is created — a process we call mining — it is added to the blockchain, which is then shared throughout the network.

In order to provide an incentive for mining — again, that’s the process of confirming transactions and recording them in blocks — creating a block also creates a transaction that rewards the miner (the software that does the mining process) with a predetermined number of Bitcoins for doing so. Mining takes a lot of number-crunching — enough to max out the processors on a computer — and there’s an associated cost in electricity, ensuring that Bitcoins aren’t “free money”.

Miners in the Bitcoin network all work on trying to be the first one to complete the number-crunching required to add the next block to the blockchain. The first miner to complete the block asks the other miners to double-check its work, and if they say it’s good, the block gets added to the block chain and the miner is rewarded with Bitcoins. Then they compete to be the first to complete the next block, and so on.

Every 4 years, this reward paid to a miner for creating a block is halved. When the network started, the reward for creating a block and adding it to the blockchain was 50 Bitcoins; it was reduced to 25 in November 2012, and in four years, it will be reduced to 12.5. Coupled with a built-in mechanism for automatically adjusting the difficulty of the number-crunching process and the ever-growing blockchain and Bitcoins (both of which grow with each transaction), this reduction of the reward ensures that it will become harder and harder to make Bitcoins as time goes by. Eventually, this path of diminishing returns will hit the point where it would take infinitely large computing resources to make an infinitely small amount of Bitcoin, creating a practical maximum of 21 million Bitcoins in the year 2140. It also helps to counter the increases in computer power over time.

Mining Rigs and Pools

The “Icarus” mining rig. Click to see a bigger picture of the beast.

The Bitcoin system is set up so that it’s much easy to make Bitcoins at the start (back in 2008) but increasingly difficult over time. The days when a miner running on a home computer could hope to be the first one to complete a block and reap the Bitcoin rewards are long gone. Hardcore Bitcoiners have been in an arms race over the past four years, building computers whose sole purpose is to mine. One such rig is one pictured above; it harnesses the power of 41 Field-Programmable Gate Arrays (FPGAs), which are processor chips that can be programmed at the circuitry level. FPGAs have since been surpassed by even faster chips called ASICs — Application-Specific Integrated Circuits — processor chips designed from the ground up for mining.

If you haven’t the money nor the inclination to build such a rig, there’s a more practical alternative: running a miner on your computer as part of a Bitcoin mining pool. Like Star Trek’s Borg, a mining pool is a collective of individual miners working together in a common cause — in this case, acting as a single miner, trying to be the first to generate the next block. The pool divides the number-crunching work among the participating miners, assigning work according to the power of the computer running each miner. If the pool is successful in being the first one to generate the next block, it collects the Bitcoin reward, paying each participating miner a proportionate amount. The more your miner contributed to the calculations, the larger a share it will get paid.

Enough Introduction, Let’s Make Some Bitcoins!

For this how-to, you’ll need a few things:

  • A Windows computer. It could be Windows XP, Vista, 7 or 8. I’m focusing solely on Windows computers because they’re everywhere — chances are, you know of one that’s gathering dust somewhere — and because it offers the simplest setup process for a miner.
  • An internet connection. The Bitcoin system functions only because it’s a network of computers working together.
  • Electricity. If you live in a place where the power’s included in your rent, you’re ahead of the game!
  • Patience. Lots of it.

I’ve made these instructions as simple as I could, but if you get stuck somewhere, let me know in the comments.

Step 1: Set Up Your Wallet

Blockchain is an online Bitcoin wallet service, and it’s quite easy to set up. Point your browser at blockchain.info and you’ll see this:

Click the Start A New Wallet button and you’ll get taken to the registration page:

Click the image to see it at full size.

You’ll need to provide an alias — a easy-to-remember name that you can use to access your wallet without having to remember some complex identifier. Blockchain will generate a less easy-to-remember identifier for your wallet. Either one can be used to log into your wallet once you’re registered.

You’ll also have to come up with a password for your wallet. Make it reasonably complex: Blockchain will reject passwords less than 10 characters long, and you should use a mix of letters (upper- and lowercase), numbers and punctuation characters.

Once you’ve provided the info and entered the captcha (the “type the letters and numbers you see in this picture” thingy), click Continue. You’ll see this:

Click the image to see it at full size.

Unlike many other systems, if you lose your Blockchain password, it’s gone forever, as are any Bitcoins in your wallet. There’s no “I forgot my password. Can you send it to me or let me reset it?” feature. Instead, Blockchain gives you a mnemonic made up of a set of words that you can use to recover your password. Copy it down and keep it in a safe place.

(By the way, don’t bother copying down the mnemonic in the picture above. I Photoshopped the screen capture I took and replace the mnemonic for my account with one I made up.)

Once you’ve done that, click Continue.

Click the image to see it at full size.

You’ll be taken to the login page pictured above. Note the two text fields, Identifier and PasswordIdentifier will be filled in with the official identifier for your wallet; copy it and keep it in a safe place. Enter your password in the Password field and click Open Wallet. You’ll be taken to your My Wallet page:

Click the image to see it at full size.

Congratulations! You now have a Bitcoin wallet, which you can use to store Bitcoins, receive Bitcoins and pay for goods and services. At some point, you’ll want to click on the Account Settings button to enter additional information for your wallet including your email address and mobile phone number, both of which are useful for things like recovering a lost wallet identifier and for payment notifications.

You’ll note that I’ve posted a Bitcoin address in the picture above. Unlike your identifier and password, your Bitcoin address isn’t used to log you into your wallet; it’s to let other people and systems know how to send money to your wallet. You want that to happen, so you’ll want to share your Bitcoin address.

In case you have some Bitcoins that you’d like to send to me for writing this guide, my Bitcoin address is 16sF2U11VbCPpfoo3Vqcfp6sepb6ZQichD. (Omit the period at the end.) Like Mother Teresa said, “Give until it hurts”.

Step 2: Set Up Your Mining Pool Account

BitcoinCZ — also known as “Slush’s Pool” — is a user-friendly mining pool, and like Coinbase, it’s easy to get set up there. Point your browser at mining.bitcoin.cz, and you’ll see this:

Click the image to see it at full size.

Click on Sign up HERE (near the upper right-hand corner of the screen), and you’ll get taken to the registration page:

Click the image to see it at full size.

You’ll need to provide a username that you’d like to use to log in, an email address where you can be contacted, and a password. As with the Blockchain password — heck, any password — use a reasonably complex one, mixing upper- and lowercase letters, numbers and punctuation characters. Once you’ve done that, click Register now! and you’ll see this:

Again, wait for a confirmation notice to arrive in your email. It should look something like this:

Click the activation link in your email, which will take you back to the BitcoinCZ Mining site, where you’ll see this:

Click the image to see it at full size.

Congratulations! You’re now in a mining pool, which means that you can now contribute to the work of processing the Bitcoin block chain and collect Bitcoins for your hard work. Or more accurately, your computer’s hard work.

Note that the system has provided you with a worker login and a worker password. These aren’t for you to log into the mining pool; it’s for your mining software to log in. Don’t worry about copying these now; you’ll see them again soon.

For now, click on the login in “Please login to continue”. You’ll see this:

Log in using the credentials for BitcoinCZ that you created earlier. You’ll be taken to your account page:

Click the image to see it at full size.

Remember the Bitcoin address you copied from the previous step? Paste it into the Bitcoin Address field and click the Save button. Now the mining pool knows which wallet to send Bitcoins to.

The page should now look something like this:

Click the image to see it at full size.

If you scroll farther down the page, you’ll see a section marked Workers. Right now, it should look something like the picture below:

Click the image to see it at full size.

This shows the activity of your mining software. Right now, there’s no activity, which means it’s time to take the next step. Make a note of the Login and Password in your Workers display, because you’ll need it for the next step…

Step 3: Set Up Your Miner

Bitcoin miner software is varying degrees of user-unfriendly. Once you’ve got it up and running, you’re not really supposed to interact with it, and it’s written with performance in mind. GUIMiner is the least unfriendly of the bunch, so I suggest you start with that. Point your browser to guiminer.org and you’ll see this:

Click on Download to download the GUIMiner package, which is a self-extracting archive. Once you’ve downloaded it, double-click it. You’ll see this dialog box, where you specify where you want the files extracted:

It will default to your Downloads folder, which is typically C:\Users\{your username here}\Downloads. For simplicity’s sake, change Downloads to Desktop, which will cause the GUIMiner folder, pictured below, to appear on your desktop:

Open the folder. You should see a list of files like this:

Double-click on the orange GUIMiner icon. That will launch GUIMiner, which should look something like this:

Make the following changes:

  • Server: Set this to slush’s pool (it may already be set to this). This is the name that BitcoinCZ used to go by, and specifies that your mining software will take part in the BitcoinCZ mining pool.
  • Username: Enter the Username from the Workers table from your BitcoinCZ Mining account page here.
  • Password: Enter the Password from the Workers table from your BitcoinCZ Mining account page here.
  • CPU Affinity: There will be as many checkboxes here as your computer’s processor has cores (as you can see, the computer I used for this demo has 2). Uncheck all but the one marked 0.

Once you’ve done this, click the Start mining! button. The Stopped indicator at the lower right-hand corner of the window should start showing numbers indicating the rate at which the mining software is performing calculations.

If you go back your BitcoinCZ Mining Account page, and scroll down to the Workers section, you can see if your miner has been assigned some work. If it has, the value in the Current Shares column will be a number other than zero:

Click the image to see it at full size.

Step 4: Wait. A Lot.

As time goes by, your miner will be assigned some work, and in exchange for that work, you’ll be awarded some Bitcoin. You can see how much Bitcoin by looking at this section of your Account page:

Click the image to see it at full size.

Here’s a quick explanation of these fields:

  • Send threshold: When your Total reward (see below) hits this value, it will be sent to your Bitcoin wallet, whose address you specified earlier. The default is 1, which means that when your miner has done enough work to earn 1 Bitcoin, 1 Bitcoin will be sent to your wallet. You can change this value to whatever you like. For kicks, my threshold value is set to 0.05, which I call a “Bitnickel”.
  • Estimated reward: BitcoinCZ’s pool divides the work it does on a block among all the miners participating in the pool. It apportions this work by assigning calculations of varying difficulty levels, depending on the power of the computer running each miner. The faster your computer, the more work will be assigned to it, which in turn means the bigger a share of the Bitcoin bounty for doing that work. Since it knows the difficulty level of the work it’s assigning to your miner, it can make an estimate of the amount of Bitcoin it will have earned by doing it. That’s what this value is.
  • Unconfirmed reward: If the pool wins the competition to be the first miner in the Bitcoin network to generate the block, this work needs to be confirmed by other computers in the network. Until the block has been confirmed by other computers, the Bitcoin earned for this work is considered unconfirmed. This value is your share of that unconfirmed reward.
  • Confirmed reward: Once the block is confirmed, the pool is awarded 25 Bitcoins for processing it. This is your share of that booty.

Calculating Your “Riches”

In the lower right-hand corner of GUIMiner, you’ll see a measure of how many hashes it’s number-crunching each second (if you’re not a programmer, just think of them this way: hashes are to data what fingerprints are to humans). In the screenshot below, the miner is crunching 7 million hashes a second.

The Account page on BitcoinCZ will also show the average hash-crunching rate that your computer has been doing over the past 10 rounds. That should give you a better idea of how you’ve been doing over the long run.

More is better: more hashes number-crunched per second means faster number-crunching, which makes it more likely that the pool will be the first to create a new block and collect Bitcoins as its reward.

If you know the hash-crunching rate, you can get an idea how much Bitcoin you’ll make over a given period of time with this Bitcoin mining profitability calculator. You only have to enter the following data:

  • Hash rate, in MHash (megahashes, or millions of hashes) per second.
  • Electricity rate, in US dollars per kilowatt hour. If you don’t pay for electricity, set this to 0.
  • Power consumption of your computer while running GUIMiner, in watts. You might want to use a Kill-A-Watt measuring device for this. If you don’t know, set this to whatever your computer’s power supply is rated at.
  • Time frame, in months.
  • Cost of mining hardware: The cost of your machine. I got mine a couple of years back through a Craigslist sale from a guy who was moving to Europe at a rate so low I’m treating this as 0.

The calculator will automatically fill in the other values from online sources.

Pictured above is my Bitcoin mining rig, an HP IQ526 Touchsmart computer. It’s no rocket and number-crunches at a mere 2 MHash/second. Factoring its effectively zero cost in hardware and absolutely zero cost in electricity, I can make 0.0001 BTC — one ten-thousandth of a Bitcoin — every 24 hours. At the current rate of USD$95.75 a Bitcoin, that’s about a penny a day, or about $4.30 in a year. My blogs make that through advertising on a bad day.

Still, it’s a fun experiment. Let me know about your Bitcoin experience in the comments!

Joey deVilla

View Comments

  • Interesting,
    I think it would be preferable, to use your computing power for Boinc or SETI.
    Bat tell me a reason, why one should do this??

    Regards

  • I just upgraded my 5 yo computer at the start of April with a AMD 7950 gfx card. I am getting 550 mh/s, and in two weeks have already recouped a quarter of my "investment" earning about .4 BTC. I did it mainly for fun, since whenever ASICs hit the market in mass GFX card mining will be too inefficient, yet I'll still likely at least get a free graphics card outta it before then.

    In short, I have no clue why you think mining on a 2 mh/s connection was ever a smart idea, let alone that you were surprised in any way that you'd make more money off web advertising. The sad thing is sites like boing boing are running this story as a chance to mock bitcoins, pathetic.

  • Asic miners still have a ways to go so make the most of your cards!! Some forums are saying asic miners are having power consumption issues along with other alpha release woes.

  • Anon: Ain't nuthin' wrong with mocking Bitcoins!

    But seriously: this is an experiment to see if it's possible to make any money by mining Bitcoins on a "TPS Reports"-grade machine that you may have lying about at home, and not on a game-grade computer (which most of us don't have), never mind a full-bore mining rig.

  • Really cool experiment. I was glad to come across your site. It's an awesome guide for people like me who are learning about precious bit coins.

Recent Posts

Hurricane Milton post #11: Clean-up

Tap to view at full size. A good chunk of today was devoted to cleaning…

2 days ago

Hurricane Milton post #10: A farewell to silence

The stillness and silence from earlier this morning in our Old Seminole Heights neighbourhood broke…

2 days ago

Hurricane Milton post #9: “That’ll buff right out.”

I was still tired after waking up at 5:45 and writing the previous post, so…

3 days ago

Hurricane Milton post #8: The silence woke me up

No picture with this post, because there's no light. After getting used to the sound…

3 days ago

Hurricane Milton post #7: Embracing the darkness

I have to say: my home office octopus looks great when lit from below by…

3 days ago

Hurricane Milton post #6: “It’s giving outages!”

Tap to view at full size. Please pardon the title. I thought I’d experiment with…

3 days ago