(This guide is NOT guaranteed to be accurate and up to date as of 3-21-15…. )
So, you've read my previous article about using your GPU to mine for bitcoins, but now that the difficulty is
starting to get high absurd, you may be having a hard time generating any bitcions on your own (especially if you have non-specialized hardware). Never fear, there is a solution!
NOTE: You really should take a look at my first article to make sure that your hardware is even capable of supporting opencl, and you should also be using the most recent version of the drivers for your particular graphics device. Also there is a bit of information on setting up Kiv's GUIMiner in my other guide, which will make setting up pooled mining even easier; I may further update this guide at some point.
This guide is going to cover what is known as pooled mining, or working together with many other miners to share the rewards when a block is generated. This article is going to specifically cover slush's pool. You should also try to use the most recent version of whichever miner you are using (link to m0mchil's miner).
Basically, pooled mining has a bunch of miners all working on the same block, instead of each miner working on their own individual block. When a block is generated, payouts are based on how much "work" each miner does, so people with faster hardware will earn more than people who are using slower hardware - but everyone will still receive some bitcoins.
Payments and related calculations happen in rounds, and one round lasts for as long as it takes for one miner in the pool to find a solution to the most recent full strength block on the bitcoin network (one round can last for a few minutes or a few hours).
The way slush's pool works is each connected miner is given a block of a very low difficulty to work on. The difficulty of blocks on the normal network is 150,000 or more at present, but slush's pool will be giving your miner blocks of difficulty 1 to solve. Each time you solve one of these "easy" blocks, your miner is credited with one share in the current round. Occasionally, one of these "easy" blocks' solutions will actually be a real solution for the full difficulty block on the network. When this happens, the 50 bitcoins which are generated are then sent out to every miner with shares from that round (minus 1btc that slush takes as a fee).
The more shares your miner earns before the full difficulty block is found, the more coins you will receive for that round. Shares are generated more quickly on faster hardware, so thus more shares means larger payouts at the end of each round. If you are interested in more specifics, please see the info on slush's site for payment equations and lots of fun graphs and stuff.
Please Note: This guide is going to assume that you have already successfully set up a working miner. If you have not done so yet, it is strongly recommended that you see the link above in order to get your miner running.
Also something to note, when using the pool you are not actually connecting to your local bitcoin node. You are going to specify for the miner to connect to a remote host and port, and it will also need to supply a username and password (it does not matter if you use the same user/pass from your bitcoin.conf file, and in fact I would recommend that you choose something different to use to connect to the pool). It is actually possible to mine in this way without running a bitcoin node on the same computer as your miner(s).
1. First you need to make an account with the pool. Head over to http://mining.bitcoin.cz/accounts/register/ and sign up for a new account. The username you choose is going to need to be specified later on in your batch file for launching the miner and connecting to the pool. The password you choose here is only going to be used to log into your account on the pool site, the password(s) you use to connect your miner(s) to the pool will be different!
2. When your account is created, log in and go to the "My account" section of the site. There are some things that need to be set up before you are able to connect to the pool and start mining. Wallet needs to be a bitcoin address where you want payouts sent. Send threshold determines essentially how frequently you will receive payouts. Once your confirmed reward goes above whatever you set as the threshold, you will receive a payout. You should set this value to something relatively high, say 1.0 or more in order to avoid paying transaction fees later on. If you set it low you will receive more frequent payouts but may incur transaction fees sometime later on when you try to send these coins somewhere.
There are 4 boxes below threshold: Estimated, Unconfirmed, Confirmed, and Total reward. Estimated tells you how many coins you have likely earned in the current active round. Unconfirmed shows you how many btc are going to eventually be sent to your wallet once they are confirmed. Confirmed and Total are self-explanatory, and this info can also be found on the "My account" page. Don't forget to click save once you have filled in the above values.
3. Now it is time to add some workers (miners) to your pool account; click the "Register new worker" link. Login suffix is basically just a label, so that if you are using more than 1 miner it will be possible to differentiate between them. Password is the password for this specific miner. This is NOT the password you used to create your account with, this is a new password that you will specify in your batch script, and you should use a different password for each miner/worker. Click save and then go back to your profile to see this newly created worker.
This is where it starts to get a little bit tricky. For argument's sake, lets say that your username for the pool is user123. If you called your first worker miner0, and set the password as pass0, when you go back to your profile you should now see user123.miner0 and the password pass0 next to it. With this set up it is now time to create a new batch file.
4. Please bear in mind that this next step assumes you already have a working miner set up, so I will not go into much detail here with respect to file paths and arguments which are being specified. I will be following the same filename/location convention as my previous guide, so please refer to that if you have any problems.
Right click somewhere and create a new text document, then rename it to something to indicate that this will be for starting up pooled mining; also make sure that you use the .bat extension. This is going to be mostly the same process as setting up the miner to connect to your local bitcoin node, but this batch script will have new arguments for host, server, and port. Given the example username, worker login suffix, and worker password from step 4, this is what should be in your batch file:
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110428" poclbm.exe http://user123.miner0:email@example.com:8332 --device=0
If you have multiple GPUs you will need to register a new worker for each one, and make sure that you correctly correlate the different usernames and passwords with your different devices; example:
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110428" poclbm.exe http://user123.miner0:firstname.lastname@example.org:8332 --device=0
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110428" poclbm.exe http://user123.miner1:email@example.com:8332 --device=1
(And for other pools, you would use their server and port, etc.)
Now that you have all of that out of the way, you can just double click on this batch script to launch it. You should see it start up as normal and display your hashrate, but you will now see far more "accepted" messages; each one indicates one share for that miner. NOTE: DO NOT use user123 when you are mining, this is provided as an example only and you should be using a unique username that you used to register with the pool!
You can monitor your workers' stats on slush's site as well as see your pending rewards updated as shares are generated. Please note that it takes 100 blocks or approximately 16 hours for a block to mature and the coins to be transferable, so it is likely that you may not start receiving payouts for 24 hours or longer. "Found blocks" is how many full strength blocks your miner has found. If you were not mining for the pool, this would have been a full block (and thus 50btc) that you would have received all to yourself. If you are trying to obtain blocks all to yourself then you will have to mine for yourself, as the only way the pool can function fairly is if each block is divided up evenly among everyone who participated in the round.
Another pool that is popular was deepbit (still online). This pool operates in a similar manner to slush's, but this one also offers pay per share payouts. This means that instead of getting a semi-random payout at the end of a round, you will get a pre-set amount of bitcoins for each share you generate (right now deepbit is offering something like .0003 btc per share). This method will give you much more steady payouts, but sort of removes any potential luck factor.
For example, if you are using the proportional payment method, if a round is very short and only has something like 1,000 shares for the entire round (instead of 100,000 or more like which can be typical) you may end up getting a "very large" payout. If you had 4-5 of those 1,000 shares you may end up making something proportionally "big" for that round, maybe .0025 btc. If you were using the pay per share method, those 5 shares would only result in a payout of approx .0000146 btc, which as you can see is a rather huge difference.
I do not know which method is better to use, but I personally am a fan of proportional payouts much like slush's pool is based on.
As always, please leave a comment if you notice any errors or have any problems. I will do my best to address all concerns as quickly as possible and make sure the content of this page is up to date and correct. If you found this useful please consider making a donation to 1PndM1mwpET9R5TrVYhEMP3NMbaTinPytY
Whenever I talk about bitcoin, people always give me blank looks and empty stares as no one seems to know or even care about this (hopefully) up and coming new currency. I happened across this video on the bitcoin site and thought that I would post it here as it is rather informative and I can also refer people here when they ask what bitcoins are
This is no longer guaranteed to be correct/up to date
(In a slight departure from my normal content…)
Money for only running your computer!? It's more likely than you might think! No referral pyramid scam shit, you can make as much money as you have computing power to devote.
***NOTE: Since the difficulty is very high, unless you have an ASIC mining device and/or a very significant aggregate hash rate (over several TENS OF Ghash/sec or more) you are probably going to spend more on electricity than you can recoup in mined bitcoins, even when mining in a pool! If you have access to free electricity though, then there really is no argument against mining (aside from the *possibility* of shortening the lifespan of your graphics card(s)/mining hardware). For solo mining, you may end up waiting for many months/years to generate your own block and get 25 bitcoins (plus transaction fees), or use lots of electricity to maybe not ever generate a block at all.***
This post is aimed mostly at people who are already familiar with Bitcoin (Wikipedia page), and would like to get started using their GPU(s) to mine for bitcoins in a Windows environment.
Just some quick terminology: miner = program which is external to bitcoin-qt.exe that uses your graphics card to perform calculations; your GPU is much more efficient at the type of calculations bitcoin does than your CPU
First of all, you are going to need a graphics card that supports CUDA and/or OpenCL; most graphics cards from the past 2-3 years will support this.
*UPDATE*: If you are unsure, please download GPU Caps Viewer (I recommend the portable version) to determine if you have a compatible video device and a working version of OpenCL installed. If you are using an AMD/ATI card you likely need to install the ATI APP SDK (make sure you obtain the correct version for 32/64-bit Windows).
Please make sure you are using the most recent drivers for your particular graphics card.
Important: Make sure that windows explorer is configured to show file extensions and show hidden folders - In windows explorer go to tools(alt+t)→folder options→view tab→tick the show hidden files/folders button, and also make sure the box for hide file extensions is unchecked. This is very important or you may end up trying to create bitcoin.conf.txt without even realizing the .txt extension is still present!
Too Long; Didn't Read / Easy and somewhat automated version:
1. Go to www.bitcoin.org, download and install the most recent version of bitcoin (the default file path should be fine).
2. A GUI-based tool exists here which will help to speed this up and will automate a lot of the setup steps. Go to the linked forum thread, download and extract the archive somewhere, and then run guiminer.exe.
3. From the GUIMiner interface, click solo utilities → set bitcoin client path. Point the dialog box to bitcoin-qt.exe; likely located at C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe or C:\Program Files\Bitcoin\bitcoin-qt.exe. Next click solo utilities → create solo password. Pick anything arbitrary for username and password but remember it, as you will need to use this later. Then finally you want to click solo utilities → launch bitcoin client as server.
This will launch bitcoin ready to be mined with, you must first wait for all the blocks to be downloaded before you can start to mine, and this may take several hours; you can view the current block count here.
4. Once all the blocks are downloaded, select solo from the server drop down box, then enter the username and password that you used before, then click start mining. Congratulations, you are now mining for bitcoins
(Recommended) 5. Since the difficulty is high now, you will only likely see an immediate return if you mine as part of a pool. The GUI Miner will greatly expedite pool setup and you can find some more information about pools here.
Additional notes: The GUI Miner also does not display the actual console window of poclbm or whatever miner you may be using; this may be desirable for some people.
Long, manual set up version using batch scripts and the command prompt:
Please note that the long version of this guide will show you how to do everything manually and via the command line. This is somewhat advanced and only recommended if you are comfortable manually creating/editing text files and using the command prompt.
1. To start, head over to http://www.bitcoin.org/ and download the latest windows client. Install it to wherever you want, but it may be of benefit to keep the directory path somewhat simple, because batch scripts and launching from the command line will follow. For argument's sake, I will just assume you are using the default install path on the 64-bit version of windows, so your install directory may be:
C:\Program Files (x86)\Bitcoin
At the time of writing, the latest version of bitcoin is 0.3.23, and your overall path to bitcoin-qt.exe should be:
C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe
To start, open up a command prompt (windows key + r → type cmd → hit enter), and then navigate to the directory where bitcoin-qt.exe is located. If you've been following along with my examples, you will want to type this into the command prompt window:
cd C:\Program Files (x86)\Bitcoin
2. Put the command prompt aside for just a second, because before launching bitcoin, you will need to create a text file called bitcoin.conf (the location of this file will vary depending on which version of Windows you are using)
If you are using Windows 7 or Vista, navigate to:
If you are using Windows XP, navigate to:
C:\Documents and Settings\[username]\Application Data\Bitcoin
(You will probably need to create the "Bitcoin" directory, as bitcoin-qt.exe will auto-create it on first run, but you haven't yet run it… This is also where showing hidden folders comes into play, because on Windows 7 the AppData directory is hidden; Application Data may be hidden on XP as well)
Inside the appropriate folder, just right click and select new→text document, then rename this file to bitcoin.conf
Once you have created this file, open it up with your favorite text editor and add the following 2 lines (don't forget to save it when finished):
Where youruser and yourpw should be any arbitrary username and password; this is supplied to the miner later on via command line so that the miners can communicate with bitcoin-qt.exe (these are the values that bitcoin expects, if the miner specifies different values at launch you will likely get RPC errors).
3. Next, you want to start bitcoin-qt.exe with the '-server' argument specified. This tells bitcoin that there will be external programs running and allows bitcoin to communicate with them. To do so, bring your command prompt back into focus and type:
(alternatively you can just launch bitcoind.exe from the \daemon directory, which is the GUI-less client, but I prefer to use the GUI client. Using bitcoind.exe is equivalent to launching bitcoin-qt.exe with the arguments -server -daemon specified)
Now you will see bitcoin start up for the first time. Your client must first download the block chain before you will be able to start generating coins, and this is done automatically on first startup. You will see the number of blocks begin to increase over time, and at the time of writing there are 130,805 blocks (you can view the current block count here). This can take many hours, so be patient and let it do its thing. This process can be sped up if you forward port 8333 TCP on your router, but this is not required.
4. Next, head on over to this thread and download the latest poclbm_py2exe binary from the first post. There are other miners available which work in windows, but m0mchil's is the one that I use and this guide will instruct how to set up this particular miner. (poclbm stands for (I believe…) PyOpenCL Bitcoin Miner)
If you have been following along so far, I would suggest that you create a new directory inside C:\Program Files (x86)\Bitcoin to reflect the latest version of the windows binary. At the time of writing the most recent version is poclbm_py2exe_20110709, so you should create a new directory
C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709
and then extract the contents of the archive to this new folder. The executable which will be used is poclbm.exe, but this must be launched via command line and given several launch parameters. This can be tedious to do on windows, so we will expedite this with a batch script. (and your final path to poclbm.exe should be C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709\poclbm.exe)
5. You can place the batch script anywhere you like; I put mine on my desktop for easy access. Right click again and create a new text file, then rename it to whatever_you_want.bat, all that matters here is the .bat extension. Right click on this file and hit edit (double clicking on it will launch it). In this batch file you want to put the following contents (this is assuming you're following the convention of this guide so far - if you are using your own directory structure, then use whatever location you have chosen instead):
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=0
(Similarly, for using a pool you can do something like this: start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe http://poolworker.1:firstname.lastname@example.org:8332 --device=0 )
***(Important Note: Some people have been having issues with the batch script failing to launch initially. It seems that it may be important to specify your device number along with the rest of the launch parameters on each line of the batch script. This can be done by simply specifying --device=X, where X is the number of your desired video device; most likely 0. If you have multiple devices, then the 2nd device is likely "1", and so on; if you are using onboard video I am not sure how this would work…)***
"start" just tells the batch script to start a new process in its own window, the /D parameter specifies the directory that the program is located in (this allows the batch script to be launched from anywhere on your computer), and then poclbm.exe is just the target program, followed by the arguments it needs to run properly. Make sure to use the same user and password that you specified earlier in your bitcoin.conf file. Quotes are needed whenever paths have a space in them.
Now all that's left to do is save this file and wait until bitcoin finishes downloading all the blocks; you cannot generate until you have acquired all blocks.
(You may end up waiting a long time for this to finish, so if you want to take some time to go read more about bitcoins and how the system works, now is a good time )
Once all blocks have been acquired, make sure bitcoin is running with the -server switch, then simply double click on your batch file. A new window should pop up and after a few seconds. If all is going well, your hashrate will be displayed. When you want to exit just "x" out of the window or press ctrl-c.
You can make a batch script to launch bitcoin-qt.exe with the -server argument as well, its contents should look something like this:
start /D"C:\Program Files (x86)\Bitcoin" bitcoin-qt.exe -server
If you have more than one graphics card, you can use them both at the same time by doing something similar to this within your batch file:
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=0
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=1
for however many devices you use. This will open up a new window for each graphics card and show each card's hashrate.
Another switch you may want to play around with is the -w switch, which indicates the worksize for your card to use; for example:
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=0 -w 256
By default, m0mchil's miner will use the maximum work size supported by your card, most likely 256 or 512. You can play around with different sizes to see which gives you the highest hashrate; the size must be a power of 2. You will know if you have exceeded your card's maximum size if the miner errors or crashes when you try to start it; going too small will greatly lower your hashrate. You can also play around with the -v argument as well.
If you notice your desktop is being sluggish you can mitigate this by adding:
to the end of each line of your batch script.
Assuming you have gotten this far and everything works, you can add the totals of each individual hashrate from your GPU(s), and put the grand total into this calculator to get an idea of how much you can earn daily (if you use a pool). If you are mining solo assume that the expected average time to generate a block is easily
4-8 weeks several decades…or much longer (but this will get you 25BTC).
Now all you have to do is wait…
Note that it will likely take many weeks to generate coins, and you are likely to notice an increase in your power bill while you run your bitcoin miners (Please Note: if you are not using high-end hardware, it is likely that you will spend more on power than you can recoup via bitcoin generation and sales for solo mining). Additionally, you may want to look into doing something like this with [
RivaTuner NO LONGER UPDATED, SEE BELOW] or a similar app to mitigate the temperature increase on your graphics device(s). (I think that rivatuner also works with newer amd/ati cards)
(MSI Afterburner is also recommended)
UPDATE: If you are using slow-ish hardware, take a look at the pooled mining option here. (Additional info on how to use m0mchil's miner with slush's pool)
Troubleshooting: It seems that some people are having issues where the batch script just pops up for a second and then closes without anything happening. This usually indicates that whatever you are trying to launch is failing and quickly prints out an error message on the console window opened by the batch script, but since it fails immediately it closes too quickly for you to read it. In order to determine what the problem is, you will need to navigate to the location of poclbm.exe within a new command prompt; just use cd as is described somewhat in step 1. Once you are in the directory where poclbm.exe is located, you should now try to launch poclbm.exe with the arguments exactly as they are contained in the batch script. So assuming you have been following the conventions of this guide so far, and your batch script fails to start the miner successfully, you would type the following once you are in the directory C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709:
poclbm.exe youruser:yourpw@localhost:8332 --device=0
This is just how you would normally launch the miner anyway, the batch script simply does this for you when you double click on it. By entering this manually from within an already-open command prompt, if the miner fails to launch, the error messages will be printed to the console and will remain there for you to read. This should give you the specific problem that is preventing your miner from launching, and allow you to provide a more specific error message than "it doesn't open".
Also…please read all of the comments before making a new one asking for help, it is possible that your problem may have already been covered.
Once you do finally generate some coins, you can head on over to www.mtgox.com and create an account. You can now deposit some bitcoins into your account and get trading (there are other exchange sites but mtgox still the largest). More information can be obtained by talking with the folks in #bitcoin-otc on irc.freenode.net; people may be willing to purchase bitcoins directly from you for paypal or other methods of currency exchange. IMPORTANT NOTE: Paypal does NOT like bitcoin, you SHOULD NOT mention bitcoins at all in any correspondence with paypal, nor should you mention it at all when transferring money!!!
ADDITIONAL DISCLAIMER: I am not an accountant/attorney, and any profits you derive from mining and selling bitcoins may be subject to taxes and other regulations. Check your local laws and consult with your personal accountant/attorney to find out how this may affect you.
If you intend to stick with this and help the bitcoin community grow you should also make a forum account on the bitcoin site as well as join the irc channels #bitcoin, #bitcoin-market, and #bitcoin-otc, all on freenode.
I hope that this tutorial helps, and it is only intended to be an introduction to getting a "no frills" miner setup working under windows.
***Yes mining bitcoins is legal but you may be subject to fees and regulation(s) if you choose to sell them
Please leave a comment if you found this post useful, have any problems, or if you notice any errors or inconsistencies. If you are feeling generous, I will gladly accept any donations of any amount at the bitcoin addresses 1J3UPhu8i5XCz7A5sPC4rRz99fPzFn3N5e