Tuesday, April 29, 2014

Bitcoin miner hardware.[read]

Technical Background more »


During mining, your computer runs a cryptographic hashing function (two rounds of SHA256) on what is called a block header . For each new hash, the mining software will use a different number as the random element of the block header, this number is called the nonce . Depending on the nonce and what else is in the block the hashing function will yield a hash which looks like this:


You can look at this hash as a really long number. (It's a hexadecimal number, meaning the letters A-F are the digits 10-15.) Now to make mining difficult, there is what's called a difficulty target . To create a valid block your miner has to find a hash that is below the difficulty target. So if for example the difficulty target is 1000000000000000000000000000000000000000000000000000000000000000, any number that starts with a zero would be below the target, e.g.:


If we lower the target to 0100000000000000000000000000000000000000000000000000000000000000, we now need two zeros in the beginning to be under it:


Because the target is such an unwieldy number with tons of digits, people generally use a simpler number to express the current target. This number is called the mining difficulty . The mining difficulty expresses how much harder the current block is to generate compared to the first block. So a difficulty of 70000 means to generate the current block you have to do 70000 times more work than Satoshi had to do generating the first block. Though be fair though, back then mining was a lot slower and less optimized.


The difficulty changes every 2016 blocks. The network tries to change it such that 2016 blocks at the current global network processing power take about 14 days. That's why, when the network power rises, the difficulty rises as well.


Bitcoin Mining Hardware


CPU's: In the beginning, mining with a CPU was the only way to mine bitcoins. Mining this way via the original Satoshi client is how the bitcoin network started. This method is no longer viable now that the network difficulty level is so high. You might mine for years and years without earning a single coin.


GPU's: Soon it was discovered that high end graphics cards were much more efficient at bitcoin mining and the landscape changed. CPU bitcoin mining gave way to the GPU (Graphical Processing Unit). The massively parallel nature of some GPUs allowed for a 50x to 100x increase in bitcoin mining power while using far less power per unit of work. While any modern GPU can be used to mine, the AMD line of GPU architecture turned out to be far superior to the nVidia architecture for mining bitcoins and the ATI Radeon HD 5870 turned out to be the most cost effective choice at the time.


FPGA's: As with the CPU to GPU transition, the bitcoin mining world progressed up the technology food chain to the Field Programmable Gate Array. With the successful launch of the Butterfly Labs FPGA ‘Single', the bitcoin mining hardware landscape gave way to specially manufactured hardware dedicated to mining bitcoins. While the FPGAs didn't enjoy a 50x - 100x increase in mining speed as was seen with the transition from CPUs to GPUs, they provided a benefit through power efficiency and ease of use. A typical 600 MH/s graphics card consumed upwards of 400w of power, whereas a typical FPGA mining device would provide a hashrate of 826 MH/s at 80w of power. That 5x improvement allowed the first large bitcoin mining farms to be constructed at an operational profit. The bitcoin mining industry was born.


ASIC's: The bitcoin mining world is now solidly in the Application Specific Integrated Circuit (ASIC) era. An ASIC is a chip designed specifically to do one thing and one thing only. Unlike FPGA's, an ASIC cannot be repurposed to perform other tasks. An ASIC designed to mine bitcoins can only mine bitcoins and will only ever mine bitcoins. The inflexibility of an ASIC is offset by the fact that it offers a 100x increase in hashing power while reducing power consumption compared to all the previous technologies. For example, a good bitcoin miner like the Monarch from Butterfly Labs provides 600 GH/s (1 Gigahash is 1000 Megahash. 1 GH/s = 1000 MH/s) while consuming 350w of power. Compared to the GPU era, this is an increase in hashrate and power savings of nearly 300x. (Calculate the earnings of any bitcoin mining hardware device using this bitcoin mining calculator ).


Unlike all the previous generations of hardware preceding ASIC, ASIC is the "end of the line" when it comes to disruptive technology. CPUs were replaced by GPUs which were in turn replaced by FPGAs which were replaced by ASICs. There is nothing to replace ASICs now or even in the immediate future. There will be stepwise refinement of the ASIC products and increases in efficiency, but nothing will offer the 50x - 100x increase in hashing power or 7x reduction in power usage that moves from previous technologies offered. This makes power consumption on an ASIC device the single most important factor of any ASIC product, as the expected useful lifetime of an ASIC mining device is longer than the entire history of bitcoin mining. It is conceivable that an ASIC device purchased today would still be mining in two years if the device is power efficient enough and the cost of electricity does not exceed it's output. Mining profitability is also dictated by the exchange rate, but under all circumstances the more power effecient the mining device, the more profitable it is.


Software


There are two basic ways to mine: On your own or as part of a pool. Almost all miners choose to mine on a pool because it takes the luck out of the process. Before you join a pool, make sure you have a bitcoin wallet so you have a place to store your bitcoins. Next you need to join a mining pool like Eclipse. Eligius or BTC Guild. With pool mining, the profit from any block a member generates is divided up among the members of the pool. This gives the pool members a more frequent, steady payout (this is called reducing your variance), but your payout(s) will be less unless you use a zero fee pool like Eclipse. Solo mining will give you large, infrequent payouts and pooled mining will give you small, frequent payouts, but both add up to the same amount if you're using a zero fee pool.


Once you have your client set up or you have registered with a pool, the next step is to set up the actual mining software. The most popular GPU/FPGA/ASIC miner at the moment is BFGminer or CGminer. For a full GUI experience, try EasyMiner .


If you want a quick taste of mining without installing any software, try Bitcoin Plus. a browser-based CPU Bitcoin miner. As a CPU miner it's not cost-efficient for serious mining, but it does illustrate the principle of pooled mining very well.


Thanks to:


ThaFresh's ultimate Bitcoin Mining rig, featuring hardware from Butterfly Labs








bitcoin miner hardware.[read]

Blitzboom and the guys from #bitcoin-dev for their help with writing the guide!


Hack A Day - FPGA bitcoin mining


bitcoin miner hardware.[read]


The board requires only 6.8 watts for 100 Mhashes/second, but [li_gangyi]‘s blog says the team expects to hit 150-200 Mhashes with some improvements.


Only four of these boards were built and the supply has already sold out.  Deposits are being accepted at Cablesaurus towards pre-orders for the second generation model.  The second generation units are priced at $420 (single FGPA) to $620 (dual FPGA) but those prices will likely be lowered before purchase due to volume discounts.  The number of boards produced will be determined by how many deposits (paid in either bitcoins or USDs) are made.


This board differs from the modular FPGA hardware project  but runs the same open source FGPA miner  that was released in May.


FPGA hardware is more expensive for mining Bitcoin than the hashing equivalent when GPU graphics cards are used but power consumption for FPGA mining can be nearly an order of magnitude less.  At current exchange rates and difficulty levels. the dual-FGPA board will produce just under 0.12 BTC per day, which is worth about $1.22 USD.  Calculated using the typical U.S. residential rate the cost of electricity to run the two FPGAs for a day is under $0.04 USD, or about 3% of revenue.  For comparison, when GPU graphics cards are used for mining in regions where electric rates are high the cost of electricity can exceed half the miner’s revenue.


Though mining profitabilty  is near all-time lows, these levels are still high enough that FGPAs are not yet price competitive due to the higher hardware costs involved.  At the same time, this board just brought FPGA mining one step closer to becoming a significant competitor to GPU mining.  Those likely to be the early adopters will be those hitting total power consumption limits, those running out of space and those unable to sufficiently remove the heat produced when mining with GPUs.

No comments:

Post a Comment